Missing values in the Steady State Block - Dhawan/Jeske-Model

Hi there,

i’m quite new to modeling with Dynare and basically i’m trying to replicate the model from the work of Dhawan and Jeske out of 2008: “Energy Price Shocks and the Macroeconomy:The Role of Consumer Durables”.
So far i have implemented the in their paper mentioned equations for the simulation in Dynare and also the Steady State Equations out of their Appendix as well as setting the parameters from there calibration. I have followed Willi Mutschler’s Videos on Youtube and the material on Johannes Pfeifer’s website and GitHub to set up the model blocks correctly.
Unfortunately i’m running into some issues as Dynare tells me that several values in the steady state block are undefined and i’m unable to fix it even with normalizing the output Y to 1 and setting the rest of the values accordingly to their calibration or also 1. Then the preprocessor tells me that there are too many variables, but also adds three auxiliary variables by itself.
Current Error as i commented out some of the initial value settings:
ERROR: in the ‘steady_state_model’ block, variable ‘P’ is undefined in the declaration of variable ‘E_h_D’

I have attached the paper as well as my current code.
DhawanJeske_Test.mod (7.9 KB)

dhawan_jeske08_Energy_Price_Shocks_and_the_Macroeconomy_The_Role_of_Consumer_Durables.pdf (868.8 KB)

Kind regards
Nico

Unfortunately there is an issue with uploading the .mod-file. Am i unable to upload such files cause i’m new to the forum? Shall i post the code manually?
Sorry for the inconveniences.

It looks like you need to wait a bit longer for the upload to complete.

I waited like five minutes for the upload to complete, it said uploading 100% after a few seconds, but didn’t finish. Nevertheless it worked now as i drag&drop’ed the file into it.
Thanks for the reply.

All statements in the steady_state_model need to be able to sequentially execute with already defined objects. The message is pretty explicit. You are relying on P, but did not yet set its steady state.

Okay i understand that. There are equations for P given in the model as well as in the steady state model block that i took out of the paper (There are two equations given for P in each block to be precise). But when i uncomment the equation for P, the next variable is undefined and this goes on recursively until i reach a point where all endogenous variables are predetermined. Then the error message is as mentioned above that there are too many variables for the equations (17 to 16).
How can i solve this?

P is an exogenous process whose steady state is 1, as is Z’s. The paper presents 11 steady state equations for the remaining 11 variables. You need to use the outline of the section B.2 to recursively compute the rest, working from the back.

Thanks for the help. I realigned the equations and set P and Z to 1. The Preprocessor works fine now, but i have one residual different from zero left and even tough i double checked the equations, i can’t find the mistake right now. May one here can have a look on it, i attached the new .mod-file.
Test2.mod (6.5 KB)

There was a wrong bracket in the equation. Try
Test3.mod (6.5 KB)

Thanks a lot! The code works now and i get the IRF’s as Output.