Skip to content
Snippets Groups Projects
Forked from Dynare / preprocessor
Source project has a limited visibility.
  • Sébastien Villemot's avatar
    0169240f
    Ramsey: write derivatives of static model w.r.t. Lagrange multipliers in a new file · 0169240f
    Sébastien Villemot authored
    The computing of the Ramsey steady state relies on the fact that Lagrange
    multipliers appear linearly in the system to be solved. Instead of directly
    solving for the Lagrange multipliers along with the other variables,
    dyn_ramsey_static.m reduces the size of the problem by always computing the
    value of the multipliers that minimizes the residuals, given the other
    variables (using a minimum norm solution, easy to compute because of the
    linearity property). That function thus needs the derivatives of the optimality
    FOCs with respect to the multipliers. The problem is that, when multipliers
    appear in an auxiliary variable related to a lead/lag, then those derivatives
    need to be retrieved by a chain rule derivation, which cannot be easily done
    with the regular static file.
    
    This commit implements the creation of a new file,
    ramsey_multipliers_static_g1.{m,mex}, that provides exactly the needed
    derivatives w.r.t. Lagrange multipliers through chain rule derivation.
    
    Ref. dynare#633, dynare#1119, dynare#1133
    0169240f
    History
    Ramsey: write derivatives of static model w.r.t. Lagrange multipliers in a new file
    Sébastien Villemot authored
    The computing of the Ramsey steady state relies on the fact that Lagrange
    multipliers appear linearly in the system to be solved. Instead of directly
    solving for the Lagrange multipliers along with the other variables,
    dyn_ramsey_static.m reduces the size of the problem by always computing the
    value of the multipliers that minimizes the residuals, given the other
    variables (using a minimum norm solution, easy to compute because of the
    linearity property). That function thus needs the derivatives of the optimality
    FOCs with respect to the multipliers. The problem is that, when multipliers
    appear in an auxiliary variable related to a lead/lag, then those derivatives
    need to be retrieved by a chain rule derivation, which cannot be easily done
    with the regular static file.
    
    This commit implements the creation of a new file,
    ramsey_multipliers_static_g1.{m,mex}, that provides exactly the needed
    derivatives w.r.t. Lagrange multipliers through chain rule derivation.
    
    Ref. dynare#633, dynare#1119, dynare#1133