Learn R Programming

quantstrat (version 0.8.2)

applyStrategy.rebalancing: apply the strategy to arbitrary market data, with periodic rebalancing

Description

This function is the wrapper that holds together the execution of a strategy with rebalancing rules.

Usage

applyStrategy.rebalancing(strategy, portfolios, mktdata = NULL, parameters = NULL, ..., verbose = TRUE, symbols = NULL, initStrat = FALSE, updateStrat = FALSE)

Arguments

strategy
an object of type 'strategy' or the name of a stored strategy to apply
portfolios
a list of portfolios to apply the strategy to
mktdata
an xts object containing market data. depending on indicators, may need to be in OHLCV or BBO formats, default NULL
parameters
named list of parameters to be applied during evaluation of the strategy, default NULL
...
any other passthru parameters
verbose
if TRUE, return output list
symbols
character vector identifying symbols to initialize a portfolio for, default NULL
initStrat
whether to use (experimental) initialization code, default FALSE
updateStrat
whether to use (experimental) wrapup code, default FALSE

See Also

strategy, applyIndicators, applySignals, applyRules, initStrategy, applyStrategy