Coding a utility function

Dear all,

I often read in papers the program of households as a per capita utility function and budget constraint (steaming from the representative agent hypothesis).

What if I want to code a utility function and a budget constraint which takes into account demographic growth? Should I, in addition to assuming for total labor revenues w(t).h(t).L(t) in the budget constraint, assume that utility function?

Or should I keep my model in per capita (or per efficiency units of labor) ?

Keep in mind that the demographic growth rate and the labor productivity growth rate are constant through time in my model.
Thank you,

That depends on what you are trying to do. If you are solving your model with perturbation, you will need a well-defined steady state. That usually requires your model to be in intensive form, i.e. in technology-weighted per capita terms.

Good morning,

I’m doing deterministic simulations only, so no perturbation.

My goal is to have everything in level at the end on my graph, and not in efficiency units. I reckon that I should multiply the utility function by total population L(t) (I have demographic growth).

Thank you in advance.


Have a look at

Thank you. But my issue is rather with the utility function. Can I multiply the utility function by L(t) ?

Plus, you mention that “Because in aggregate form there is no stationary steady state (only a BGP), one cannot use the steady-command after initval and endval to compute a conditional steady state.” & “The initial and terminal conditions are computed by using the analytical steady state in intensive form and then transform these values back to the aggregate BGÜ values”. If I understand that right, if I write down on dynare my model in aggregate (non-stationary) form, I will have to write down in the steady_state_model block the steady state equations in intensive form?

I have another question: if I calibrate my model from the FOCs and long-run averages, should I use the steady state equations or BGP equations ? I reckon the two are not the same since the BGP equations will include the growth rates of the model.

Thank you,


  1. Why do you want to include the utility function in your code and not just the FOCs? And yes, you can multiply it that way. It is just a non-stationary variable like any other.
  2. Your model will not have a steady state with a trend. So your steady_state_model-block will not work as your terminal condition is not a steady state.
  3. I don’t understand your last question. There is a one to one mapping between the intensive form and aggregate objects. What you use depends on whether you code the model in intensive form or not. You need to be consistent.
1 Like