chart.RollingCorrelation: chart rolling correlation fo multiple assets

Description Usage Arguments Details Author(s) Examples

Description

A wrapper to create a chart of rolling correlation metrics in a line chart

Usage

1
2
chart.RollingCorrelation(Ra, Rb, width = 12, xaxis = TRUE,
  legend.loc = NULL, colorset = (1:12), ..., fill = NA)

Arguments

Ra

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

Rb

return vector of the benchmark asset

width

number of periods to apply rolling function window over

xaxis

if true, draws the x axis

legend.loc

places a legend into one of nine locations on the chart: bottomright, bottom, bottomleft, left, topleft, top, topright, right, or center.

colorset

color palette to use, set by default to rational choices

...

any other passthru parameters

fill

a three-component vector or list (recycled otherwise) providing filling values at the left/within/to the right of the data range. See the fill argument of na.fill for details.

Details

The previous parameter na.pad has been replaced with fill; use fill = NA instead of na.pad = TRUE, or fill = NULL instead of na.pad = FALSE.

Author(s)

Peter Carl

Examples

1
2
3
4
5
6
# First we get the data
data(managers)
chart.RollingCorrelation(managers[, 1:6, drop=FALSE],
		managers[, 8, drop=FALSE],
		colorset=rich8equal, legend.loc="bottomright",
		width=24, main = "Rolling 12-Month Correlation")

guillermozbta/portafolio-master documentation built on May 11, 2019, 7:20 p.m.