Skip to content

GitLab

  • Menu
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 108
    • Issues 108
    • List
    • Boards
    • Service Desk
    • Milestones
  • Merge requests 4
    • Merge requests 4
  • CI/CD
    • CI/CD
    • Pipelines
    • Jobs
    • Schedules
  • Deployments
    • Deployments
    • Environments
    • Releases
  • Monitor
    • Monitor
    • Incidents
  • Packages & Registries
    • Packages & Registries
    • Container Registry
  • Analytics
    • Analytics
    • Value stream
    • CI/CD
    • Repository
  • Wiki
    • Wiki
  • Snippets
    • Snippets
  • Activity
  • Graph
  • Create a new issue
  • Jobs
  • Commits
  • Issue Boards
Collapse sidebar
  • Dynare
  • dynaredynare
  • Issues
  • #1671

Closed
Open
Created Nov 26, 2019 by MichelJuillard@MichelJuillardDeveloper

Refactoring initval_file and histval_file

initval_file and histvfal_file should be more flexible and have functionalities similar to option datafilein estimation

Usage

initval_file

  • is used only in perfect foresight
  • provides a guess value for computing the solution
  • in absence of histval or histval_file provides the initial conditions for the simulation (we don't want to require users to upload two files for initial conditions and guess values

histval_file

  • is used for stochastic and perfect foresight models
  • provides initial conditions

Current implementation

initval_file

  • accept .m, .mat, .xls(x), .csv files
  • modifies directly oo_.endo_simul, oo_.exo_simul, but not oo_.exo_det_simul

histval_file

  • accept only files prepared by smoother2histval that uses odd format
  • modifies directly oo_.endo_simul, oo_.exo_simul, but not oo_.exo_det_simul
  • note that histval sets a dseries object

Proposal

  1. have the same interface for initval_file and histval_file
  2. add an option dseries to be able to pass a dseries object
  3. handle references to varexo_det variables
  4. use the dseries interface to read files
  5. initval_file and histval_file```set dseries`` object
  6. modify make_y_ make_ex_ accordingly
  7. handle auxiliary variables in a consistent manner (see #1004 (closed))

Breaking changes

  1. Documented behavior of initval_file: None
  2. Documented behavior of histval_file: None
  3. Documented behavior of perfect_foresight_setup: the format of files designated in option filename has changed
  4. Function initvalf.m
    • M_ and options are added to inputs
    • the old filename input triggers an error
    • function initvalf() sets a result dseries on output
  5. Function histvalf.m
    • M_ and options are added to inputs
    • the old filename input triggers an error
    • function histvalf() sets a result dseries on output
    • histvalf.mdoesn't recognize the old smoother2histval file format anymore.
  6. Function smoother2histval.m
    • when an output file is requested smoother2histval() creates a .mat file containing a single dseries
    • smoother2histval.m saves now M_.orig_maximum_lagobservations instead ofoo_.maximum_lag`` in order to be able to recompute auxiliary variables
    • It will not be possible to use a file saved with an previous version of smoother2histval

Questions

  1. Is it a problem to have an optional dseries input in an instruction called initval_file and no file strictly speaking of?

WORK IN PROGRESS

Edited May 14, 2020 by MichelJuillard
Assignee
Assign to
Time tracking