Description Usage Arguments Details Author(s) See Also Examples
A wrapper to create a chart of rolling performance metrics in a line chart
1 2 |
R |
an xts, vector, matrix, data frame, timeSeries or zoo object of asset returns |
width |
number of periods to apply rolling function window over |
FUN |
any function that can be evaluated using a
single set of returns (e.g., rolling
|
fill |
a three-component vector or list (recycled
otherwise) providing filling values at the left/within/to
the right of the data range. See the fill argument of
|
main |
set the chart title, same as in
|
ylim |
set the y-axis limit, same as in
|
... |
any other passthru parameters to
|
The parameter na.pad
has been deprecated; use
fill = NA
instead of na.pad = TRUE
, or
fill = NULL
instead of na.pad = FALSE
.
Peter Carl
charts.RollingPerformance
,
rollapply
1 2 3 4 5 6 7 8 9 10 | data(edhec)
chart.RollingPerformance(edhec[, 1:3], width = 24)
chart.RollingPerformance(edhec[, 1:3],
FUN = 'mean', width = 24, colorset = rich8equal,
lwd = 2, legend.loc = "topleft",
main = "Rolling 24-Month Mean Return")
chart.RollingPerformance(edhec[, 1:3],
FUN = 'SharpeRatio.annualized', width = 24,
colorset = rich8equal, lwd = 2, legend.loc = "topleft",
main = "Rolling 24-Month Sharpe Ratio")
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.