What I want to do:
For my master thesis I am estimating the model by Slobodyan&Wouters (2012) with an extended time series. I try to include a counterfactual analysis that investigates what would have happened without the use of unconventional monetary policy. To this end I use the aproach by Mouabbi&Sahuc (2016).
What is the problem?
Before I start with the counterfactual analysis I simulate the time series with the original smoothed shocks from the estimation. In case of the rational expectations version I get back the observed time series as expected. In case of adaptive learning(AL) the simulated time series does not match the data.
Could anyone tell me why this is the case?
My hypotheses are:
- I have some kind of error in my code. Slobodyan&Wouters adapted some dynare files - maybe I overlooked a difference in the code that makes it incompatible with “simult_”? (I also manually coded up the simulation as a comparison but I get the same results as simult_.) Any ideas how to proceed in checking if everything is coded correctly?
- Under AL this exercise does not necessarily replicate the observed time series. I am using AR(2) learning. In that case I am not sure how to interpret the simulated time series I obtain. Can the exercise still make sense, and should just not be compared directly to observed time series? Or does the exercise make no sense conceptually under AL? (Of course this would be the worst outcome for me.)
In this thread @jpfeifer writes:
What I did so far:
(note that I have to use Dynare 3.6.4 in order to use the toolbox provided by Slobodyan&Wouters (2012))
%Simulation of time series under AL with original shocks:
dynare AL_counterfact_simulation noclearall;
load('AL_extension_4_results.mat', 'dr_')
load('AL_extension_4_results.mat', 'oo_')
y0=dr_.ys;
dr= dr_;
iorder=1;
ex_=[oo_.SmoothedShocks.ea oo_.SmoothedShocks.eb oo_.SmoothedShocks.eg oo_.SmoothedShocks.em oo_.SmoothedShocks.epinf oo_.SmoothedShocks.eqs oo_.SmoothedShocks.ew];
y_=simult_(y0,dr,ex_,iorder);
%look at time series (here gdp)
load usmodel_extended_zlb
figure;
plot(dy(71:end), "k"); hold on %data contains training period, start from 71 to start in 1966
%plot(oo_.SmoothedVariables.dy,'r'); hold on
plot(y_(8,:),'b--') %gdp is inrow 8
%plot(oo_.FilteredVariables.dy,'b--');
Result under AL (the blue dashed line is the simulated GDP, the black line shows the observed time series):
In case of RE the time series match (I cannot include a second picture as a new user).
The corresponding files are here:
AL_simulation_file.zip (2.6 MB)
RE_simulation_file.zip (773.6 KB)
each folder contains a file called “simulation_file.m” that runs the simulation and loads necessary data.
TL;DR: Simulating time series with original smoothed shocks does not yield observed time series under adaptive learning. Looking for fix or explanation.
Any help would be greatly appreciated!
Thank you