initStrategy
will run a series of common initialization functions at the
beginning of an applyStrategy
call.
initStrategy(strategy, portfolio, symbols, parameters = NULL,
get.Symbols = FALSE, init.Portf = TRUE, init.Acct = TRUE,
init.Orders = TRUE, unique = TRUE, ...)
object of type strategy
to initialize data/containers for
portfolio
symbols
named list of parameters to be applied during evaluation of the strategy, default NULL
TRUE/FALSE, default FALSE
TRUE/FALSE, default TRUE
TRUE/FALSE, default TRUE
TRUE/FALSE, default TRUE
TRUE/FALSE, default TRUE
any other passthrough parameters
if TRUE, will call getSymbols
on all symbols included in the symbols
vector
if TRUE, will call initPortf
to initialize the portfolio object
if TRUE, will call initAcct
to initialize the account object
if TRUE, will call initOrders
to initialize the order book for this test
not yet implemented, will force a unique portfolio and account name if the portfolio, account, or order book already exist
If used in conjuction with initBySymbol
, get.Symbols
should be FALSE
.