1

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.

sdgfsdh
  • 33,689
  • 26
  • 132
  • 245

1 Answers1

0

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.

Joshua Ulrich
  • 173,410
  • 32
  • 338
  • 418
  • The idea would be to add a string to each entry containing an identifier for the trade, allowing more information to be found in some database. Useful information might be booking method, counterparty, etc. – sdgfsdh Mar 27 '15 at 08:30