dcc_estimation function

This function estimates the parameters(alpha,beta) and time-varying correlation matrices(Rt) of DCC-GARCH model.

This function estimates the parameters(alpha,beta) and time-varying correlation matrices(Rt) of DCC-GARCH model.

dcc_estimation(ini.para = c(0.05, 0.93), ht, residuals, method = c("COV", "LS", "NLS"), ts = 1)

Arguments

  • ini.para: initial DCC-GARCH parameters(alpha,beta) of optimization
  • ht: matrix of conditional variance vectors
  • residuals: matrix of residual(de-mean) returns
  • method: shrinkage method of unconditional correlation matrix(Cov:sample,LS:Linear Shrinkage,NLS:NonLinear Shrinkage)
  • ts: ts how many time series are you taking(dufalut:1 latest value)

Returns

time-varying correlations(Rt) and the result of estimation

Note

Rt are vectorized values of the conditional correlation matrix(Rt) until time t(ts) for each row.

Examples

library(rugarch) library(xdcclarge) #load data data(us_stocks) n<-3 Rtn<-log(us_stocks[-1,1:n]/us_stocks[-nrow(us_stocks),1:n]) # Step 1:GARCH Parameter Estimation with rugarch spec = ugarchspec() mspec = multispec( replicate(spec, n = n) ) fitlist = multifit(multispec = mspec, data = Rtn) ht<-sigma(fitlist)^2 residuals<-residuals(fitlist) # Step 2:DCC-GARCH Parameter Estimation with xdcclarge DCC<-dcc_estimation(ini.para=c(0.05,0.93) ,ht ,residuals) #Time varying correlation matrix Rt at time t (Rt<-matrix(DCC$dcc_Rt,n,n)) ## Not run: #If you want Rt at time t-s,then s<-10 DCC<-dcc_estimation(ini.para=c(0.05,0.93) ,ht ,residuals,ts = s) matrix(DCC$cdcc_Rt[s,],n,n) ## End(Not run)
  • Maintainer: Kei Nakagawa
  • License: GPL (>= 2)
  • Last published: 2018-07-12

Useful links