Dear all,
I’m trying to find the steady state of my model, using an external _steadystate.m file. I’ve tried to solve the steady-state values analytically, but there is one non-linear equation for labor (n), so I have to resort to the m. file to call fzero function. However, the residuals of the static equations have a lot of NaN’s like this:
Equation number 1 : NaN : 1. Euler equation
Equation number 2 : NaN : 2. Labor supply
Equation number 3 : 0 : 3. UIP
Equation number 4 : NaN : 4. Household budget constraint
Equation number 5 : -0.25 : 5. Domestic price dispersion
Equation number 6 : -0.25 : 6. Import price dispersion
Equation number 7 : NaN : 7. External debt interest rate
Equation number 8 : NaN : 8. FOC labor input
Equation number 9 : NaN : 9. FOC investment
Equation number 10 : NaN : 10. FOC capital
Equation number 11 : 0 : 11. Production function
Equation number 12 : 0 : 12. Law of motion for capital of domestic producers
Equation number 13 : NaN : 13. Domestic reoptimized price
Equation number 14 : NaN : 14. Aux var x1
Equation number 15 : NaN : 15. Aux var x2
Equation number 16 : 0 : 16. Domestic goods inflation
Equation number 17 : NaN : 17. Imported reoptimized price
Equation number 18 : NaN : 18. Aux var g1
Equation number 19 : NaN : 19. Aux var g2
Equation number 20 : 0 : 20. Imported good inflation
Equation number 21 : NaN : 21. Wholesale Bank interest rates
Equation number 22 : -0.00725 : 22. Retail Bank interest rates
Equation number 23 : 0 : 23. Bank balance sheet
Equation number 24 : 0 : 24. Law of motion for capital of banks
Equation number 25 : NaN : 25. Bank profits
Equation number 26 : 0 : 26. Goods market clearing
Equation number 27 : 0 : 27. Local demand for domestic goods
Equation number 28 : 0 : 28. Local demand for imported goods
Equation number 29 : 0 : 29. Foreign demand for domestic goods
Equation number 30 : 0 : 30. Total consumption
Equation number 31 : 0 : 31. credit market clearing
Equation number 32 : 0 : 32. CPI based inflation
Equation number 33 : 0 : 33. P_h to P
Equation number 34 : 0 : 34. P_f to P
Equation number 35 : 0.97972 : 35. Taylor Rule
Equation number 36 : NaN : 36. Technology Shock
Equation number 37 : NaN : 37. Foreign output Shock
Equation number 38 : NaN : 38. Monetary shock
I don’t really understand what happened or how Dynare works.
For example, in the case of the Euler equation, I set the steady-state value of interest rate as dependent on beta & the target inflation, according to the relationship 1=beta*(1+r)/(1+pi). Beta and target inflation have already been set as parameters. So, as I understand, if I set r=(1+pi)/beta-1, then it automatically satisfies the Euler equation, and the residual of that equation should be zero. However, Dynare returns NaN residual for that equation.
Similarly, in the 3 equations for the shocks, they also show NaN residuals even though I set the shocks equal to 1 in the steady state.
Or in the case of the Taylor rule, I set the steady-state values of interest rate and inflation equal to the target, it should give me zero residual instead of a non-zero residual as it turns out in my case.
One more thing, Dynare gives me a warning that “Some of the parameters have no value (d_bar) when using steady.”, but I have set the parameter d_bar=d, the value which is computed in the _steadystate.m file. So, I guess this is not the problem.
Can someone please look at my codes and tell me why I got NaN residuals? Many thanks in advance.
TS_nln_nexp.mod (11.3 KB)
TS_nln_nexp_steadystate.m (4.8 KB)