Hello,
I am trying to estimate a 3 variable SVAR of the effects of oil price shocks on macroeconomic fluctuations as in "BJØRNLAND, H. C. (2000). The dynamic effects of aggregate demand, supply and oil price shocks - a comparative study. The Manchester School of Economic Studies, 68, pp. 578–607".
Identification is achieved by symmetry in the co-variance matrix which gives off six restrictions, one comes from assuming as in Blanchard and Quah that agg. demand has no LR effect on output however, real oil price shocks are allowed to affect output in the long run. The other two are zero short-run restrictions on oil prices which forces the contemporaneous effects of demand and supply shocks on real oil prices to be zero, allowing only oil price shocks will contemporaneously affect oil prices. However, after a period (one quarter), both demand and supply shocks are free to influence oil prices.
Following the RATS manual I came up with the following after the preliminary tests and all
Code: Select all
compute neqn = 3
compute nlags = 2
compute nsteps = 24
******************************************************************************************************
* ONE: SET UP VAR
*******************************************************************************************************
system(model=cansvar)
variables can_ur d_l_oilp_can d_l_can_gdp
lags 1 to nlags
det constant
end(system)
***********************************************************************************************
* TWO:ESTIMATE VAR
***********************************************************************************************
estimate(print,resids=varresidscan)
compute masums=inv(%varlagsums)
dec rect lr(3,3)
dec rect sr(3,3)
input sr
. . .
0 . 0
. . .
input lr
0 . .
. . .
. . .
@ShortAndLong(sr=sr,lr=lr,masum=masums) %sigma f
disp ###.### "Impact Responses" f
disp ###.### "Long run Responses" masums*f
@StructResids(factor=f) varresidscan 1970:01 2010:04 castrshocs
*********************************************************************************************************
*THREE: TO GENERATE IMPULSE RESPONSE FUNCTIONS
*********************************************************************************************************
dec vect[strings] shocklabels varlabels
compute shocklabels=||"Aggregate demand","Oil","Aggregate Supply"||
compute varlabels=||"Output","Oil Prices","Unemployment rate"||
dec vect[strings] shocklabels varlabels
@VARIRF(model=cansvar,steps=nsteps,factor=f,page=byshocks,$
shocks=shocklabels,varlabels=varlabels)
@VARIRF(model=cansvar,steps=nsteps,factor=f,$
shocks=shocklabels,varlabels=varlabels,page=byvariables)
**********************************************************************
*FOUR: IRF MATRICES
**********************************************************************
list ieqn = 1 to neqn
smpl 1 nsteps
declare rect[series] impblk(neqn,neqn)
declare vect[series] scaled(neqn)
declare vect[strings] implabel(neqn)
impulse(model=cansvar,result=impblk,noprint,$
steps=nsteps,factor=f)
****************************************************************************************************************
*FIVE: GRAPHING RESPONSE OF ALL VARIABLES TO A SINGLE VARIABLE
****************************************************************************************************************
do i=1,neqn
compute header="Plot of responses to "+implabel(i)
do j=1,neqn
set scaled(j) = (impblk(j,i))/sqrt(%sigma(j,j))
end do j
graph(header=header,key=below,klabels=implabel,number=0) neqn
cards scaled(ieqn)
end do i
*******************************************************************************************************************
*SIX: GRAPHING RESPONSE OF A VARIABLE TO ALL SHOCKS
*******************************************************************************************************************
do i=1,neqn
compute header="Plot of responses of "+implabel(i)
graph(header=header,key=below,klabels=implabel,number=0) neqn
cards impblk(i,ieqn)
end do i
*******************************************************************************************
*SEVEN: VARIANCE DECOMPOSITION
*******************************************************************************************
errors(factor=f,model=cansvar,steps=nsteps,window="CModel",$
labels=||"Aggregate Demand","Oil","Aggregate Supply"||)
I have run the code however, I would like to ask the following questions:
1) Are my restrictions for identification as stated above correct with regards to my allocations of zeros in the LR and SR matrices?
2) My graphs are nameless when I try to carry out the procedure 5 & 6, is my procedure wrong and how do I rectify that?
3) In the structural example above, I see an accumulate = ||1,2,3|| what function does this perform?
Many thanks,