I first tried to build a new Keynesian model in a closed economy with two-sector goods (tradables and nontradables). The endogenous variables are deviations from the steady state. Labour is the only production factor. Calvo price setting. The model is driven by technology shock.
But there is a problem with the closed one in Dynare that I cannot find anything wrong.
After that, I will expand the closed one to be a small open economy.
you are using a linearized model, I think it is not necessary to use the initval block since steady states will be known as zero (due to model(linear)) .
When you invoke stoch_simul you can also skip the option order=1 (due to model(linear)). Why do you make use of the option hp_filter=100?
Your problem is that one of the eigenvalues is close to 0/0, so you might solve it by using a different calibration.
Now, I have extended the previous model to a small-open-economy New Keynesian model with Tradables and Non-Tradables. Government spending is financed by the lump-sum tax.
When I run the mod-file, the problem is:
"There are 5 eigenvalue(s) larger than 1 in modulus
for 4 forward-looking variable(s)
That is hard to tell. Focus on what you changed. I find your demand functions strange. Usually, only relative prices and inflation rates appear. But in your model, there is a price level p showing up.