rtransactionsmetadatafinanceblotter

In the R blotter package, is it possible to add metadata to transactions?


In the blotter R package, you can add transactions to a portfolio using the addTxn and addTxns functions.

Is it possible to attach metadata to these transactions?

For example, it would be useful to be able to add an identifier to each entry.


Solution

  • No, there's currently no way to attach metadata to individual transactions. I can't think of a good way to implement it either.

    I'm not sure we could allow users to add arbitrary columns to the transaction table without the current functionality being aware of them.

    You might be able to use xtsAttributes to attach your own metadata to the transaction table, perhaps via a custom function (e.g. myAddTxn). Though you would be responsible for maintaining the integrity of the metadata, obviously.