Good morning everybody,

I am producing IRFs for the SW’03 model by following closely Viegi’s code found in another topic of this forum, but with internal habit formation in the utility function; moreover, I use the Uhlig’ equations for the tobin q which should be the right equation (he has some slides for the SW model where he takes some modifications to some equations of the original paper becuse they are wrong up to him).

Can’t uderstand why I get some weird IRFs with inflection points along th trajectory , especially the one in response to gov spending shock. Here you find attecched the .mod file with my code, the derivation of the log linear consumption eqauation and Uhlig slides (both Viegi and Uhlig use the same calibration)

mg_utility_int_habit.pdf (83.9 KB)

Uhlig_SmetsWouters_Lecture_v2.pdf (1.0 MB)

SW_int_habit.mod (7.1 KB)

Thank for the support

It’s hard to tell whether there is really anything wrong. Medium-scale models with bells and whistles like complex Taylor rules, adjustment costs, and habits can feature quite complex dynamics.

Ok, thank you; in principle, is there a way to detect the presence of mispecifications, unrealistic calibration by analyzing the dynare output when running stochastic simulations?

No, there is no generic way of doing that. Inspecting IRFs is usually the first step.

ok; what about steady states? they have to be necessairly zero if i specify a log linear model? should they be considered a diagnostic tool for misspecifications?

Thank you professor

Unless you explicitly introduced a constant term in the equation, the steady state must indeed be zero. If it’s not, there must be a mistake.