Transformation FOC's after model(linearize) option

Dear All;

I try to log-linearize my model. But I’m stuck in that how I should write the first order conditions. For clearance;

For example, representative agent maximizes her utility by choosing two variables: C and L. First-order conditions:

(Ct - yCt-1)^(-1/sigma) - (beta)y(Ct-1 - y*Ct)^(-1/sigma) = lamda


(Lt^fi)beta = lamdaWt

or Euler between them is;

Lt^fi = Wt/Ct

I’m very sorry for this beginner question, how am I should transform foc’s after model(linearize) option.

Thank you.

I am not sure to understand your problem. Two remarks:

  1. linearize is not an option of the model block. We have an option called linear in this block to say to Dynare that we (the user) provide a set of linear (or linearized) equations in the model block.

  2. You do not need to linearize yourself the model, Dynare can do it for you. So in the model block you just have to provide the nonlinear first order conditions of your model.


Dear Stephane;

Thank you for your kindly response.

  1. Sorry for the typo, I’m talking about model(linear) option.

  2. I tried to ask that: I try to model as deviations from ss. For example, all variables’ initvals are 0. Some ss variables in equations defined as parameters in mod file, and calibrated. In this situation, which of the alternatives should I use in the model block? 1-Directly FOCs. 2-Eulers from FOCs. 3.Steady-state solutions of FOCs.


Have a look at

Dear Professor;

Thank you very much for kindly response. Greatly helpful explanation. I have last question about this topic in my head. I try to learn at the same time. When should I use model(linear) option in nonlinear model and when I use this option, how should I transform first order conditions in my model block. For example like in your Smets&Wouters code:

Thanks again.

You should not use the linear option if the the model is non linear. If you really want to use the option, you need to linearize yourself the non linear equations around the deterministic steady state, and write the linearized equations in the model block.


Thank you, Stephane. I use linear option, because I try to model as deviations from steady state. For example, all variables are zero in steady state. I believe that I should use linear option in this framework. Am I right?

Secondly, thank you for clearance my topic. In fact, I want to ask that how to linearize my FOC’s? Are the deterministic steady state solutions with pen and paper enough for linearization around steady-state.


I do not have the feeling that I made anything clear here…

I really do not understand why you want to use the linear option. Your model is non linear, if I read your first message. If you want to compute the moments of the linearized model, or plot IRFs of the linearized (or log linearized) model, the linear option will not do anything good. You just need to write your non linear FOCs in the model block, provide the steady state in a steady_state_model block if you have a closed form solution, and if you use the stoch_simul command with option order=1 Dynare will do the linearization for you (log-linearization with option loglinear) and report the moments of the variables in deviation to the steady state and the IRFs of the linearized model.

In the Smets and Wouters file you mention, the model is linearized manually (and written in the model block)… In this case it makes sense to use the linear option.