I am trying to update some old RATS code to run in eViews. The idea is that we loop through all of the series, tracking what the last date was, and store the corresponding estimates from each date. The problem that I run into is in setting the dates:
Code: Select all
%fin = @otod(@ilast(gdp_apr2009))
smpl 1970Q1 %fin
equation eq_bench_test.ls gdp_apr2009 c gdp_apr2009(-1)
'stop
'Initialization - need a series of scalars for each quarter that tracks how many times that has been the last quarter (may be between 2 and 4 revisions for each quarter)
for !yr = 1999 to 2011
for %i jan feb mar apr may jun jul aug sep oct dec
%fin = @otod(@ilast(gdp_{%i}{!yr}))
scalar numlast_{%fin} = 1
next
next
for !yr = 1999 to 2011
for %i jan feb mar apr may jun jul aug sep oct dec
%fin = @otod(@ilast(gdp_{%i}{!yr}))
smpl 1970Q1 %fin
equation eq_bench_{%i}{!yr}.ls gdp_{%i}{!yr} c gdp_{%i}{!yr}(-1)
next
next
I'd like to be able to use the smpl command to store all of the estimated betas in the corresponding end of sample date to create several time series (the first loop helps me to create multiple series for vintages in a given quarter). Does anyone have any experience writing this type of loop?
Many, mank thanks.
EDIT: Forgot to mention that I am using EViews 6.
