ggplots.RollingPerformance: ggplots.RollingPerformance

Description Usage Arguments Value Author(s) See Also Examples

View source: R/pub01_utilityFuncs.R

Description

A wrapper to create a rolling annualized returns chart(of class ggplot), rolling annualized standard deviation chart, and a rolling annualized sharpe ratio chart.

Usage

1

Arguments

rtn

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

width

see rollapply for detail

by

see rollapply for detail

...

other arguments to function rollingPerformance

align

see rollapply for detail

Value

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

Author(s)

Ruifei.Yin

See Also

rollingPerformance

Examples

1
2
3
4
rtn.long <- zoo(rnorm(100,0.001,0.02),as.Date("2010-01-01")+1:100)
rtn.short <- rtn.long + rnorm(100,-0.001,0.003)
rtn <- merge(rtn.long,rtn.short)
ggplots.RollingPerformance(rtn)

raphael210/QUtility documentation built on May 26, 2019, 11:05 p.m.