Commit Graph

9699 Commits (90affdd775badf64760c9fe35167979161ff49cf)

Author SHA1 Message Date
Stéphane Adjemian(Charybdis) fbf2fae036 Changed option value for unscented integration nodes. 2016-05-24 17:28:24 +02:00
Stéphane Adjemian(Charybdis) edce6b4779 Added integration test for Monte-Carlo EP. 2016-05-24 17:28:24 +02:00
Stéphane Adjemian(Charybdis) fdbd4fa7a7 Code factorization.
- Added routines for initializing and setting shocks in EP.
 - Added a specialized routine for doing Monte Carlo around EP.
2016-05-24 17:28:24 +02:00
Stéphane Adjemian(Charybdis) 3bbac629ed Cosmetic change.
Removed maximum_lead and maximum_lag in extended_path routines.
2016-05-24 17:28:24 +02:00
Stéphane Adjemian(Charybdis) d74f315bfb Fixed bug in (Stochastic) Extended Path algorithm.
Innovations were not correctly passed to the non linear solver. Closes #1128.
2016-05-24 17:28:24 +02:00
Stéphane Adjemian(Charybdis) 6dcfd1c072 Added integration test.
Test that the extended path and stoch_simul (with order equal to 1)
algorithms return the same paths for the endogenous variables if the
RE model is linear.
2016-05-24 17:28:24 +02:00
Stéphane Adjemian (Hermes) 4926b6c6ff Added a routine the residuals of a model.
Takes a path for the endogenous variables and returns the residuals of
the dynamic equations. This routine is useful for solving the model with
the PEA approach.
2016-05-24 17:28:24 +02:00
Stéphane Adjemian (Hermes) ea1ebfa911 Added argument to simul_backward_nonlinear_model.
First input argument is a vector for the initial condition of the
endogenous variables. If empty, the steady state of the model is used.
2016-05-24 17:28:24 +02:00
Stéphane Adjemian (Hermes) e507a6d0a9 Fixed copyright header. 2016-05-24 17:28:24 +02:00
Stéphane Adjemian (Hermes) 8958b7ef98 Cosmetic changes. 2016-05-24 17:28:24 +02:00
Stéphane Adjemian (Hermes) 3a1f74d7a7 Fixed typo. 2016-05-24 17:28:24 +02:00
Stéphane Adjemian (Hermes) 13ca15a278 Allow (S)EP with arbitrary sequence of innovations.
The third input argument of extended_path Matlab/Octave's routine is the
sequence of shocks (T*n array, where n is the number of exogenous
variables and T is the size of the sample). If the third argument is
empty, the (stochastic) extended path is run with gaussian
innovations (this corresponds to the previous behaviour).

TODO:
 - Fix the compatibility with ep.replic_nbr
 - Check the 'calibrated' mode.
2016-05-24 17:28:24 +02:00
Stéphane Adjemian (Hermes) b60bd7b36b Removed globals from extended_path routine. 2016-05-24 17:28:24 +02:00
Stéphane Adjemian (Hermes) 635d5b704b Added description of options lmmcp and stack_solve_algo==7 in reference manual. 2016-05-24 17:28:24 +02:00
Stéphane Adjemian (Hermes) 4bd8ef7a9f Added new integration tests.
Simulation of the Smets and Wouters perfect foresight model, with a
productivity shock such that the nominal interest rate hits the
ZLB. Comparison of the solutions returned by a Newton
algorithm (stack_solve_algo==0) and the LMMCP algorithm. AT the time of
this commit, the results are different... Probably an issue with the
LMMCP algorithm.
2016-05-24 17:28:24 +02:00
Stéphane Adjemian (Hermes) ee78ad2049 Improved execution speed.
Removed some calls to bsxfun which is not optimal on sparse matrices. I
only removed the calls where I identified bottlenecks (with a Smets and
Wouters model), more tests are needed to decide if we have to remove other
occurences of bsxfun on sparse matrices.
2016-05-24 17:26:06 +02:00
Stéphane Adjemian (Hermes) be0f6230ad Cosmetic changes.
- Use a switch-case block.
 - Added a warning when the user tries to solve a linear(ized) model
with solve_algo different from 0 (for a linear model).
 - Added an error message if the user try to solve a linearized model
