plot.EWMA: Plot EWMA Model Estimates

Description Usage Arguments Author(s) Examples

Description

Plot method for EWMA objects.

Usage

1
2
3
## S3 method for class 'EWMA'
plot(x, y = NULL, ..., assets = c(1, 2), legendLoc = NULL,
  main = "EWMA Estimate", legendCex = 0.8)

Arguments

x

an EWMA object created via EWMA.

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 plot.xts.

Author(s)

Ross Bennett

Examples

 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))

GARPFRM documentation built on May 2, 2019, 5:45 p.m.

Related to plot.EWMA in GARPFRM...