I use Tsay's "Analysis of Financial Time Series" to create DCC MGARCH models by hand (for a better understanding).
I closely follow the examples in the book, but there is one question left for me. I attached the code from the trivaria example in the book
(via Choleki decomposition), only modified in terms of my three time series. The code works fine.
But: I can choose/calculate nearly all starting "guesses" from the unconditional covariance matrix and from the mean equation (which is a VAR(2) in this case) except
the coefficients for the dynamic covariance part. I.e. the t0 t1 t2, u0 u1 u2, z0 z1 z2.
Is there an "status quo" for this setting? Or is it just typing anything and hoping that the BFGS or BHHH algorithm works?
And, I observed that the BHHH algorithm fails more often than the BFGS.
Does there an explanation exist? Because the literature often proposes the BHHH?
Code: Select all
data(format=xls, org = columns) / x1 x2 x3
set h1 = 0.14
set h2 = 0.21
set h3 = 0.0021
set q21 = -0.129
set q31 = 0.016
set q32 = 0.002
nonlin a0 b0 d0 u0 z0 a1 b1 d1 u1 z1 a2 b2 d2 u2 z2 $
o0 o00 o000 o1 o11 o111 o2 o22 o222 o3 o33 o333 o4 o44 o444 o5 o55 o555 o6 o66 o666 $
t0 t1 t2
frml a1t = x2(t) - o0 - o1*x1{1} - o2*x1{2} - o3*x2{1} - o4*x2{2} - o5*x3{1} - o6*x3{2}
frml a2t = x1(t) - o00 - o11*x2{1} - o22*x2{2} - o33*x2{1} - o44*x2{2} - o55*x3{1} - o66*x3{2}
frml a3t = x3(t) - o000 - o111*x1{1} - o222*x1{2} - o333*x2{1} - o444*x2{2} - o555*x3{1} - o666*x3{2}
frml v1 = a0+a1*a1t(t-1)**2+a2*h1(t-1)
frml q1t = t0 + t1*q21(t-1) + t2*a2t(t-1)
frml bt = a2t(t) - (q21(t)=q1t(t))*a1t(t)
frml v2 = b0+b1*bt(t-1)**2+b2*h2(t-1)
frml q2t = u0 + u1*q31(t-1) + u2*a3t(t-1)
frml q3t = z0 + z1*q32(t-1) + z2*a2t(t-1)
frml b1t = a3t(t)-(q31(t)=q2t(t))*a1t(t)-(q32(t)=q3t(t))*bt(t)
frml v3 = d0+d1*b1t(t-1)**2+d2*h3(t-1)
frml gdet = -0.5*(log(h1(t) = v1(t))+ log(h2(t)=v2(t))+log(h3(t)=v3(t)))
frml garchln = gdet-0.5*(a1t(t)**2/h1(t)+bt(t)**2/h2(t)+b1t(t)**2/h3(t))
smpl 8 521
compute a0 = 0.005, b0 = 0.005, d0 = 0.005, a1 = 0.4, b1 = 0.4, d1 = 0.4, a2 = 0.6, b2 = 0.6, d2 = 0.6
compute o0 = 0.135, o1 = -0.34, o2 = -0.002, o3 = 0.885, o4 = 0.19, o5 = 1.32, o6 = -0.34
compute o00 = 0.171, o11 = 0.128, o22 = -2.657, o33 = 1.21, o44 = -0.29, o55 = -0.02, o66 = 0.002
compute o000 = 0.008, o111 = 0.016, o222 = -0.017, o333 = 0.269, o444 = -0.133, o555 = 0.016, o666 = -0.02
compute u0 = 0.01, u1 = -0.08, u2 = 0.25, z0 = 0, z1 = 0.15, z2=-0.009, t0 = 0.005, t1 = 0.63, t2 = 0.13
nlpar(criterion=value,cvcrit=0.00001)
maximize(method=bfgs,recursive,iterations=250) garchln