Can't get the IRF of one of my variables to show up

Hi, I am new to Dynare and I run into some problems trying to solve the simple CBDC New Keynesian model proposed by Piazzesi, Rogers, and Schneider (2019) https://web.stanford.edu/~piazzesi/MBinNK.pdf using the equations provided in Appendix 1.

Problem (1): I get impulse response functions for every one of my variables except the money demand (Equation 5) and cannot figure out why.

Problem (2): I get policy function only for the demand for money (eq. 5) and the price function (eq. 2), but not for any other variables.

Additional information that might be helpful: I get NaN in the theoretical moments of n, the money variable. I checked for unit roots and there seems to be an eigenvalue equal to 1, however I am not able to tell if it corresponds to n, since the price level p also displays NaN for theoretical moments.

Attached you will find the mod file I was trying to write to simulate Piazzesi, Rogers, and Schneider findings. Money_Banking_NKM.mod (2.9 KB)

Dear b_llm,
I think I’ve figured out the problem in your code. In order to solve the issue that you mention, you should have only stationary variables. However, assets n and price p are not stationary in your model, so they do not come back to the steady state after a shock. In NK models it is pretty common that nominal variables are not stationary. What you can do is replace n and p with real assets (asset minus price) and inflation. I’ve done it (see the modified code) and it seems to work.
Best,

Valerio

money.mod (2.9 KB)

1 Like

You are right, hadn’t thought about n and p not being stationary. I tried your code and it seems to work very well. Thanks for all the help Valerio!

I am trying to plot the policy functions for the variables in this model, but the code only outputs parameters for the real money policy function and for the shock. I am wondering why no policy functions appear for the rest of the variables, what type of mistake in the code could cause this?

It is hard to say, could you upload the code?