cdcc_estimation: This function estimates the parameters(alpha,beta) and...

Description Usage Arguments Value Note Examples

Description

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

Usage

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

Arguments

ini.para

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

Value

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

 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
  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:cDCC-GARCH Parameter Estimation with xdcclarge
  cDCC<-cdcc_estimation(ini.para=c(0.05,0.93) ,ht ,residuals)
  #Time varying correlation matrix Rt at time t
  (Rt<-matrix(cDCC$cdcc_Rt,n,n))

  ## Not run: 
  #If you want Rt at time t-s,then
  s<-10
  cDCC<-cdcc_estimation(ini.para=c(0.05,0.93) ,ht ,residuals,ts = s)
  matrix(cDCC$cdcc_Rt[s,],n,n)
  
## End(Not run)
  

xdcclarge documentation built on May 2, 2019, 12:40 p.m.