ggplots.PerformanceSummary: ggplots.PerformanceSummary

Description Usage Arguments Value Author(s) Examples

View source: R/pub01_utilityFuncs.R

Description

A wrapper to create a set of charts to demonstrating the performance of the return series,including wealth index chart,drawdown chart,and bar chart for per-period performance.

Usage

1
2
3
ggplots.PerformanceSummary(rtn, var.cum = list(colnames(rtn)),
  var.dd = list(colnames(rtn)), var.bar = list(colnames(rtn)),
  bar.freq = "month", main = "Charts of Performance Summary")

Arguments

rtn

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

var.cum

a list,with elements of integer (variable position) or string (variable name) vecter.This parametre indicate which columns of rtn's wealth index will be layout in which plots. The first element of the var.cum will be layout in the first plot,and so on.By default,all the cols will be layout in one plot

var.dd

a list, indicating which columns of rtn's drawdown will be layout in which plots.

var.bar

a list, indicating which columns of rtn's per-period performance will be layout in which plots.

bar.freq

the freq of the per-period performance bar chart,which is passed into function cut.Date.An interval specification, one of "day", "week", "month", "quarter" and "year", optionally preceded by an integer and a space, or followed by "s".See cut.Date for detail.

main

title of the chart

Value

Print a wrapped plots of class ggplot,and return a recordedplot object.

Author(s)

Ruifei.Yin

Examples

1
2
3
4
5
6
rtn1 <- zoo(rnorm(300,0.001,0.02),as.Date("2010-01-01")+1:300)
rtn2 <- zoo(rnorm(300,0.001,0.02),as.Date("2010-01-01")+1:300)
rtn3 <- zoo(rnorm(300,0.001,0.02),as.Date("2010-01-01")+1:300)
rtn <- merge(rtn1,rtn2,rtn3)
ggplots.PerformanceSummary(rtn)
ggplots.PerformanceSummary(rtn,var.cum=list(c(1,2),3),var.dd=list(c(1,2)),var.bar=list(c(1,2,3)))

QuantAndrew/QUtility documentation built on May 14, 2019, 7:36 a.m.