Hi everybody,
I'm currently working on my thesis and I should estimate the correlation between inflation growth and output growth. I have the dlog(gdp) and dlog(cpi) as time series from 1980 to 2012. I have EVIEWS 6.
I would like to ask if there is a way to build a VAR(p)-GARCH(p*,q) model on EVIEWS: seems that the best software is RATS, but I have no idea how to use it.
What I should do is to estimate simultaneously the following
- mean equation: VAR Xt = a + b*X(t-1) + e(t) where X = [inf, out]' matrix
- variance equation: GARCH-BEKK et = c + d*e(t-1) + f(t)
Does anybody have an idea?
Thank you so much!
VAR-GARCH model of inflation and output growth
Moderators: EViews Gareth, EViews Moderator
Re: VAR-GARCH model of inflation and output growth
You can define the VAR part as a system and then estimate the model with ARCH method choosing diagonal BEKK specification. You'll have the parameter estimates, but, unlike the VAR object, you will not be able to generate impulse responses built-in.
Re: VAR-GARCH model of inflation and output growth
unfortunately seems that is not possible.
Step by step, I do:
1) a VAR system with inflation and output growth as endogenous variables, with p lags.
Estimation Proc:
===============================
LS 1 2 INF Y @ C
VAR Model:
===============================
INF = C(1,1)*INF(-1) + C(1,2)*INF(-2) + C(1,3)*Y(-1) + C(1,4)*Y(-2) + C(1,5)
Y = C(2,1)*INF(-1) + C(2,2)*INF(-2) + C(2,3)*Y(-1) + C(2,4)*Y(-2) + C(2,5)
2) proc > make a system ordered by variable > estimate > garch BEKK model
INF = C(1)*INF(-1) + C(2)*INF(-2) + C(3)*Y(-1) + C(4)*Y(-2) + C(5)
Y = C(6)*INF(-1) + C(7)*INF(-2) + C(8)*Y(-1) + C(9)*Y(-2) + C(10)
the output is: "contemporaneous variables not allowed on right side of equation".
Can you please help me? I'm just fighting with this problem since months.
Step by step, I do:
1) a VAR system with inflation and output growth as endogenous variables, with p lags.
Estimation Proc:
===============================
LS 1 2 INF Y @ C
VAR Model:
===============================
INF = C(1,1)*INF(-1) + C(1,2)*INF(-2) + C(1,3)*Y(-1) + C(1,4)*Y(-2) + C(1,5)
Y = C(2,1)*INF(-1) + C(2,2)*INF(-2) + C(2,3)*Y(-1) + C(2,4)*Y(-2) + C(2,5)
2) proc > make a system ordered by variable > estimate > garch BEKK model
INF = C(1)*INF(-1) + C(2)*INF(-2) + C(3)*Y(-1) + C(4)*Y(-2) + C(5)
Y = C(6)*INF(-1) + C(7)*INF(-2) + C(8)*Y(-1) + C(9)*Y(-2) + C(10)
the output is: "contemporaneous variables not allowed on right side of equation".
Can you please help me? I'm just fighting with this problem since months.
Re: VAR-GARCH model of inflation and output growth
Nothing seems wrong with those steps. There may be an issue specific to the version 6, but I am not sure.
Run the following code from within a program window (File-New-Program) or execute them one at a time from the command window:
If the problem continues, then you can estimate the model in two steps: first VAR, and then apply BEKK to the residuals.
Run the following code from within a program window (File-New-Program) or execute them one at a time from the command window:
Code: Select all
group yvar.add inf y
var meaneq.ls 1 2 yvar
meaneq.makesystem(n=vareq)
vareq.arch(deriv=aa) @diagbekk c(indef) arch(1,diag) garch(1,diag)
If the problem continues, then you can estimate the model in two steps: first VAR, and then apply BEKK to the residuals.
Re: VAR-GARCH model of inflation and output growth
I'm currently using EVIEWS 8 and I replaced your codes. The result is always the same "contemporaneous variables not allowed on right side of equation".
Do you think that doing a garch-bekk on residuals is an equivalent way of estimating the model?
Thank you so much.
Do you think that doing a garch-bekk on residuals is an equivalent way of estimating the model?
Thank you so much.
- Attachments
-
- garchtest.WF1
- (12.13 KiB) Downloaded 670 times
Re: VAR-GARCH model of inflation and output growth
Code works fine with me. Could you please check the build date of your copy of EViews (Help-->About Eviews) and update if it is outdated? http://www.eviews.com/download/download.html
Results will not be identical, but yes you can estimate it in two steps. There is really nothing special or complicated about this type of models.
Results will not be identical, but yes you can estimate it in two steps. There is really nothing special or complicated about this type of models.
Re: VAR-GARCH model of inflation and output growth
it was outdated!
THANKS A MILLION!!!
THANKS A MILLION!!!
Re: VAR-GARCH model of inflation and output growth
trubador wrote:Nothing seems wrong with those steps. There may be an issue specific to the version 6, but I am not sure.
Run the following code from within a program window (File-New-Program) or execute them one at a time from the command window:Code: Select all
group yvar.add inf y
var meaneq.ls 1 2 yvar
meaneq.makesystem(n=vareq)
vareq.arch(deriv=aa) @diagbekk c(indef) arch(1,diag) garch(1,diag)
If the problem continues, then you can estimate the model in two steps: first VAR, and then apply BEKK to the residuals.
it says INF is not defined. I am new in programming and this is a struggle for me
Re: VAR-GARCH model of inflation and output growth
bvguizar wrote:it says INF is not defined. I am new in programming and this is a struggle for me
That code is specific to the analysis carried out on the variables y and inf. You should use your own variables and adjust the code where necessary. Note that you can also use menus instead (Object->New object->System). Please refer to Help files for more details.
Who is online
Users browsing this forum: No registered users and 52 guests