SVAR batch automation, and impulse response tabulation
Posted: Thu May 13, 2010 1:26 am
I am working with a cumbersome amount of data, and am trying to put together as many batch programs as possible to automate the generation of impulse responses (and, later on, variance decompositions). I have run into a bit of a snag, however, and hope that someone might be able to offer some insight into the problem.
I have multiple time series in a workbook, and would like to write a program that would:
(1) Run VARs on each of the series, and impose short-run restrictions
(2) Generate impulse responses for each VAR
(3) Save the results of the impulse responses into a single matrix/table
For (1), I have written the following, which generates a VAR object for each of the series:
group var_group *
for !i=1 to var_group.@count
%name = var_group.@seriesname(!i)
var {%name}_VAR.ls 1 2 {%name} series01 series02 series03 series04 @
next
Question 1: What is the best way to incorporate the following type of short-run restrictions in the code?
@e1 = C(1)*@u1
@e2 = C(2)*@e1 + C(3)*@u2
@e3 = C(4)*@e1 + C(5)*@e2 + C(6)*@u3
@e4 = C(5)*@e1 + C(6)*@e2 + C(7)*@e3+ C(8)*@u4
For (2) I have begun playing with creating a loop around the following code:
seriesXX.impulse(10, matbyr=seriesXX_impulse) seriesXX @ series02
This creates a table object for each series, containing the impulse response of a seriesXX to an innovation in series02. Great, that's what I want. However:
Question 2: When I open the table object, I get many more columns than I thought I would. One of these corresponds to the impulse response I get when calling up the impulse response graphically by doing point-and-click. What do the other columns correspond to?
Question 3: I am wondering where I should go from here if I want to take the period-by-period impulse response of each SVAR I specified earlier, and put all these numbers into a single table? I haven't been able to figure this out yet, and may yet just resign myself to doing it manually.
Sorry for the rather long question. I'm new to batch programming in E-views, so I apologize if this turns out to be much simpler than I thought.
Thanks very much!
Christian
I have multiple time series in a workbook, and would like to write a program that would:
(1) Run VARs on each of the series, and impose short-run restrictions
(2) Generate impulse responses for each VAR
(3) Save the results of the impulse responses into a single matrix/table
For (1), I have written the following, which generates a VAR object for each of the series:
group var_group *
for !i=1 to var_group.@count
%name = var_group.@seriesname(!i)
var {%name}_VAR.ls 1 2 {%name} series01 series02 series03 series04 @
next
Question 1: What is the best way to incorporate the following type of short-run restrictions in the code?
@e1 = C(1)*@u1
@e2 = C(2)*@e1 + C(3)*@u2
@e3 = C(4)*@e1 + C(5)*@e2 + C(6)*@u3
@e4 = C(5)*@e1 + C(6)*@e2 + C(7)*@e3+ C(8)*@u4
For (2) I have begun playing with creating a loop around the following code:
seriesXX.impulse(10, matbyr=seriesXX_impulse) seriesXX @ series02
This creates a table object for each series, containing the impulse response of a seriesXX to an innovation in series02. Great, that's what I want. However:
Question 2: When I open the table object, I get many more columns than I thought I would. One of these corresponds to the impulse response I get when calling up the impulse response graphically by doing point-and-click. What do the other columns correspond to?
Question 3: I am wondering where I should go from here if I want to take the period-by-period impulse response of each SVAR I specified earlier, and put all these numbers into a single table? I haven't been able to figure this out yet, and may yet just resign myself to doing it manually.
Sorry for the rather long question. I'm new to batch programming in E-views, so I apologize if this turns out to be much simpler than I thought.
Thanks very much!
Christian