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

chart.CumReturns

Cumulates and graphs a set of periodic returns


Description

Chart that cumulates the periodic returns given and draws a line graph of the results as a "wealth index".

Usage

chart.CumReturns(
  R,
  wealth.index = FALSE,
  geometric = TRUE,
  legend.loc = NULL,
  colorset = (1:12),
  begin = c("first", "axis"),
  plot.engine = "default",
  ...
)

Arguments

R

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

wealth.index

if wealth.index is TRUE, shows the "value of $1", starting the cumulation of returns at 1 rather than zero

geometric

utilize geometric chaining (TRUE) or simple/arithmetic chaining (FALSE) to aggregate returns, default TRUE

legend.loc

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

colorset

color palette to use, set by default to rational choices

begin

Align shorter series to:

  • first - prior value of the first column given for the reference or longer series or,

  • axis - the initial value (1 or zero) of the axis.

plot.engine

choose the plot engine you wish to use" ggplot2, plotly,dygraph,googlevis and default

...

any other passthru parameters

Details

Cumulates the return series and displays either as a wealth index or as cumulative returns.

Author(s)

Peter Carl

References

Bacon, Carl. Practical Portfolio Performance Measurement and Attribution. Wiley. 2004.

See Also

Examples

data(edhec)
chart.CumReturns(edhec[,"Funds of Funds"],main="Cumulative Returns")
chart.CumReturns(edhec[,"Funds of Funds"],wealth.index=TRUE, main="Growth of $1")
data(managers)
chart.CumReturns(managers,main="Cumulative Returns",begin="first")
chart.CumReturns(managers,main="Cumulative Returns",begin="axis")

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.