Learn R Programming

RTL (version 0.1.6)

chart_PerfSummary: chart_PerformanceSummary

Description

Multi Asset Display of Cumulative Performance and Drawdowns

Usage

chart_PerfSummary(
  ret = ret,
  geometric = TRUE,
  main = "Cumulative Returns and Drawdowns",
  linesize = 1.25
)

Arguments

ret

Wide dataframe univariate or multivariate of percentage returns.

geometric

Use geometric returns TRUE or FALSE.

main

Chart title.

linesize

Size of lines in chart and legend.

Value

Cumulative performance and drawdown charts.

Examples

Run this code
# NOT RUN {
df <- dflong %>% dplyr::filter(series %in% c("CL01","CL12","CL36"))
ret <- returns(df=df,retType="rel",period.return=1,spread=TRUE)
ret <-data.frame(rolladjust(x=ret,commodityname=c("cmewti"),rolltype=c("Last.Trade")))
chart_PerfSummary(ret=ret, geometric=TRUE, main="Cumulative Returns and Drawdowns",linesize=1.25)
# }

Run the code above in your browser using DataLab