NK search and matching frictions -nonlinear

Hi everyone,

I am building an NK model with search and matching frictions. My NK workhorse model works well and produces beautiful impulse responses. However, when I include the search and matching features, it causes collinearity. Although the code produces impulse responses, they are clearly not correct plus the theoretical moments report some NANs.

What I understand is that the collinearity is allocated in the price-setting equations. I have the strong belief that the problem is related to the definition of marginal cost since now it accounts for the frictions.

Could anyone give me some advice, please? I have tried to simplify Calvo equations but nothing has worked by now. Thanks!

Programable5.mod (2.5 KB) Programable5_steadystate.m (3.2 KB)

Your model has a unit root, explaining the non-existing moments. You need to find out where that unit root comes from.

Hi Professor Jpfeifer,

I have been checking the model the weekend for unit roots. I changed the functional form of the shocks, it does improve the responses and some NANs disappeared but still not yet all.
I have noticed that capital is a persistently increasing variable, never converges even with a long period but to my eyes it looks standard how I defined it.
Could you give a hint about hot to detect the non-stationarity in the model, please? I know is something that the builder of the model should know but any advice would be really appreciated. Many thanks!

All variables that have NaN moments are affected by the unit root. You will see that their IRF does not return to 0. Using model_diagnostics you can typically find out which equations are involved.

Hi Professor Jpfeifer,

I have used model_diagnostics, the equations that comes from that are the Calvo setting prices. they should be OK, since I followed your nk version with Calvo prices posted in your Github. I adjusted these equations using what Federico Ravenna and Walsh C.(2008) do in Vacancies, unemployment, and the Phillip curve accounting for the matching frictions but I should be missing something. Many thanks.

Try going step by step. What happens if you ignore the matching frictions in the pricing equations? By the way, my hunch is that there is a problem with nominal vs. real in your modification.

Ok, many thanks professor Jpfeifer, I will have a look at what you mentioned. I will come back to the nk model without search and matching frictions. I think it was working but I check it.

Do you have by chance in Github or somewhere else another example of NK non-linear model with Calvo prices to keep it as a guide. I have worked before with Rotemberg prices and didn’t have this problem but Calvo seems to be painful. I have the impression my problems are, as you said, related to prices and the definition of the marginal cost. Many thanks!


Did you see this one: https://github.com/JohannesPfeifer/DSGE_mod/blob/master/Gali_2015/Gali_2015_chapter_3_nonlinear.mod

Many thanks, professor Jpfeifer. I think yes I followed this one. I am checking again the model.