-
- Downloads
Ramsey: write derivatives of static model w.r.t. Lagrange multipliers in a new file
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
Showing
- src/DynamicModel.cc 17 additions, 7 deletionssrc/DynamicModel.cc
- src/DynamicModel.hh 7 additions, 2 deletionssrc/DynamicModel.hh
- src/ModFile.cc 16 additions, 2 deletionssrc/ModFile.cc
- src/Statement.hh 6 additions, 1 deletionsrc/Statement.hh
- src/StaticModel.cc 169 additions, 0 deletionssrc/StaticModel.cc
- src/StaticModel.hh 61 additions, 0 deletionssrc/StaticModel.hh
- src/SymbolTable.cc 10 additions, 0 deletionssrc/SymbolTable.cc
- src/SymbolTable.hh 7 additions, 1 deletionsrc/SymbolTable.hh
Loading
Please register or sign in to comment