gg_charts_summary_2: Produces a plot of cumulative performance and drawdown over...

Description Usage Arguments Value See Also Examples

View source: R/gg_charts_2.R

Description

Produces a plot of cumulative performance and drawdown over time given a history of returns.

Usage

1
2
gg_charts_summary_2(r.xts, ptitle = "", geometric = TRUE,
  drawdown_minima = NA)

Arguments

r.xts

an XTS object with period returns for each column; function will compute cumulative return and drawdowns for each item.

ptitle

a plot title string, default empty string

geometric

whether cumulative returns should use geometric method

drawdown_minima

color for drawdown minima marker lines, default NA for none

Value

ggplot2 object for further manipulation

See Also

PerformanceAnalytics::charts.PerformanceSummary, directlabels, dplyr, tidyr, magrittr, ggplot2

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
## Not run: 
pr <- blotter::PortfReturns(acct_name)
colnames(pr) <- gsub(".DailyEndEq", "", colnames(pr))
pr$Theoretical <- rowSums(pr)
p <-gg_charts_summary_2(pr$Theoretical,
                       ptitle = "Theoretical Returns",
                       drawdown.minima = "gray")
p

## End(Not run)

greatgray/scorecard documentation built on May 17, 2019, 8:34 a.m.