ANST-garch estimation
Posted: Wed Nov 05, 2014 8:52 pm
Dear Sir/Madam,
Recently, I tried modifying my old anst-garch model into a new version in order to run the forecasting programme, which is a bivariate anst-garch with BEKK specification, and I included two period lagged terms(t-1,t-2) in the mean equation. When maximising the log likelihood function, I got the error message
' ## SR10. Missing Values And/Or SMPL Options Leave No Usable Data Point' .
Can anyone help me with this, please?
Recently, I tried modifying my old anst-garch model into a new version in order to run the forecasting programme, which is a bivariate anst-garch with BEKK specification, and I included two period lagged terms(t-1,t-2) in the mean equation. When maximising the log likelihood function, I got the error message
' ## SR10. Missing Values And/Or SMPL Options Leave No Usable Data Point' .
Can anyone help me with this, please?
Code: Select all
compute n=2
compute gstart = 1,gend = 1678
compute lag = 4, step = 123
linreg LSP gstart gend-step ECTEQ
# constant LF1M
*
* Run preliminary VAR(1) to get estimates of residuals
*
linreg Y gstart+LAG-2 gend-step u1
# constant Y{1} X{1} Y{2} X{2} ecteq{1}
*set u1 = u(1)^2
linreg X gstart+LAG-2 gend-step u2
# constant Y{1} X{1} Y{2} X{2} ecteq{1}
*set u2 = u(2)^2
*
linreg dLSP gstart+LAG-2 gend-step ress
# constant dLSP{1} DLF1M{1} dLSP{2} dLF1M{2} u1 u2 ecteq{1}
compute CS1=%beta(1),$
TS11S=%beta(2),$
TS21S=%beta(3),$
TS11F=%beta(4),$
TS21F=%beta(5),$
FS1S=%beta(6),$
FS1F=%beta(7),$
ECS=%beta(8)
set rs = ress
set fs = (1-exp(-50*rs{1}))^(-1)
VCV(MATRIX=COVM)
# ress
COMPUTE U11STORE=COVM(1,1)
set HS = (covm(1,1))
linreg dLF1M gstart+LAG-2 gend-step resf
# constant dLSP{1} dLF1M{1} dLSP{2} dLF1M{2} u1 u2 ecteq{1}
compute CF1=%beta(1),$
TF11S=%beta(2),$
TF21S=%beta(3),$
TF11F=%beta(4),$
TF21F=%beta(5),$
FF1S=%beta(6),$
FF1F=%beta(7),$
ECF=%beta(8)
set rf = resf
set ff = (1-exp(-50*rf{1}))^(-1)
VCV(MATRIX=COVM)
# resf
COMPUTE U22STORE=COVM(1,1)
set HF = (covm(1,1))
VCV(MATRIX=www)
# ress resf
COMPUTE U21STORE=COVM(1,2)
set HSF = covm(1,2)
COM CORR=%corr(ress,resf)
SET rho = CORR
nonlin(parmset=standmeans) ECS CS1 CS2 CS3 TS11S TS21S TS11F TS21F TS12S TS22S TS12F TS22F TS13S TS23S TS13F TS23F FS1S FS1F FS2S FS2F FS3S FS3F
nonlin(parmset=standmeanf) ECF CF1 CF2 CF3 TF11S TF21S TF11F TF21F TF12S TF22S TF12F TF22F TF13S TF23S TF13F TF23F FF1S FF1F FF2S FF2F FF3S FF3F
nonlin(parmset=transmean) L
nonlin(parmset=standgarch) A011 A012 A022 A111 A112 A121 A122 A211 A212 A221 A222 B011 B012 B022 B111 B112 B121 B122 B211 B212 B221 B222 D011 D012 D022 D111 D112 D121 D122 D211 D212 D221 D222
*
frml anst = $
Rs = Y - ECS*ECTEQ{1}-CS1-CS2*fs-CS3*ff $
-TS11S*Y{1}-TS21S*Y{2}-TS11F*X{1}-TS21F*X{1} $
-fs*(TS12S*Y{1}-TS22S*Y{2}-TS12F*X{1}-TS22F*X{1})$
-ff*(TS13S*Y{1}-TS23S*Y{2}-TS13F*X{1}-TS23F*X{1})$
-FS1S*sqrt(hs)-FS1F*sqrt(hf) $
-(FS2S*sqrt(hs)-FS2F*sqrt(hf))*fs $
-(FS3S*sqrt(hs)-FS3F*sqrt(hf))*ff,$
Rf = X - ECF*ECTEQ{1}-CF1-CF2*fs-CF3*ff $
-TF11S*Y{1}-TF21S*Y{2}-TF11F*X{1}-TF21F*X{1} $
-fs*(TF12S*Y{1}-TF22S*Y{2}-TF12F*X{1}-TF22F*X{1}) $
-ff*(TF13S*Y{1}-TF23S*Y{2}-TF13F*X{1}-TF23F*X{1}) $
-FF1S*sqrt(hs)-FF1F*sqrt(hf) $
-(FF2S*sqrt(hs)-FF2F*sqrt(hf))*fs $
-(FF3S*sqrt(hs)-FF3F*sqrt(hf))*ff, $
[sym]Var=||HS(t-1)|HSF(t-1),HF(t-1)||, $
A0 = ||A011,A012|0.0,A022||,$
A1 = ||A111,A112|A121,A122||,$
A2 = ||A211,A212|A221,A222||,$
B0 = ||B011,A012|0.0,B022||,$
B1 = ||B111,A112|B121,B122||,$
B2 = ||B211,A212|B221,B222||,$
D0 = ||D011,D012|0.0,D022||,$
D1 = ||D111,D112|D121,D122||,$
D2 = ||D211,D212|D221,D222||,$
RRA = ||ress(t-1),resf(t-1)||*A1,$
RRB = ||ress(t-1),resf(t-1)||*B1,$
RRD = ||ress(t-1),resf(t-1)||*D1,$
[sym]G = TR(A0)*A0 + %MQFORM(VAR,A2) +TR(RRA)*RRA+fs*(TR(B0)*B0 + %MQFORM(VAR,B2) +TR(RRB)*RRB)+ff*(TR(D0)*D0 + %MQFORM(VAR,D2) +TR(RRD)*RRD), $
HS = G(1,1),HF = G(2,2),HSF = G(1,2),$
rho = HSF/sqrt(HS*HF),$
fs = 1/(1-exp(-1*L*Rs{1})),ff(t) = 1/(1-exp(-1*L*Rf{1})),$
ll = %logdensity(||HS,HSF|HSF,HF||,||Rs,Rf||),$
(ress(t)=Rs(t)),$
(resf(t)=Rf(t)),$
ll
comp WWW=%decomp(www)
compute L = 50
comp A011=WWW(1,1),A012=WWW(1,2),A022=WWW(2,2)
comp A111=0.02,A112=0.02,A121=0.02,A122=0.02
comp A211=0.70,A212=0.70,A221=0.70,A222=0.70
comp B011=WWW(1,1),B012=WWW(1,2),B022=WWW(2,2)
comp B111=0.01,B112=0.01,B121=0.01,B122=0.01
comp B211=0.10,B212=0.10,B221=0.10,B222=0.10
comp D011=WWW(1,1),D012=WWW(1,2), D022=WWW(2,2)
comp D111=0.01,D112=0.01,D121=0.01,D122=0.01
comp D211=0.10,D212=0.10,D221=0.10,D222=0.10
maximize(trace,parmset=standmeans+standmeanf+standgarch,pmethod=simplex,piters=10,method=bfgs,iters=10) anst gstart+lag gend-step
maximize(trace,parmset=standmeans+standmeanf+transmean+standgarch,pmethod=bfgs,piters=10,method=bfgs,iters=4000,subiters=200,CVCRIT=0.0000000000000000001) anst gstart+lag gend-step