View source: R/backtest.plot.R
backtest.plot | R Documentation |
generate plots of the cumulative returns and drawdown for back-testing
backtest.plot(
R,
log_return = FALSE,
drawdown_on = 1,
plotType = "both",
main = NULL,
colorSet = NULL,
ltySet = NULL,
lwdSet = NULL
)
R |
an xts, vector, matrix, data frame, timeSeries or zoo object of asset returns |
log_return |
arithmetic return or log return, the default is arithmetic return |
drawdown_on |
the plot will shadow the full time period of the maximum drawdown and recovery of the first portfolio. Use number (e.g. 1, 2, 3) to indicate which portfolio drawdown interval you wish to track, or NULL to not shadow any period. |
plotType |
"cumRet", "drawdown", or the default is both |
main |
users can design title by providing a character of main |
colorSet |
users can design the color by providing a vector of color |
ltySet |
users can design lty by providing a vector of lty |
lwdSet |
users can design lwd by providing a vector of lwd |
Peter Carl, Xinran Zhao, Yifu Kang
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.