Page 1 of 1

IRF FOR GARCH BEKK MODEL

Posted: Sun Oct 30, 2022 8:57 pm
by irfansystem
Hi Tom,

I am trying to get Impulse Response Functions following the code in your GARCH course.

** IRF
@MVGARCHtoVECH(mv=bekk)
eigen(cvalues=cv) %%vech_a+%%vech_b
disp "Eigenvalues from BEKK-t" *.### cv

* VIRF with historical incidents
* Ref from Tom's replication
* sstats(max) / %if(date==920916,t,0)>>xblackwed $
* %if(date==930802,t,0)>>xecpolicy
* compute blackwed=fix(xblackwed),ecpolicy=fix(xecpolicy)


* Define shock months
sstats(max) / %if(date==200707,t,0)>>xgfc $
%if(date==202202,t,0)>>xruconf
compute gfc=fix(xgfc),ruconflict=fix(xruconf)

This is giving me error. I have monthly data, not sure I am using correct syntax here.

Here is the error.
## SX11. Identifier DATE is Not Recognizable. Incorrect Option Field or Parameter Order?
>>>>s(max) / %if(date==<<<<
If the name isn't mistyped, it's possible that you have a poorly formatted instruction
Common errors are
* a space before the ( in an option field
* a missing space before = in a SET or FRML
* a missing $ at the end of a long line which continues to the next


Please help.

Thank you.

Re: IRF FOR GARCH BEKK MODEL

Posted: Mon Oct 31, 2022 9:04 pm
by TomDoan
The DATE calculations are specific to that data set---it had an irregular daily data set (and was written before "mapped" dates were added). With monthly data, you can just use standard dates (year:month) to identify the time periods.