Rolling-VAR-MGARCH-M
Re: Rolling-VAR-MGARCH-M
You mean the diagnostics? @MVQSTAT and practically any other testing instruction/procedure in RATS will produce the %CDSTAT and %SIGNIF variables which give the test statistic and significance level. You just need to save what you want into elements of a series.
Re: Rolling-VAR-MGARCH-M
Hi Tom,
I would like to include "test" instruction in each window and save the results in a separate object.
For example,
test(zeros,title="No GARCH aij=bij=dij=0")
# 26 27 28 29 30 31 32 33
The above command should be repeated for each window and saved when iterations are completed.
Any guidance is much appreciated.
Thank you
I would like to include "test" instruction in each window and save the results in a separate object.
For example,
test(zeros,title="No GARCH aij=bij=dij=0")
# 26 27 28 29 30 31 32 33
The above command should be repeated for each window and saved when iterations are completed.
Any guidance is much appreciated.
Thank you
Re: Rolling-VAR-MGARCH-M
TEST also produces %CDSTAT and %SIGNIF, so you can save those just like you do the diagnostics---just make sure you save each immediately after it's calculated.
Re: Rolling-VAR-MGARCH-M
It looks we can include ONLY one "test" instruction:
For example, we can't conduct the following two tests in the same iterations.
test1:
test(zeros, title="No GARCH aij=bij=0")
# 23 24 25 24
and
test2:
test(zeros, title="Diagonal VAR in the mean")
# 3 13 5 15 7
I feel if I include second test which perhaps overwrites the first one.
Nevertheless, %CDSTAT and %SIGNIF are working fine if I use them only once.
Regards
For example, we can't conduct the following two tests in the same iterations.
test1:
test(zeros, title="No GARCH aij=bij=0")
# 23 24 25 24
and
test2:
test(zeros, title="Diagonal VAR in the mean")
# 3 13 5 15 7
I feel if I include second test which perhaps overwrites the first one.
Nevertheless, %CDSTAT and %SIGNIF are working fine if I use them only once.
Regards
Re: Rolling-VAR-MGARCH-M
Just use different series for the results of each test. Save the results of the first test before going on to the second.
Re: Rolling-VAR-MGARCH-M
Hi Tom,
As far as I know, so far "distrib" has three options (i.e., norm, t, and GED) for most of MGARCH models in RATS. Has there been any development in this area? Now multivariate skew t is becoming more popular in the literature. Will that be available to estimate MGARCH models in RATS?
Thank you
As far as I know, so far "distrib" has three options (i.e., norm, t, and GED) for most of MGARCH models in RATS. Has there been any development in this area? Now multivariate skew t is becoming more popular in the literature. Will that be available to estimate MGARCH models in RATS?
Thank you
Re: Rolling-VAR-MGARCH-M
We've had the Bauwens-Laurent example for at least seven years.
Re: Rolling-VAR-MGARCH-M
Thank you for your info.
Would that be possible to incorporate multivariate skew t in the estimations within the loop?
Would that be possible to incorporate multivariate skew t in the estimations within the loop?
Re: Rolling-VAR-MGARCH-M
Sure. Have you looked at the newer version of the program? It just uses a GARCH instruction with slightly different options. Whether doing that with a rolling window is a good idea is a completely different question.
Re: Rolling-VAR-MGARCH-M
Hi Tom,
In the code below, I would like to estimate MGARCH-M-skew t model through the expanding windows.
However, RATS keeps generating the following error message.
I would be appreciated if you could help me on this issue.
Regards
In the code below, I would like to estimate MGARCH-M-skew t model through the expanding windows.
However, RATS keeps generating the following error message.
Code: Select all
## SX4. Expected Blank or Tab Here
>>>>2<<<<
Regards
Code: Select all
*
OPEN DATA "Data.txt"
CALENDAR(D) 2008:3:25
DATA(FORMAT=PRN,ORG=COLUMNS,DATEFORM="d/m/y") 2008:03:25 2019:07:31 Date var1 var2 var3
*
set rvar1 = 100.0*(log(var1)-log(var1{1}))
set rvar2 = 100.0*(log(var2)-log(var2{1}))
set rvar3 = 100.0*(log(var3)-log(var3{1}))
*
source logmvskewt.src
*
dec vect[series] sqrth(3)
dec vect[series] eps(3)
dec symm[series] hhs(3,3)
clear(zeros) hhs
*
compute n=3
*
dec vector logxi(n)
nonlin(parmset=skewparms) nu logxi
*
compute logxi=%zeros(n,1)
compute nu=10.0
*
function logmvskewtfnc h u
type real logmvskewtfnc
type symm h
type vect u
*
compute logmvskewtfnc=$
%logmvskewt(inv(%decomp(h))*u,%exp(logxi),nu)-.5*%logdetxx(h)
end
*
do regend = 2013:12:25, 2019:07:31, 5
*
equation var1_eq rvar1
# constant sqrth(1) sqrth(2) sqrth(3) rvar1{1} rvar2{1} rvar3{1}
equation rvar2_eq rvar2
# constant sqrth(1) sqrth(2) sqrth(3) rvar1{1} rvar2{1} rvar3{1}
equation rvar3_eq rvar3
# constant sqrth(1) sqrth(2) sqrth(3) rvar1{1} rvar2{1} rvar3{1}
*
group varmah var1_eq rvar2_eq rvar3_eq
*
clear(zeros) sqrth eps
*
do iters=1,3
estimate(model=varmah,resids=resids)
set eps(1) %regstart() * = resids(1)
set eps(2) %regstart() * = resids(2)
set eps(3) %regstart() * = resids(3)
end do iters
*
compute cv0=%sigma
*
garch(model=varmah, mv=bekk, asymmetric, robust, rvectors=rv, hmatrices=hh, mvhseries=hhs, pmethod=simplex, piters=15, cvcrit=0.0001, iters=1000, stdresids=zu,$
parmset=skewparms, density=logmvskewtfnc, uadjust=%pt(eps,t,rv(t)),hadjust=%(sqrth(1)=sqrt(hhs(1,1)), sqrth(2)=sqrt(hhs(2,2)), sqrth(3)=sqrt(hhs(3,3))))$
2008:03:25 regend rvar1 rvar2 rvar3
*
compute loglskew=%logl
*
end do regend
Last edited by hasanov on Wed Nov 13, 2019 10:03 pm, edited 1 time in total.
Re: Rolling-VAR-MGARCH-M
Add a space between the )))) and $ on this:
hadjust=%(sqrth(1)=sqrt(hhs(1,1)), sqrth(2)=sqrt(hhs(2,2)), sqrth(3)=sqrt(hhs(3,3))))$
hadjust=%(sqrth(1)=sqrt(hhs(1,1)), sqrth(2)=sqrt(hhs(2,2)), sqrth(3)=sqrt(hhs(3,3))))$
Re: Rolling-VAR-MGARCH-M
Thank you very much !! It is fine now.
Just want you to clarify one more stuff.
The chunk of code for skew t given below: should it be within or out of the loop (i.e., "do regend = 2013:12:25, 2019:07:31, 5 .... end do regend" ). In the current code, I placed it before starting the loop. Would that be fine?
Just want you to clarify one more stuff.
The chunk of code for skew t given below: should it be within or out of the loop (i.e., "do regend = 2013:12:25, 2019:07:31, 5 .... end do regend" ). In the current code, I placed it before starting the loop. Would that be fine?
Code: Select all
dec vector logxi(n)
nonlin(parmset=skewparms) nu logxi
*
compute logxi=%zeros(n,1)
compute nu=10.0
*
function logmvskewtfnc h u
type real logmvskewtfnc
type symm h
type vect u
*
compute logmvskewtfnc=$
%logmvskewt(inv(%decomp(h))*u,%exp(logxi),nu)-.5*%logdetxx(h)
end
Re: Rolling-VAR-MGARCH-M
It has to be outside.
Re: Rolling-VAR-MGARCH-M
Hi Tom,
As you mentioned in one of your posts:
@mvqstat(lags=5)
# zu
@mvqstat(lags=5)
# zu^2
Thank you
As you mentioned in one of your posts:
@mvqstat(lags=5)
# zu
How to apply this procedure to the squared standardized residuals? Following arrangement definitely does not work because zu is a vector of standardized residuals.TomDoan wrote: ...@MVQSTAT applied to the jointly standardized residuals...
@mvqstat(lags=5)
# zu^2
Thank you
Re: Rolling-VAR-MGARCH-M
You don't. You use @MVARCHTEST applied to the standardized residuals (which handles the cross products). Multivariate GARCH diagnostics are described in the User's Guide.