Page 1 of 1

Can't find steady State for OLG model with 60 cohorts

PostPosted: Wed Jul 31, 2013 11:47 am
by YUYI
Hi

This is my first time using Dynare. I am trying to apply a shock to my OLG model which has 60 cohort; therefore I have 60 states to solve for the IRF. The initial steady state with shock has been solved through an OLG model built in Matlab, which is input into Dynare.

Running the Dynare model, I get the following message:

??? Error using ==> print_info at 57
Impossible to find the steady state. Either the model doesn't have a steady state,
there are an infinity of steady states, or the guess values are too far from the
solution.

Looking at the output of the residual of the static equations, I believe the error is related to the euler equations. I am not sure what could be wrong, I appreciate any help on this or if someone could send me an example of RBC model with many agents as an example. Attached is my OLG model.

Cheers,

Yuyi

Re: Can't find steady State for OLG model with 60 cohorts

PostPosted: Mon Aug 12, 2013 6:25 am
by jpfeifer
With the development version I get the error message:

STEADY: The Jacobian contains Inf or NaN. The problem arises from:

STEADY: Derivative of Equation 1 with respect to Variable c_1 (initial value of c_1: 0)
STEADY: Derivative of Equation 2 with respect to Variable c_2 (initial value of c_2: 0)
STEADY: Derivative of Equation 3 with respect to Variable c_3 (initial value of c_3: 0)
STEADY: Derivative of Equation 4 with respect to Variable c_4 (initial value of c_4: 0)
STEADY: Derivative of Equation 5 with respect to Variable c_5 (initial value of c_5: 0)
STEADY: Derivative of Equation 6 with respect to Variable c_6 (initial value of c_6: 0)
STEADY: Derivative of Equation 7 with respect to Variable c_7 (initial value of c_7: 0)
STEADY: Derivative of Equation 8 with respect to Variable c_8 (initial value of c_8: 0)
STEADY: Derivative of Equation 9 with respect to Variable c_9 (initial value of c_9: 0)
STEADY: Derivative of Equation 10 with respect to Variable c_10 (initial value of c_10: 0)
STEADY: Derivative of Equation 11 with respect to Variable c_11 (initial value of c_11: 0)
STEADY: Derivative of Equation 12 with respect to Variable c_12 (initial value of c_12: 0)
STEADY: Derivative of Equation 13 with respect to Variable c_13 (initial value of c_13: 0)
STEADY: Derivative of Equation 14 with respect to Variable c_14 (initial value of c_14: 0)
STEADY: Derivative of Equation 15 with respect to Variable c_15 (initial value of c_15: 0)
STEADY: Derivative of Equation 16 with respect to Variable c_16 (initial value of c_16: 0)
STEADY: Derivative of Equation 17 with respect to Variable c_17 (initial value of c_17: 0)
STEADY: Derivative of Equation 18 with respect to Variable c_18 (initial value of c_18: 0)
STEADY: Derivative of Equation 19 with respect to Variable c_19 (initial value of c_19: 0)
STEADY: Derivative of Equation 20 with respect to Variable c_20 (initial value of c_20: 0)
STEADY: Derivative of Equation 21 with respect to Variable c_21 (initial value of c_21: 0)
STEADY: Derivative of Equation 22 with respect to Variable c_22 (initial value of c_22: 0)
STEADY: Derivative of Equation 23 with respect to Variable c_23 (initial value of c_23: 0)
STEADY: Derivative of Equation 24 with respect to Variable c_24 (initial value of c_24: 0)
STEADY: Derivative of Equation 25 with respect to Variable c_25 (initial value of c_25: 0)
STEADY: Derivative of Equation 26 with respect to Variable c_26 (initial value of c_26: 0)
STEADY: Derivative of Equation 27 with respect to Variable c_27 (initial value of c_27: 0)
STEADY: Derivative of Equation 28 with respect to Variable c_28 (initial value of c_28: 0)
STEADY: Derivative of Equation 29 with respect to Variable c_29 (initial value of c_29: 0)
STEADY: Derivative of Equation 30 with respect to Variable c_30 (initial value of c_30: 0)
STEADY: Derivative of Equation 31 with respect to Variable c_31 (initial value of c_31: 0)
STEADY: Derivative of Equation 32 with respect to Variable c_32 (initial value of c_32: 0)
STEADY: Derivative of Equation 33 with respect to Variable c_33 (initial value of c_33: 0)
STEADY: Derivative of Equation 34 with respect to Variable c_34 (initial value of c_34: 0)
STEADY: Derivative of Equation 35 with respect to Variable c_35 (initial value of c_35: 0)
STEADY: Derivative of Equation 36 with respect to Variable c_36 (initial value of c_36: 0)
STEADY: Derivative of Equation 37 with respect to Variable c_37 (initial value of c_37: 0)
STEADY: Derivative of Equation 38 with respect to Variable c_38 (initial value of c_38: 0)
STEADY: Derivative of Equation 39 with respect to Variable c_39 (initial value of c_39: 0)
STEADY: Derivative of Equation 40 with respect to Variable c_40 (initial value of c_40: 0)
STEADY: Derivative of Equation 41 with respect to Variable c_41 (initial value of c_41: 0)
STEADY: Derivative of Equation 42 with respect to Variable c_42 (initial value of c_42: 0)
STEADY: Derivative of Equation 43 with respect to Variable c_43 (initial value of c_43: 0)
STEADY: Derivative of Equation 44 with respect to Variable c_44 (initial value of c_44: 0)
STEADY: Derivative of Equation 45 with respect to Variable c_45 (initial value of c_45: 0)
STEADY: Derivative of Equation 46 with respect to Variable c_46 (initial value of c_46: 0)
STEADY: Derivative of Equation 47 with respect to Variable c_47 (initial value of c_47: 0)
STEADY: Derivative of Equation 48 with respect to Variable c_48 (initial value of c_48: 0)
STEADY: Derivative of Equation 49 with respect to Variable c_49 (initial value of c_49: 0)
STEADY: Derivative of Equation 50 with respect to Variable c_50 (initial value of c_50: 0)
STEADY: Derivative of Equation 51 with respect to Variable c_51 (initial value of c_51: 0)
STEADY: Derivative of Equation 52 with respect to Variable c_52 (initial value of c_52: 0)
STEADY: Derivative of Equation 53 with respect to Variable c_53 (initial value of c_53: 0)
STEADY: Derivative of Equation 54 with respect to Variable c_54 (initial value of c_54: 0)
STEADY: Derivative of Equation 55 with respect to Variable c_55 (initial value of c_55: 0)
STEADY: Derivative of Equation 56 with respect to Variable c_56 (initial value of c_56: 0)
STEADY: Derivative of Equation 57 with respect to Variable c_57 (initial value of c_57: 0)
STEADY: Derivative of Equation 58 with respect to Variable c_58 (initial value of c_58: 0)
STEADY: Derivative of Equation 59 with respect to Variable c_59 (initial value of c_59: 0)
STEADY: Derivative of Equation 60 with respect to Variable c_60 (initial value of c_60: 0)

STEADY: The problem most often occurs, because a variable with
STEADY: exponent smaller than 1 has been initialized to 0. Taking the derivative
STEADY: and evaluating it at the steady state then results in a division by 0.
Error using dynare_solve (line 60)
An element of the Jacobian is not finite or NaN

Thus, please provide valid starting values.

Re: Can't find steady State for OLG model with 60 cohorts

PostPosted: Mon Aug 12, 2013 4:52 pm
by YUYI
Many thanks.

I realized I need to also initialize the steady state for other variables I have declared.

Cheers,

Yuyi