with stack_solve_algo=6 (not implemented).
2016-05-24 17:26:06 +02:00
Stéphane Adjemian (Hermes) 1815eb8e56 Code factorization. 2016-05-24 17:26:06 +02:00
Stéphane Adjemian (Hermes) 8a163842d0 Removed oo_ from sim1_linear routine. 2016-05-24 17:26:06 +02:00
Stéphane Adjemian (Hermes) 7eed391eb7 Do not display max. abs. error. 2016-05-24 17:26:06 +02:00
Stéphane Adjemian (Hermes) 4e8fcf6d47 Use lmmcp option in integration tests. 2016-05-24 17:26:06 +02:00
Stéphane Adjemian (Hermes) 97d094b6dd Added mention to equation tags in Ref. manual. 2016-05-24 17:26:06 +02:00
Stéphane Adjemian (Hermes) 53747cb082 Fixed lmmcp option.
This option may be used in extended_path and perfect_foresight_solver commands.
2016-05-24 17:26:06 +02:00
Stéphane Adjemian (Hermes) 7355214413 Added integration tests for lmmcp in testsuite.
Also merged rbcii.mod and rbciia.mod.
2016-05-24 17:26:06 +02:00
Stéphane Adjemian (Hermes) 8b084595e2 Added solve_algo as an option for perfect_foresight_solver. 2016-05-24 17:26:06 +02:00
Stéphane Adjemian (Charybdis) 8763c29f34 Renamed and changed integration test for sim1_purely_forward routine.
Check the results against analytical solution. Also added a new
integration test (ar1.mod).
2016-05-24 17:26:06 +02:00
Stéphane Adjemian (Charybdis) 02c71eb270 Renamed and changed integration test for sim1_purely_backward routine.
Compare the solution returned by sim1_purely_backward with the true solution.
2016-05-24 17:26:06 +02:00
Stéphane Adjemian (Charybdis) e0be60710c Removed oo_ from sim1_purely_{backward,forward} routines. 2016-05-24 17:26:06 +02:00
Stéphane Adjemian (Charybdis) 0abb9dc6f9 Added integration test.
Comparison of the solutions for the endogenous variables in perfect
foresight models with stack_solve_algo equal to 0 and 6 (LBJ, legacy
algorithm).
2016-05-24 17:26:06 +02:00
Stéphane Adjemian (Charybdis) 290ce5db68 Removed oo_ from sim1_lbj routine. 2016-05-24 17:26:06 +02:00
Stéphane Adjemian (Charybdis) 674c9ab286 Removed oo_ from sim1 routine. 2016-05-24 17:26:06 +02:00
Stéphane Adjemian (Hermes) 4658d81740 Add pointer to user written steady state routine. 2016-05-23 13:48:19 +02:00
Stéphane Adjemian (Hermes) f0229f3b1c Removed workspace() in examples. 2016-05-23 13:48:19 +02:00
Stéphane Adjemian (Hermes) 9c1739520b Bug fix in assert (Julia output)
Same as 4b830d29ed2d230908a1a5ec1c7badd29c7dc86a but for static model.
2016-05-23 13:48:19 +02:00
Stéphane Adjemian (Hermes) 0398832e4f Assign parameter values in main julia module.
See PR #1102 by spencerlyon2.

Added support for filling in the model.params Vector.
2016-05-23 13:48:19 +02:00
Stéphane Adjemian (Hermes) cf9883ef61 Bug fix in assert (Julia output).
See PR #1102 by spencerlyon2.

size always returns a tuple, and we were comparing to an int. Dispatch restricts these arguments to all be vectors so length works here.
2016-05-23 13:48:19 +02:00
Stéphane Adjemian (Hermes) e65c4f970b Fixed indexing of params in steady state file. 2016-05-23 13:48:19 +02:00
Stéphane Adjemian (Hermes) e44d90adc1 Fixed type issues.
params, exo_steady_state and steady_state are vectors not matrices!
2016-05-23 13:48:19 +02:00
Stéphane Adjemian (Hermes) 2e8f528bef Cosmetic changes.
+ Renamed model as model_
+ Renamed options as options_
+ Renamed output as oo_
+ Also export oo_ and options_
+ Fixed typos in comments.
2016-05-23 13:48:19 +02:00
Stéphane Adjemian (Hermes) a858ef6986 Updated .gitignore file. 2016-05-23 13:48:19 +02:00
Stéphane Adjemian (Hermes) c3b5aee714 Specialize @dynare macro if one model is processed.
In this case importall is used instead of import.
2016-05-23 13:48:19 +02:00
Stéphane Adjemian (Hermes) bcd39ef2f7 Made room for user written steady state file. 2016-05-23 13:48:19 +02:00
Stéphane Adjemian (Hermes) 96d538469c Added boolean variable for tracking if a steadystate block is present in the mod file. 2016-05-23 13:48:19 +02:00
Stéphane Adjemian (Hermes) 73787c0c16 Removed try-catch block. 2016-05-23 13:48:19 +02:00
Stéphane Adjemian (Hermes) 928b0a50a5 Fixed crash when steadystate block does not exist. 2016-05-23 13:48:19 +02:00
Stéphane Adjemian (Hermes) 4bf436ec33 Fixed typo in comments. 2016-05-23 13:48:19 +02:00
Stéphane Adjemian (Hermes) 5998558c32 Fixed deprecated require issue + Changed interface
+ Fixed deprecated require().

+ Changed @dynare macro and added new macro @compile.
  The new macro @compile just runs the preprocessor, while the macro
  @dynare calls compile and put the generated objects in the
  workspace. Note that this macro can take an arbitrary number of mod
  files as argument.

      *Example*

      @dynare "rbc.mod" "nk.mod"

      Will run the preprocessor on both models, and the generated
      data (model descriptions, options, ...) are available in the
      workspace. For instance, to obtain the number of equations:

	julia> rbc.model.eq_nbr
   	6

   	julia> nk.model.eq_nbr
   	10

   	@compile "rbc.mod" "nk.mod"

   	Will run the preprocessor on both models, but will not load the
   	generated data in the workspace. This can be done as follows:

   	julia> using rbc

+ Changed examples (rbc1 has a steady state block but not rbc2), using
  new interface.
2016-05-23 13:48:19 +02:00
Houtan Bastani 25f6d81cb7 Merge pull request #1200 from rattoma/gsa
identification and slice
2016-05-23 11:59:26 +02:00
Marco Ratto 3e8dbcfc7e Set mode_files in such a way that it can be handled with key-value pair.
We need a single mode file that contains variable xparams = [x1 x2 x3] all multiple modes, one per column.
Fixes #1199
2016-05-22 23:15:18 +02:00
Marco Ratto d8fea3ff13 Correlations and measurement errors in identification:
1) Filter out measurement errors with error message that suggests to explicitly write measurement errors in model definition
2) allow identification checks with correlations, by switching to numerical derivatives
2016-05-22 23:10:01 +02:00