R/chart.RollingCorrelation.R
chart.RollingCorrelation.RdA wrapper to create a chart of rolling correlation metrics in a line chart
chart.RollingCorrelation(
Ra,
Rb,
width = 12,
xaxis = TRUE,
legend.loc = NULL,
colorset = (1:12),
...,
fill = NA
)an xts, vector, matrix, data frame, timeSeries or zoo object of asset returns
return vector of the benchmark asset
number of periods to apply rolling function window over
if true, draws the x axis
places a legend into one of nine locations on the chart: bottomright, bottom, bottomleft, left, topleft, top, topright, right, or center.
color palette to use, set by default to rational choices
any other passthru parameters
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.
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.
# 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")