initStrategy: run standard and custom strategy initialization functions

Description Usage Arguments Details Author(s) See Also

View source: R/initialize.R

Description

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

Usage

1
2
3
initStrategy(strategy, portfolio, symbols, parameters = NULL,
  get.Symbols = FALSE, 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 FALSE

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

If used in conjuction with initBySymbol, get.Symbols should be FALSE.

Author(s)

Garrett See, Brian Peterson

See Also

applyStrategy, add.init,


naturalsmen/quantstrat documentation built on May 23, 2019, 12:22 p.m.