Description Usage Arguments Author(s) Examples
Plot method for EWMA objects.
1 2 3 |
x |
an EWMA object created via |
y |
not used. |
assets |
character vector or numeric vector of assets to extract from the covariance or correlation matrix. The assets can be specified by name or index. This argument is only usd for multivariate EWMA estimates of a covariance or correlation matrix. |
legendLoc |
location of legend. If NULL, the legend will be omitted from the plot. |
main |
main title for the plot. |
legendCex |
numerical value giving the amount by which the legend. |
... |
passthrough parameters to |
Ross Bennett
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 | # data and parameters for EWMA estimate
data(crsp_weekly)
R <- largecap_weekly[, 1:2]
mvR <- largecap_weekly[,1:4]
lambda <- 0.94
initialWindow <- 150
# volatility estimate of univariate data
vol1 <- EWMA(R[,1], lambda, initialWindow, type="volatility")
plot(vol1)
# covariance estimate of bivariate data
cov1 <- EWMA(R, lambda, initialWindow, type="covariance")
plot(cov1)
# correlation estimate of bivariate data
cor1 <- EWMA(R, lambda, initialWindow, type="correlation")
plot(cor1)
# Multivariate EWMA estimate of covariance
cov_mv <- EWMA(mvR, lambda, initialWindow, type="covariance")
# These two are equivalent
plot(cov_mv, assets=c("ORCL", "MSFT"))
plot(cov_mv, assets=c(1, 2))
# Multivariate EWMA estimate of correlation
cor_mv <- EWMA(mvR, lambda, initialWindow, type="correlation")
# These two are equivalent
plot(cor_mv, assets=c("ORCL", "EMC"))
plot(cor_mv, assets=c(1, 4))
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.