# IRF doesn't conform with the expectation

BGG2test3a.mod (2.4 KB)
Dear professor Jpfeifer,

I am testing a BGG-RBC model, which contains two thresholds (ome1, ome2). Though I successfully saw the IRFs, I still found several problems.

1. Some results of IRF don’t conform with my expectation. For example, when sigma (exogenous risk shock) rises, y (output) rises too, which is a wrong result, at least in accordance with my personal analysis.

2. I guess it is caused by code “predetermined_variables”. I think I have added too many predetermined variables. But if I delete them all, BK conditions will not be satisfied. It is a dilemma for me.

Regards,
modesty

Then you need to thoroughly check your timing. There is one unique correct timing. Take

``````k(+1)=(1-0.5*h*(i/i(-1)-1)^2)*i+(1-delta)*k;

re=(rk+q*(1-delta))/q(-1);
``````

capital is clearly predetermined because everything on the right is determined at time t. That does not seem to be the case with `re`.

1 Like

Dear Professor Jpfeifer,

But I still would like to know the definition of “timing”. May I ask it means period when a variable is determined?

I calculated all the equations and they are reasonable in economics. And I just typed these equations in dynare. I didn’t predict such a result…

May I ask, do you mean that if I correct k into k(-1) and it will make a difference?

Please forgive my ignorance, I am a noob.

Regards,
Modesty

Timing means the period in which something is determined. The Dynare timing convention is documented in e.g. the Dynare manual. You already corrected the timing of `k(+1)` by declaring it a `predetermined_variables k`. But the same does not make sense for `re`. By declaring it predetermined, you are saying it’s value was already perfectly known at t-1

1 Like

Thank you for explaining what timing is!

When I delete “re” in “predetermined_variables” block, dynare immediately tells me BK conditions are not satisfiled:

There are 6 eigenvalue(s) larger than 1 in modulus
for 7 forward-looking variable(s)

Or shall we make a conclusion? The whole equations and steady states are reasonable. Just the case of the specific dynare code?

I am making efforts to research this problem now.

Again, there is one unique correct timing. You cannot simply change the timing of one variable in an incoherent model and expect the results to run. You need to systematically debug the issue, ideally starting from the easiest model version that works.

Thank you for your remiding and suggestions!

Now I am going back to debug basic BGG model to check whether I have mastered all the details of the models.

Dear Professor Jpfeifer,

Today I have checked the basic BGG_RBC model. I have found that at least there are two main reasons for the problem that BK conditions are not satisfied.

1. Equation omitted. Usually when all the equations are calculated but there are some not being converted into dynare code, causing equation and variable omitted.

2. Timing of variables. I guess there must be other variables (except K) which are predetermined so that when typing the code, these variables should be posted in the period of t, instead of (+1), for example, the value of a firm.

What I write above is my personal thought of today’s study.

Thank you for your reminding and suggestions!

Professor Jpfeifer, I have successfully solved this problem, in accordance with your reminding and suggestions!!!

Now the IRFs conform with the expectation!!!

1 Like