plot_dccmidas: Plot method for 'dccmidas' class

Description Usage Arguments Value Examples

View source: R/functions.R

Description

Plots of the conditional volatilities on the main diagonal and of the conditional correlations on the extra-diagonal elements.

Usage

1
2
3
4
5
6
7
8
9
plot_dccmidas(
  x,
  K_c = NULL,
  vol_col = "black",
  long_run_col = "red",
  cex_axis = 0.75,
  LWD = 2,
  asset_sub = NULL
)

Arguments

x

An object of class 'dccmidas', that is the result of a call to dcc_fit.

K_c

optional Number of (lagged) realizations to use for the long-run correlation, , if 'corr_model' is "DCCMIDAS"

vol_col

optional Color of the volatility and correlation plots. "black" by default

long_run_col

optional Color of the long-run correlation plots, if present. "red" by default

cex_axis

optional Size of the x-axis. Default to 0.75

LWD

optional Width of the plotted lines. Default to 2

asset_sub

optional Numeric vector of selected assets to consider for the plot. NULL by default

Value

No return value, called for side effects

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
require(xts)
# open to close daily log-returns
r_t_s<-log(sp500['2010/2019'][,3])-log(sp500['2010/2019'][,1])
r_t_n<-log(nasdaq['2010/2019'][,3])-log(nasdaq['2010/2019'][,1])
r_t_f<-log(ftse100['2010/2019'][,3])-log(ftse100['2010/2019'][,1])
db_m<-merge.xts(r_t_s,r_t_n,r_t_f)
db_m<-db_m[complete.cases(db_m),]
colnames(db_m)<-c("S&P500","NASDAQ","FTSE100")
# list of returns
r_t<-list(db_m[,1],db_m[,2],db_m[,3])
# estimation
K_c<-144
N_c<-36
cdcc_est<-dcc_fit(r_t,univ_model="sGARCH",distribution="norm",
corr_model="DCCMIDAS",N_c=N_c,K_c=K_c)
plot_dccmidas(cdcc_est,K_c=144)

dccmidas documentation built on March 15, 2021, 5:08 p.m.