Dear Ladies and Gentlemen,

I am Kedou, a fresher of Dynare. To finish my PhD Thesis, I need to built a OLG model. My first step is to built Gertler(1999) in Dynare for it’s a basis of my model. However, I couldn’t solve a steady state. I really need your help and thanks a lot!!! Below is my code:

```
// Endogenous variables: consumption(C); capital(K); ratio of wealth(lamba); marginal propensity to consume(mpc);
// retiree parameter to mpc(old); human wealth(H); wage(W); rent(R); output(Y); technology level(X); number of workers(N);
// wights of gross return of R(Om)
var Y R W K lamba X N mpc old C H Om;
// Parameters declaration and calibration:factor share in C-D function(alph); discount rate(bet)
// tech growth(x); population growth(n); depreciation rate(aa); survive rate(gam); remain work(delt)
parameters alph bet x n aa gam delt seita;
alph=0.5;
bet=0.96;
x=0.1;
n=0.01;
aa=0.1;
gam=0.9;
delt=0.997;
seita=0.25;
// Equilibrium conditions
model;
// 1→3.6 (capital accumulation)
K = Y-C+(1-aa)*K(-1);
// 2→2.18 (movement of lamba)
lamba = delt*(1-mpc*old)*lamba(-1)*R*K/K(+1)+(1-delt);
// 3→2.12 (mpc)
mpc = 1-bet^seita*(R(+1)*Om(+1))^(seita-1)*mpc/mpc(+1);
// 4→2.7 (mpc*old)
mpc*old = 1-bet^seita*gam*R(+1)^(seita-1)*mpc*old/(mpc(1)*old(1));
// IF omit Equ1.10 here as Oum=delt when elasticity→1
// 5→2.16 (human resource)
H = N*W+H(+1)/((1+n)*R*Om(+1)/delt);
// 6→2.17 (consumption)
C = mpc*((1+(old-1)*lamba)*R*K+H);
// 7→3.3 (wage)
W = alph*Y/N;
// 8→3.4 (rent)
R = (1-alph)*Y/K+(1-aa);
// 9→2.1 (movement of population)
N = (1+n)*N(-1);
// 10→3.2 (movement of tech)
X = (1+x)*X(-1);
// 11→3.1 (output)
Y = (X*N)^alph*K^(1-alph);
// 12→2.10 (Om)
Om = delt+(1-delt)*old;
end;
// Steady state (analytically solved)
initval;
lamba = 0.16;
K = 1;
N = 1;
X = 1;
end;
// Check that this is indeed the steady state
steady;
```