initStrategy

0th

Percentile

run standard and custom strategy initialization functions

initStrategy will run a series of common initialization functions at the beginning of an applyStrategy call.

Usage
initStrategy(strategy, portfolio, symbols, parameters = NULL, get.Symbols = TRUE, init.Portf = TRUE, init.Acct = TRUE, init.Orders = TRUE, unique = TRUE, ...)
Arguments
strategy
object of type strategy to initialize data/containers for
portfolio
portfolio
symbols
symbols
parameters
named list of parameters to be applied during evaluation of the strategy, default NULL
get.Symbols
TRUE/FALSE, default TRUE
init.Portf
TRUE/FALSE, default TRUE
init.Acct
TRUE/FALSE, default TRUE
init.Orders
TRUE/FALSE, default TRUE
unique
TRUE/FALSE, default TRUE
...
any other passthrough parameters
Details

get.Symbols
if TRUE, will call getSymbols on all symbols included in the symbols vector
init.Portf
if TRUE, will call initPortf to initialize the portfolio object
init.Acct
if TRUE, will call initAcct to initialize the account object
init.Orders
if TRUE, will call initOrders to initialize the order book for this test
unique
not yet implemented, will force a unique portfolio and account name if the portfolio, account, or order book already exist

See Also

applyStrategy, add.init,

Aliases
  • initStrategy
Documentation reproduced from package quantstrat, version 0.8.2, License: GPL-3

Community examples

Looks like there are no examples yet.