Hello Statalist,
I have a question: I'm trying to fit the following model:
r=a0+ a1 Var(eta_t-1) + e_t
e_t=(1+ Oct - Jan)* eta_t-----> where Oct and Jan are October and January dummies-
ln(H_t) = B0 +B1 (eta_t-1)/Sqrt(Ht_1) + kappa [(eta_ti-1)/sqrt(H_t-1)] * I + B2 Monday +B3 ln (H_t-1)
where B0,B1, B2, B3 are coefficients and kappa is the Asymmetric coefficient.
I is a dummy variable that equals to 1 if e>0 , and Monday is monday dummy
so basically this is some modified version of Nelson's eGARCH, with some arch-in-mean term, however, Nelson's eGARCH in Stata follows the following the equation:
ln(H_t) = B0 +B1 (eta_t-1)/Sqrt(Ht_1) + kappa [|eta_ti-1|/sqrt(H_t-1)] + B2 Monday +B3 ln (H_t-1)---> basically Nelson doesn't have "I", so there is no special treatment for non-negative errors.
and he has the Absolute values.
I tried to modify that in several ways, the code is running but my ARCHm term is so missed up. the following is my entire code:
///////////////////////////////////////////
////////The Code/////////////////
///////////////////////////////////////
generate byte monday = dow(date) == 1
gen month = month(date)
gen oct = 1 if month == 10
replace oct=0 if oct==.
gen jan = 1 if month == 1
replace jan=0 if jan==.
gen dum = 1+oct-jan
arch Return if extract==1, archm archmexp(dum*X) arch0(xb0) arch (1/1) distribution(norm)
predict e, residuals
gen eta = e/dum
gen eta2= eta^2
gen I = 1 if e>0
replace I =0 if I ==.
//Nelson (1991)
arch Return monday if extract==1, egarch(1/1) earch(1/1) archm archmexp(dum*X) arch0(xb0) nolog
arch Return monday if extract==1, egarch(1/1) earch(1/1) archm archmexp(X*I) arch0(xb0) nolog
arch Return monday if extract==1, garch(1/1) arch(1/1) tarch(1/1) archm archmexp(abs(eta2[_n-1])/sqrt(log(X[_n-1]))) arch0(xb0) het(monday) nolog
arch Return if extract==1, egarch(1/1) earch(1/1) archm archmexp((I/abs(e[_n-1]))*eta2[_n-1]*X) arch0(xb0) het(monday) nolog
//////////////////////////////////////////////////////
As you can see I tried several specifications, whether to modify the eGARCH directly or to modify the GJR-GARCH since this specification identifies the asymmetric term by using a dummy variable for good news (e>0).----> so basically I trying to do a little of both.
any Help or advice will be highly appreciated
Sarah
I have a question: I'm trying to fit the following model:
r=a0+ a1 Var(eta_t-1) + e_t
e_t=(1+ Oct - Jan)* eta_t-----> where Oct and Jan are October and January dummies-
ln(H_t) = B0 +B1 (eta_t-1)/Sqrt(Ht_1) + kappa [(eta_ti-1)/sqrt(H_t-1)] * I + B2 Monday +B3 ln (H_t-1)
where B0,B1, B2, B3 are coefficients and kappa is the Asymmetric coefficient.
I is a dummy variable that equals to 1 if e>0 , and Monday is monday dummy
so basically this is some modified version of Nelson's eGARCH, with some arch-in-mean term, however, Nelson's eGARCH in Stata follows the following the equation:
ln(H_t) = B0 +B1 (eta_t-1)/Sqrt(Ht_1) + kappa [|eta_ti-1|/sqrt(H_t-1)] + B2 Monday +B3 ln (H_t-1)---> basically Nelson doesn't have "I", so there is no special treatment for non-negative errors.
and he has the Absolute values.
I tried to modify that in several ways, the code is running but my ARCHm term is so missed up. the following is my entire code:
///////////////////////////////////////////
////////The Code/////////////////
///////////////////////////////////////
generate byte monday = dow(date) == 1
gen month = month(date)
gen oct = 1 if month == 10
replace oct=0 if oct==.
gen jan = 1 if month == 1
replace jan=0 if jan==.
gen dum = 1+oct-jan
arch Return if extract==1, archm archmexp(dum*X) arch0(xb0) arch (1/1) distribution(norm)
predict e, residuals
gen eta = e/dum
gen eta2= eta^2
gen I = 1 if e>0
replace I =0 if I ==.
//Nelson (1991)
arch Return monday if extract==1, egarch(1/1) earch(1/1) archm archmexp(dum*X) arch0(xb0) nolog
arch Return monday if extract==1, egarch(1/1) earch(1/1) archm archmexp(X*I) arch0(xb0) nolog
arch Return monday if extract==1, garch(1/1) arch(1/1) tarch(1/1) archm archmexp(abs(eta2[_n-1])/sqrt(log(X[_n-1]))) arch0(xb0) het(monday) nolog
arch Return if extract==1, egarch(1/1) earch(1/1) archm archmexp((I/abs(e[_n-1]))*eta2[_n-1]*X) arch0(xb0) het(monday) nolog
//////////////////////////////////////////////////////
As you can see I tried several specifications, whether to modify the eGARCH directly or to modify the GJR-GARCH since this specification identifies the asymmetric term by using a dummy variable for good news (e>0).----> so basically I trying to do a little of both.
any Help or advice will be highly appreciated
Sarah