Simple behavior model - learning element not working


I’m trying to recreate De Grauwe model explained in Ch.3 of Lectures on behavioral macroeconomics. It is a very simple NK model with behavioral equations for expectation of inflation and output gap in t+1.

I have issue with the part Selecting the forecasting rules - basically the model claims that individuals have “bounded rationality” and so can learn from previous events. More specifically they forecast performances (utilities) of the fundamentalist and extrapolating rules (equations 3.9, 3.10). These are defined as the mean squared forecasting errors (MSFEs) of the forecasting rules however, these always return 0 in my code.

I have tried to change the MSFE with absolute values instead but the code continues to always give me 0 for the utilities…

What should I do to implement learning in the model?

Thanks a lot!

mybehavior_2.mod (3.0 KB)

Hi! Because the heuristic switching rule De Grauwe uses for expectations is non-linear, the model becomes non-linear. I don’t know why you are computing the Blanchard-Kahn conditions, when the model is not being solved under rational expectations. Per se I think there is always only a unique “solution” to this model, even though De Grauwe himself refers to the outcomes as multiple equilibria/solutions. However, there are local and global stability properties that are relevant (analogue to local/global determinacy in RE models). E.g. the Taylor principle is required for global stability (equivalent to global determinacy in RE models).

The stochastic component in the switching rule implies that there is no unique IRF to a shock when the economy is in a particular state, but a range of IRFs (uncertainty), which De Grauwe also shows later in the book. Also, I think the model can’t be solved using the stoch_simul command because I think this is used for solving under rational expectations, which the model is not doing.

De Grauwe provides the Matlab code in the book. To make it work you simply need to delete the following lines:
“if square=1;
r(t)= c1*(p(t))2+c2y(t)+c3r(t-1)+u;

1 Like