Deterministic simulation, shock to capital stock

Dear all,

I am currently trying to replicate the simulations of the paper by R.Shimer (2012), Wage Rigidities and Jobless Recoveries, but I obviously do something wrong since the IRF I obtain are flat…
Note: In its simplest version, the model is basically a neoclassical growth model (with productivity growth). Before turning to the section on wage rigidities, I try to replicate the frictionless model.

His experiment consist in a shock to the capital stock that decreses by one percent in the first period. I red somewhere else on the forum ([Shock on capital)) some hints to do this, but I’m still confused about how to implement the shock.

I’ve tried two things:

  • first the model reduces to a system of two difference equations, which in log-deviation from the BGP write:
    lambda_{t+1} = alpha* lambda_{t}
    k_{t+1} = psyk_{t} + theta lambda_{t}

In order to shock the economy I’ve tried to traduce it in the following way in Dynare:

lambda(t+1) = alpha* lambda k = theta_k + psy*k(t-1) + theta* lambda(t)
Where theta_k is an exogenous variable which corresponds to the shock: theta = -0.1 in first period;

  • second I’ve tried to write the full model in log level and apply the same method to the law of motion of capital.
exp(k) = theta_k*( (1-delta)*exp(k(-1)) + exp(i(-1)) )

where theta_k =0.9 in first period.

However in both attempts, I get no response of the model. Do you have any idea of what I’m doing wrong?
I attach the mod files.

Thank you in advance for any help that you could provide.

Best regards
shimer_flex_full.mod (2.4 KB)
shimer_flex_slim.mod (1.71 KB)

Please have a look at

Dear Prof. Pfeifer,

thank you very much for your answer. I managed to have a code that works and reproduce the desired simulation. However I still have few more questions/problems…

**1) ** The code that runs correctly uses a stochastic simulation, but when I try to obtain the same results under a deterministic simulation I obtain silly results. I’m wondering whether doing this in a deterministic case makes sense: as Shimer puts it, the experience consists in the following: “Now suppose that after some unmodeled adverse shock, the economy starts with one percent less capital than in the balanced growth path”. But in the same time what I understand about the deterministic simulation is that the initval commands (followed by steady states values) indicates to Dynare to start at the steady state. So isn’t there a contradiction between saying to Dynare to start at the steady state and to introduce a shock that would decrease the stock of capital in the first period? (by the way, is the first period labelled 0 or 1 in Dynare?). I’m obviously missing something in the logic of the deterministic simulation, but I cannot figure out what…

2) When I try to conduct the simulation (in the stochastic case) on the model reduced to two difference equation (instead of the complete one), the IRF are flat and I get the following message: “All endogenous are constant or non stationary, not displaying correlations and auto-correlations”. Would you have any suggestion of something I could investigate to solve this issue?

Thank you in advance and best regards

PS: I attach three codes:
shimer_flex_full_stoch: stochastic simulation of shimer model with flex wages, the code that correctly reproduces the simulation (for anyone interested).
shimer_flex_slim_stoch: attempt of simulation of the same model but using the model reduced to two difference equation.
shimer_flex_full: attempt of deterministic simulation of the model
shimer_flex_slim_stoch.mod (1.6 KB)
shimer_flex_full_stoch.mod (2.36 KB)