Become an expert in R — Interactive courses, Cheat Sheets, certificates and more!
Get Started for Free

charts.RollingPerformance

rolling performance chart


Description

A wrapper to create a rolling annualized returns chart, rolling annualized standard deviation chart, and a rolling annualized sharpe ratio chart.

Usage

charts.RollingPerformance(
  R,
  width = 12,
  Rf = 0,
  main = NULL,
  event.labels = NULL,
  legend.loc = NULL,
  ...
)

Arguments

R

an xts, vector, matrix, data frame, timeSeries or zoo object of asset returns

width

number of periods to apply rolling function over

Rf

risk free rate, in same period as your returns

main

set the chart title, same as in plot

event.labels

TRUE/FALSE whether or not to display lines and labels for historical market shock events

legend.loc

places a legend into one of nine locations on the chart: bottomright, bottom, bottomleft, left, topleft, top, topright, right, or center.

...

any other passthru parameters

Author(s)

Peter Carl

See Also

Examples

if(!( Sys.info()[['sysname']]=="Windows") ){
# if on Windows, cut and paste this example

data(managers)
charts.RollingPerformance(managers[,1:8], 
                          Rf=managers[,10,drop=FALSE], 
                          colorset=tim8equal, 
                          main="Rolling 12-Month Performance", 
                          legend.loc="topleft")
}

PerformanceAnalytics

Econometric Tools for Performance and Risk Analysis

v2.0.4
GPL-2 | GPL-3
Authors
Brian G. Peterson [cre, aut, cph], Peter Carl [aut, cph], Kris Boudt [ctb, cph], Ross Bennett [ctb], Joshua Ulrich [ctb], Eric Zivot [ctb], Dries Cornilly [ctb], Eric Hung [ctb], Matthieu Lestel [ctb], Kyle Balkissoon [ctb], Diethelm Wuertz [ctb], Anthony Alexander Christidis [ctb], R. Douglas Martin [ctb], Zeheng 'Zenith' Zhou [ctb], Justin M. Shea [ctb]
Initial release
2020-02-05

We don't support your browser anymore

Please choose more modern alternatives, such as Google Chrome or Mozilla Firefox.