Description Usage Arguments Value Author(s) Examples
View source: R/pub01_utilityFuncs.R
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.
1 2 3 |
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 |
main |
title of the chart |
Print a wrapped plots of class ggplot,and return a recordedplot object.
Ruifei.Yin
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)))
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.