extractTxns: Extract transactions from a portfolio

Description Usage Arguments Details Value Author(s)

View source: R/extractTests.R

Description

This function reverse-engineers addTxn calls for all the transactions in Portfolio. This is the fundamental task required to create a reproducible example, as it would replicate the state of the $txn slot in the portfolio after each addTxn call.

Usage

1
extractTxns(Portfolio)

Arguments

Portfolio

string identifying the portfolio to extract from

Details

While market data, expected results, portfolio and account setup, etc, are also required, these can usually be deduced or equivalent formulations can be found.

For transactions, only the exact addTxn parameters will recreate the $txn slot. This function creates that reproducibility, since the result (stored in 'x') can be used to regenerate transactions with eval(parse(text=x)).

Value

String vector of addTxn calls that would replicate the given portfolio.

Author(s)

Brian G. Peterson, Josh Ulrich


redmode/blotter documentation built on May 27, 2019, 4:03 a.m.