Dynare perfect foresight simulation - how do I access solution to endogenous variables?

I ran the example1pf.mod from Dynare.jl on GitHub. I know output is stored in the .jld2 file in the “output” folder. But how do I actually access the solution to endogenous variables so that I can use them, e.g. plotting their time series? Many thanks!

There exist the following undocumented accessor functions:

  • simulation(): returns a vector of simulation results
  • simulation(1): returns the first simulation in a TimeDataFrame
  • simulation(:Y): returns the simulated trajectory for variable Y
  • simulation((:Y, :X))+ returns a TimeDataFrame with the simulated trajectory for variables Y and X
  • irfs()+ returns a dictionary with an entry for each exogenous variable
  • irfs(:e)+ returns a TimeDataFrame with IRFs for shock on variable e
  • irfs(:e, :Y)+ returns a TimeDataFrame with IRFs for shock on variable e for endogenous variable Y
  • irfs(:e, (:X, :Y))+ returns a TimeDataFrame with IRFs for shock on variable e for endogenous variable X and Y
1 Like

Many many many thanks!!!

Using julia dynare for the perfect foresight. Works perfectly in Matlab but in Julia I am getting a sparse matrix error. I loaded in suggested packages for using the perfect forsight, The initial context works well but when I do the command for the perfect foreseight solver in Julia I get the sparse matrix error Is this a bug (using Julia 12? Or is the model to large with T = 2000? Again it works in Matlab. Thanks

Please read Please read: make it easier to help you

  • Make a new post rather than posting on old, only tangentially related threads
  • Include a minimum working example to show people what you’ve done
  • Include Julia and package versions so people can replicate your setup