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)