VAR exogenous variable shock
Posted: Tue Jul 12, 2022 9:23 am
by lotusfr
Hi there,
How to create IRF using exogenous variable shocks such as oil, USGDP and China GDP?
Thanks very much
Rong

- Capture.PNG (11.25 KiB) Viewed 6915 times
Re: VAR exogenous variable shock
Posted: Tue Jul 12, 2022 11:42 am
by random_user
It's possible to do this, but not easy. It can be done by imposing restrictions on the coefficients in the "VAR Restrictions" tab.
Essentially, you need to 1) add the exogenous variables as endogenous variables, and 2) make sure that, for the equation for the exogenous variable, all the lags on the coefficients of the lags of the other variables are forced to be equal to zero, and 3) make sure you either put the exogenous variables first (if you're using a Choleski identification) or impose a zero restriction of zero in the short-run impulse response matrix, such that the structural shocks over other variables don't affect your exogenous variable.
Re: VAR exogenous variable shock
Posted: Wed Jul 13, 2022 1:43 am
by lotusfr
It's possible to do this, but not easy. It can be done by imposing restrictions on the coefficients in the "VAR Restrictions" tab.
Essentially, you need to 1) add the exogenous variables as endogenous variables, and 2) make sure that, for the equation for the exogenous variable, all the lags on the coefficients of the lags of the other variables are forced to be equal to zero, and 3) make sure you either put the exogenous variables first (if you're using a Choleski identification) or impose a zero restriction of zero in the short-run impulse response matrix, such that the structural shocks over other variables don't affect your exogenous variable.
Hi thanks very much.
Could you please provide more details like a screenshot or how to do this using a program?
Re: VAR exogenous variable shock
Posted: Wed Jul 13, 2022 10:42 am
by EViews Matt
Hello,
Depending on what you're after, it may be easier to use a custom impulse vector that matches the effect of the exogenous variable. For example, the following code simulates a one unit shock to the exogenous variable z.
Code: Select all
wfcreate u 100
series x = nrnd
series y = rnd / 5 + .2
series z = rnd
var v.ls 1 2 x @pch(y) @ c z
matrix v_coefs = v.@coefmat
vector impulse = v_coefs.@row(6) ' This row holds the estimated coefficents on z.
v.impulse(imp=user, fname=impulse, se=none)