2 sector RBC model


I am currently aiming to replicate a 2 sector RBC model with an environmental externality. More specifically, I want to introduce a carbon price shock, but something prevents Dynare from executing. I receive the following:
Error using lnsrch1
Some element of Newton direction
isn’t finite. Jacobian maybe
singular or there is a problem
with initial values

Without the taxation shock the model is running, so I suspect I did a mistake there. For further reference, the model incorporated financial frictions prior to my adaption.

Woul highly appreciate any help!

noffrc.mod (4.3 KB)

At least in your initial values there is an inconsistency of the Rb and Rg not taking depreciation into account. You have them equal to R.

Thanks for the fast reply!
Unfortunately, I am not certain though if I understood your comment correctly.

Rg = alpha_g * pg * Yg / Kg + 1 - delta;
Rb = alpha_b * Yb / Kb * (pb - theta_1mu^theta_2-tau_e(1-mu)epsilonYb^(epsilon-1)) + 1 - delta;

In the initival block Rb and Rg are defined like this and since delta is the depreciation rate of capital, I don’t understand how I have them equal to R?

Many thanks again!

When I execute your parameter definitions and initval block in Matlab, I get R=Rb=Rg, which cannot be.

Thanks for the clarification. I found the error, and adjusted accordingly.
However, there are still some issues, I cannot seem to solve.

Do you mind having another look?

Best regards

noffrc2.mod (4.3 KB)

There are still big residuals in the equations for Rb and Rg, so I doubt that the issue has been completely fixed.