Skip to content
GitLab
Projects Groups Snippets
  • /
  • Help
    • Help
    • Support
    • Community forum
    • Submit feedback
    • Contribute to GitLab
  • Sign in / Register
  • dynare dynare
  • Project information
    • Project information
    • Activity
    • Labels
    • Members
  • Repository
    • Repository
    • Files
    • Commits
    • Branches
    • Tags
    • Contributors
    • Graph
    • Compare
  • Issues 118
    • Issues 118
    • List
    • Boards
    • Service Desk
    • Milestones
  • Merge requests 5
    • Merge requests 5
  • CI/CD
    • CI/CD
    • Pipelines
    • Jobs
    • Schedules
  • Deployments
    • Deployments
    • Environments
    • Releases
  • Packages and registries
    • Packages and registries
    • Container Registry
  • Monitor
    • Monitor
    • Incidents
  • Analytics
    • Analytics
    • Value stream
    • CI/CD
    • Repository
  • Wiki
    • Wiki
  • Snippets
    • Snippets
  • Activity
  • Graph
  • Create a new issue
  • Jobs
  • Commits
  • Issue Boards
Collapse sidebar
  • DynareDynare
  • dynaredynare
  • Issues
  • #1770
Closed
Open
Issue created Jan 20, 2021 by Johannes Pfeifer@JohannesPfeiferDeveloper3 of 4 checklist items completed3/4 checklist items

Document optimizers allowing analytic_derivation and fix bugs

  • The manual does not state which optimizers employ the analytic gradient. It should be at least fmincon (1), csminwel (4), newrat (5).

  • csminwel and newrat are the two optimizers not shipped with e.g. Matlab. They rely on calls to

    [~,cost_flag,g1] = penalty_objective_function(x1,fcn,penalty,varargin{:});

    where the third output argument is the gradient. Within penalty_objective_function we then have

     [fval, info, exit_flag, arg1, arg2] = fcn(x, varargin{:});

    where the gradient arg1 is the fourth and the Hessian arg2 the fifth output argument of the underlying objective function. For example

    function [fval,info,exit_flag,DLIK,Hess,SteadyState,trend_coeff,Model,DynareOptions,BayesInfo,DynareResults] = dsge_likelihood(xparam1,DynareDataset,DatasetInfo,DynareOptions,Model,EstimatedParameters,BayesInfo,BoundsInfo,DynareResults,derivatives_info)

    This interface creates a problem for Matlab optimizers like fmincon, which expect the Jacobian as second and the Hessian as the third function output. Neither the underlying objective nor penalty_objective_function conform to this convention. The question is how to address this issue. There are two ways:

    1. Add a wrapper function along the line of penalty_objective_function, which introduces another layer but would be quite easy to implement.
    2. Change the output order of the objective function. This would be cleaner and more efficient, but would require quite massive changes in the code-base
  • The current implementation of analytic_derivation for fmincon in dynare_minimize_objective is buggy as it considers the second output info to be the gradient.

  • It's not clear whether the treatment of the analytic Jacobian in case of the penalty approach is correct as the Jacobian does not take the penalty into account. We need to check whether these cases are filtered out via cost_flag

Edited Jan 26, 2021 by Johannes Pfeifer
Assignee
Assign to
Time tracking