Perfect Foresight in the OLG model with endogenous growth

Dear all,

I’m trying to solve the perfect foresight problem, but it fails. The following error appears:

Warning: Matrix is singular to working precision.
Failed to solve perfect foresight model.

The crucial thing is that the model does not have a steady state, since there is endogenous growth (due to the transmission of human capital). How can I solve the model in this case?

Thank you for your help!

OLG_problem.mod (3.7 KB)

q=1 creates an edge case. That causes the issue. In any case, is the problem well-defined? What is the terminal condition of your model?

Basically, I want to implement shocks to the size of age groups. So, I added this block to the code. I also added terminal conditions, but, anyway, it doesn’t work out. As for q, I tried to change its values, but it did not help as well.
OLG_problem.mod (6.2 KB)

You should start with a working version and then start modifying. With the current version, it’s impossible to tell where exactly the problem derives from.

I’ve elaborated the code. Now it solves for the steady state and the model itself. However, in oo_.endo_simul the variables look like they are in the steady state during all periods, despite the fact that I also use shocks during all periods. What could be the problem?
OLG_problem.mod (6.3 KB)

Your steady state is: everything is 0. That makes no sense.

I see, thank you. It’s strange that the model does not work when human capital is endogenous. I’ve tried to make the human capital accumulation process be exogenous. In this case, Dynare solves the model perfectly well. As far as I understand, the main challenge is endogenous growth that comes from human capital accumulation process with social transmission. Is it possible to handle such a problem in Dynare?

I’ve read in some of the topics here that a unique steady state is not necessary in the perfect foresight setting (since BGP is a sequence of steady states). It means that I should simply define initial and terminal conditions for the model to be solved. But it fails to find a solution anyway.

May be I should detrend variables?

This is a chicken and egg problem. A properly set up problem like that should be easily solvable in Dynare. But your current code suggests that the problem is not yet properly set up so that no proper BGP exists.