Description Usage Arguments Examples
Compare the portfolio performance indicators of an arbitrary number of objects of class Strategy.
| 1 2 3 4 5 6 7 8 | compare(..., from=NULL, until=NULL, which=NULL
       , scaling.periods=NULL, include.costs=TRUE
       , use.backtest=FALSE, include.params=FALSE)
## S4 method for signature 'Strategy'
compare(..., from = NULL, until = NULL, which = NULL,
  scaling.periods = NULL, include.costs = TRUE, use.backtest = FALSE,
  include.params = FALSE)
 | 
| ... | Objects of class  | 
| from | The date in character format  | 
| until | The date in character format  | 
| which | Names or number of assets that should be included in calculation. | 
| scaling.periods | Vector with annualization factors for calculation. Default is 252, 52, 12, 4, 1 for daily, weekly, monthly, quarterly and yearly data respectively. | 
| include.costs | If  | 
| use.backtest | If  | 
| include.params | If  | 
| 1 2 3 4 5 6 7 8 9 10 11 12 13 14 | ##Not run:
# MA(200)-Strategy
params <- list(k=200)
myStrat.MA <- Strategy(assets=assets, strat="MA", strat.params=params)
# EWMA(0.05)-Strategy
params <- list(lambda=0.05)
myStrat.EWMA <- Strategy(assets=assets, strat="EWMA", strat.params=params)
# Compare annualized performance of MA(200) and EWMA(0.05)
# compare(myStrat.MA, myStrat.EWMA, use.backtest=TRUE, scaling.periods=252)
##End(Not run)
 | 
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.