The example on dynare.org/DynareWiki/OptimalPolicy seems to work. However, it is not obvious from what the policymaker’s discount factor is. It is not defined and the welfare seems to be defined as one-period welfare.

Can anyone clarify:

(a) is welfare on-period in that example? If not, what is the policymaker’s discount factor there? How to change it if needed?

(b) If yes, can we do the “standard” discounted welfare? What is the syntax?

where u(,) is the felicity function. This objective can be written recursively as follows:

W_t = u(c_t,l_t) + \beta W_{t+1}

where W_t, the welfare, is the intertemporal utility at time t. In the mod file you declare the planner objective as follows:

planner_objective u(c,l)

(obviously you have to replace the function u by whatever you want). Dynare then understands that the social planner has to maximize the welfare W. So, even if the declared function (after the planner_objective keyword) is static, the objective considered here is intertemporal (Dynare computes the discounted sum of instantaneous utilities for you). Note that, with the current version of Dynare, it is not possible to declare recursive utility functions (Kreps-Porteus).

The social planner can be less or more patient than the representative household, so the discount factor of the social planner is not necessarly equal to the discount factor of the representative household (\beta). You can set the social planner discount planner using an option in the command that triggers the simulation of the model. For instance:

ramsey_policy (order=1,planner_discount=0.95) ;

Yes you can declare a general non linear (non quadratic) objective function and consider a non linear(ized) model of the economy. You are not bounded to the case of a linear model with quadratic objective.

Can they be variables or functions of parameter? For example, if the social planner is a benevolent one, she wants to maximize the utility function. If we used second order Taylor expansion around the steady state, the weights becomes functions of steady state values, rather than some abitrary constants.

Many thanks for this. Unfortunately, I could not make it work. The error message is:

??? Error using ==> print_info
MJDGGES returns the following error code8

Error in ==> stoch_simul at 44
print_info(info);

Error in ==> ramsey_policy at 25
info = stoch_simul(var_list);

Error in ==> ramseytest at 100
ramsey_policy(var_list_);

Error in ==> dynare at 102
evalin(‘base’,fname) ;

This was obtained after I attempted to run this (which is the file from dynare.org/DynareWiki/OptimalPolicy with 3 modifications: “linear” removed from the model, objective has changed, and line with discount is added). BTW how does this know which variable is an instrument?

Thanks - this was just an arbitrary example. I wanted to check details before using dynare for larger model (and more sensible). Perhaps this is why… Many thanks for your time.
Tanya