RISE Toolbox (Modern) – Documentation
Welcome to the documentation for the modern version of the RISE
toolbox. This branch is a ground-up redesign that consolidates DSGE,
VAR, SVAR, proxy SVAR, BVAR-DSGE, and panel models behind a single
model class with a single state-space, validated entry points via
arguments blocks, and a small surface of plain-MATLAB operators.
For the legacy version, see rise-stable-docs.
Getting started
- 1. Installation
- 2. First model
- 3. Hit the ground running: an introductory example
- 3.1. The model economy
- 3.2. The model file
- 3.3. Building the model object
- 3.4. Parameterizing the model
- 3.5. Solving the non-stationary model
- 3.6. A one-shot
stoch_simulrun - 3.7. Impulse responses
- 3.8. 5th-order perturbation
- 3.9. Data from FRED
- 3.10. Priors
- 3.11. Visualizing the priors
- 3.12. Posterior maximisation
- 3.13. Posterior simulation
- 3.14. Marginal data density via the bridge estimator
- 3.15. The full driver
- 4. Modern architecture
- 4.1. Part A. Common across all shapes
- 4.1.1. One model class
- 4.1.2. Unified state-space
- 4.1.3. Always regime-switching
- 4.1.4. No construction metadata after build
- 4.1.5. Estimate dispatches on properties, not class
- 4.1.6. OOP only at the user boundary
- 4.1.7. Arguments blocks systematically
- 4.1.8. Stay close to plain MATLAB
- 4.1.9. No internal switching syntax
- 4.1.10. The common engine surface
- 4.2. Part B. What each shape contributes
- 4.3. Summary
- 4.1. Part A. Common across all shapes
Working with a model
- 1. Understanding a rise_model object
- 2. Setting up calibration and priors outside the model file
- 3. Filtering
- 4. Simulation plans
- 4.1. Why a simulation plan
- 4.2. Construction
- 4.3. Appending conditions
- 4.4. Boundary conditions: initval, endval, histval
- 4.5. Anticipation: pages
- 4.6. Hard endogenous conditions and the identification rule
- 4.7. Inspecting a plan
- 4.8. Consumption: the universal interface
- 4.9. Scope: shapes other than DSGE
- 4.10. See also
- 5. Forecasting and simulation
- 6. Solution accuracy
- 7. Failure diagnosis: diagnose(m) and friends
- 8. Storytelling
- 9. Time-varying transition probabilities
- 10. Extending RISE
- 11. Extending RISE through paradigms
Model shapes
- 1. DSGE Modeling
- 1.1. Model file language
- 1.2. Zero-th order approximation: steady state and balanced-growth path
- 1.3. First-order perturbation
- 1.4. Higher-order perturbation
- 1.5. Solving
- 1.5.1. The signature
- 1.5.2. The retcode pattern
- 1.5.3. Picking a solver
- 1.5.4. Solver options
- 1.5.5. Order of approximation
- 1.5.6. Optimal policy
- 1.5.7. Occasionally-binding constraints
- 1.5.8. Perturbation strategy
- 1.5.9. Other options worth knowing
- 1.5.10. The diagnostic protocol when solve fails
- 1.5.11. Return-code reference
- 1.5.12. The retcode-aware pattern
- 1.6. Optimal policy
- 1.6.1. The modern distinctive
- 1.6.2. Declaring the planner’s problem
- 1.6.3. Solve-time choices
- 1.6.4. Solver selection
- 1.6.5. Loose commitment and stochastic replanning
- 1.6.6. A worked example: Tatiana’s monetary-fiscal game
- 1.6.7. Nonstationary optimal policy: geometric multipliers
- 1.6.8. Where to look next
- 1.7. Optimal (optimized) simple rules
- 1.8. Occasionally-binding constraints
- 1.9. Deterministic and quasi-deterministic solutions
- 1.10. Heterogeneous agents (HANK)
- 1.11. Very large models
- 1.12. Automatic translation of files
- 2. Reduced-form VAR Modeling
- 3. Structural VAR Modeling
- 4. Proxy (instrumental) SVAR Modeling
- 5. Panel VAR Modeling
- 6. DSGE-VAR Modeling
- 6.1. Description
- 6.2. A quick-start example
- 6.2.1. A simple New Keynesian DSGE model
- 6.2.2. Setting up the BVAR-DSGE model
- 6.2.3. Fixed parameters
- 6.2.4. Priors
- 6.2.5. Collecting and transforming the data
- 6.2.6. Maximizing the posterior
- 6.2.7. IRFs of the BVAR-DSGE at the maximized posterior
- 6.2.8. IRFs of the DSGE model at the maximized posterior
- 6.2.9. IRF comparison
- 6.3. Choosing the VAR representation
Estimation
- 1. Estimation
- 1.1. Restrictions on parameters during estimation
- 1.2. Prior distributions and implementation
- 1.3. Posterior maximization
- 1.4. Posterior sampling
- 1.4.1. The sampling function
- 1.4.2. Algorithm : Random-walk Metropolis Hastings
- 1.4.3. Algorithm : Independent Metropolis Hastings
- 1.4.4. Algorithm : Adaptive parallel tempering
- 1.4.5. Algorithm : Slice Sampler
- 1.4.6. Algorithm : usrsmplr Sampler
- 1.4.7. Delayed acceptance: surrogate-accelerated chains
- 1.4.8. Checkpointing and resuming chains
- 1.4.9. User-defined Algorithms: Another approach
- 1.5. Processing Posterior draws : The mcmc class
- 1.6. Marginal Data Density computation : the mdd class
- 1.7. Indirect Inference
- 1.8. The estimation pipeline at a glance
- 1.9. Dispatch on properties, not class
- 1.10. Priors
- 1.11. Endogenous (system / property / behavioral) priors
- 1.11.1. Covariance and correlation
- 1.11.2. Impulse responses
- 1.11.3. Variance decomposition
- 1.11.4. Historical decomposition
- 1.11.5. First-order solution coefficients
- 1.11.6. Filtered / updated / smoothed probabilities
- 1.11.7. Aggregations and discontinuous ranges
- 1.11.8. User-defined endogenous priors
- 1.12. List of supported prior distributions
- 1.13. Visualizing priors (and posteriors)
- 1.14. Where priors live in the toolbox
- 1.15. Maximum likelihood (no priors)
- 1.16. Mode finding
- 1.17. Posterior simulation
- 1.18. Marginal data density
- 1.19. Chain diagnostics:
@mcmc - 1.20. Estimation restrictions
- 1.21. The pipeline, skeletally
Data and tools
Interactive demos
Advanced
- 1. Global Sensitivity Analysis and Uncertainty Quantification
- 1.1. Uncertainty Quantification
- 1.2. Monte Carlo Filtering
- 1.3. High Dimensional Model Representation
- 1.4. Surrogates: polynomial chaos, analytic Sobol’ indices
- 1.4.1. Quick start
- 1.4.2. The prior chooses the polynomials
- 1.4.3. The Gaussian-process emulator: calibrated pointwise uncertainty
- 1.4.4. Fitting on your own function
- 1.4.5. Options
- 1.4.6. Trust, but verify
- 1.4.7. Delayed-acceptance MCMC: exact posterior, fraction of the cost
- 1.4.8. Adaptive tools on top of the emulators
- 1.4.9. One call, three views: the sensitivity front-end
- 2. Stochastic Global Optimization
Indices and tables
Stéphane Adjemian, Houtan Bastani, Michel Juillard, Fréderic Karamé, Junior Maih, Ferhat Mihoubi, George Perendia, Johannes Pfeifer, Marco Ratto, and Sébastien Villemot. Dynare: Reference Manual Version 4. Dynare Working Papers 1, CEPREMAP, April 2011. URL: https://ideas.repec.org/p/cpm/dynare/001.html.
Gary Anderson. Solving Linear Rational Expectations Models: A Horse Race. Computational Economics, 31(2):95–113, March 2008. URL: https://ideas.repec.org/a/kap/compec/v31y2008i2p95-113.html, doi:10.1007/s10614-007-9108-0.
Martin M. Andreasen, Jesus Fernandez-Villaverde, and Juan Rubio-Ramirez. The pruned state-space system for non-linear dsge models: theory and empirical applications. NBER Working Papers 18983, National Bureau of Economic Research, Inc, Apr 2013. URL: http://ideas.repec.org/p/nbr/nberwo/18983.html.
Michal Andrle and Jaromir Benes. System Priors: Formulating Priors about DSGE Models' Properties. IMF Working Papers 2013/257, International Monetary Fund, Dec 2013. URL: https://ideas.repec.org/p/imf/imfwpa/2013-257.html, doi:.
Michal Andrle and Miroslav Plasil. System Priors for Econometric Time Series. Working Papers 2017/01, Czech National Bank, May 2017. URL: https://ideas.repec.org/p/cnb/wpaper/2017-01.html, doi:.
Michal Andrle and Miroslav Plašil. Econometrics with system priors. Economics Letters, 172:134–137, 2018. URL: https://www.sciencedirect.com/science/article/pii/S0165176518303598, doi:https://doi.org/10.1016/j.econlet.2018.08.038.
Y. Bar-Shalom, X.R. Li, and T. Kirubarajan. Estimation with Applications to Tracking and Navigation: Theory Algorithms and Software. Electronic and electrical engineering. Wiley, 2001. ISBN 9780471416555. URL: https://books.google.no/books?id=j2dGkwEACAAJ.
Yaakov bar-shalom, X.‐Rong Li, and Thia Kirubarajan. Estimation with Applications to Tracking and Navigation: Theory, Algorithms and Software. The Author, 01 2004. ISBN 047141655X. doi:10.1002/0471221279.ch11.
Andrew Binning and Junior Maih. Sigma point filters for dynamic nonlinear regime switching models. Working Paper 2015/10, Norges Bank, 2015. URL: https://EconPapers.repec.org/RePEc:bno:worpap:2015_10.
Stephen P. Brooks and Andrew Gelman. General methods for monitoring convergence of iterative simulations. Journal of Computational and Graphical Statistics, 7(4):434–455, 1998. doi:10.1080/10618600.1998.10474787.
Adam Cagliarini and Mariano Kulish. Solving Linear Rational Expectations Models with Predictable Structural Changes. The Review of Economics and Statistics, 95(1):328–336, March 2013. URL: https://ideas.repec.org/a/tpr/restat/v95y2013i1p328-336.html.
Yoosoon Chang, Junior Maih, and Fei Tan. Origins of monetary policy shifts: A New approach to regime switching in DSGE models. Journal of Economic Dynamics and Control, 2021. URL: https://ideas.repec.org/a/eee/dyncon/v133y2021ics0165188921001706.html, doi:10.1016/j.jedc.2021.10423.
Siddhartha Chib and Ivan Jeliazkov. Marginal likelihood from the metropolis–hastings output. Journal of the American Statistical Association, 96(453):270–281, 2001.
Seonghoon Cho. Characterizing Markov-Switching Rational Expectation Models. Working Paper, Yonsei University, February 2014.
Lawrence J. Christiano, Mathias Trabandt, and Karl Walentin. Introducing financial frictions and unemployment into a small open economy model. Journal of Economic Dynamics and Control, 35(12):1999–2041, 2011. URL: https://ideas.repec.org/a/eee/dyncon/v35y2011i12p1999-2041.html, doi:10.1016/j.jedc.2011.09.00.
Oswaldo Luiz do Valle Costa, M. D. (Marcelo Dutra) Fragoso, and Ricardo Paulino Marques. Discrete-time Markov jump linear systems. Probability and its applications. Springer, London, 2005. ISBN 1-85233-761-3. URL: http://opac.inria.fr/record=b1120049.
Piet De Jong and Singfat Chu‐Chun‐Lin. Smoothing With An Unknown Initial Condition. Journal of Time Series Analysis, 24(2):141–148, March 2003. URL: https://ideas.repec.org/a/bla/jtsera/v24y2003i2p141-148.html, doi:10.1111/1467-9892.00298.
Marco Del Negro and Frank Schorfheide. Priors from General Equilibrium Models for VARS. International Economic Review, 45(2):643–673, May 2004. URL: https://ideas.repec.org/a/ier/iecrev/v45y2004i2p643-673.html, doi:.
Marco Del Negro and Frank Schorfheide. Forming priors for dsge models (and how it affects the assessment of nominal rigidities). Journal of Monetary Economics, 55(7):1191–1208, 2008. URL: https://www.sciencedirect.com/science/article/pii/S0304393208001396, doi:https://doi.org/10.1016/j.jmoneco.2008.09.006.
Marco Del Negro, Frank Schorfheide, Frank Smets, and Rafael Wouters. On the Fit of New Keynesian Models. Journal of Business & Economic Statistics, 25:123–143, April 2007. URL: https://ideas.repec.org/a/bes/jnlbes/v25y2007p123-143.html.
James Durbin and Siem Jan Koopman. Time Series Analysis by State Space Methods. Volume of OUP Catalogue. Oxford University Press, edition, November 2012. ISBN ARRAY(0x60272498). URL: https://ideas.repec.org/b/oxp/obooks/9780199641178.html, doi:.
Roger E.A. Farmer, Daniel F. Waggoner, and Tao Zha. Minimal state variable solutions to Markov-switching rational expectations models. Journal of Economic Dynamics and Control, 35(12):2150–2166, 2011. URL: https://ideas.repec.org/a/eee/dyncon/v35y2011i12p2150-2166.html, doi:10.1016/j.jedc.2011.08.00.
Andrew Foerster, Juan F. Rubio-Ramirez, Daniel F. Waggoner, and Tao Zha. Perturbation methods for Markov-switching dynamic stochastic general equilibrium models. Quantitative Economics, 7(2):637–669, 07 2016. URL: https://ideas.repec.org/a/wly/quante/v7y2016i2p637-669.html, doi:.
Sylvia Frühwirth-Schnatter. Finite mixture and Markov switching models. Springer, Berlin, 1st edition, 2006.
Paolo Gelain, Kevin J. Lansing, and Caterina Mendicino. House Prices, Credit Growth, and Excess Volatility: Implications for Monetary and Macroprudential Policy. International Journal of Central Banking, 9(2):219–276, June 2013. URL: https://ideas.repec.org/a/ijc/ijcjou/y2013q2a11.html.
Andrew Gelman, John B. Carlin, Hal S. Stern, and Donald B. Rubin. Bayesian Data Analysis. Chapman & Hall/CRC, 2 edition, 2004.
Andrew Gelman and Donald B. Rubin. Inference from Iterative Simulation Using Multiple Sequences. Statistical Science, 7(4):457 – 472, 1992. URL: https://doi.org/10.1214/ss/1177011136, doi:10.1214/ss/1177011136.
John Geweke. Using simulation methods for bayesian econometric models: inference, development,and communication. Econometric Reviews, 18(1):1–73, 1999.
Luca Guerrieri and Matteo Iacoviello. OccBin: A toolkit for solving dynamic models with occasionally binding constraints easily. Journal of Monetary Economics, 70(C):22–38, 2015. URL: https://ideas.repec.org/a/eee/moneco/v70y2015icp22-38.html, doi:10.1016/j.jmoneco.2014.08.
Luca Guerrieri and Matteo Iacoviello. Collateral constraints and macroeconomic asymmetries. Journal of Monetary Economics, 90(C):28–49, 2017. URL: https://ideas.repec.org/a/eee/moneco/v90y2017icp28-49.html, doi:10.1016/j.jmoneco.2017.06.
V. Gupta, R.M. Murray, and B. Hassibi. On the control of jump linear markov systems with markov state estimation. In American Control Conference, 2003. Proceedings of the 2003, volume 4, 2893–2898 vol.4. June 2003. doi:10.1109/ACC.2003.1243762.
Peter N. Ireland. A method for taking models to the data. Journal of Economic Dynamics and Control, 28(6):1205–1226, 2004. URL: https://www.sciencedirect.com/science/article/pii/S0165188903000800, doi:https://doi.org/10.1016/S0165-1889(03)00080-0.
Michel Juillard and Junior Maih. Estimating DSGE Models with Observed Real-Time Expectation Data. 2010. URL: https://www.kansascityfed.org/publicat/events/research/2010CenBankForecasting/Maih_paper.pdf.
C.J. Kim and C.R. Nelson. State-space Models with Regime Switching: Classical and Gibbs-sampling Approaches with Applications. MIT Press, 1999. ISBN 9780262112383. URL: http://books.google.no/books?id=eQFsQgAACAAJ.
Chang-Jin Kim and Charles Nelson. A bayesian approach to testing for markov-switching in univariate and dynamic factor models. International Economic Review, 42(4):989–1013, 2001. URL: http://EconPapers.repec.org/RePEc:ier:iecrev:v:42:y:2001:i:4:p:989-1013.
Paul Klein. Using the generalized schur form to solve a multivariate linear rational expectations model. Journal of Economic Dynamics and Control, 24(10):1405–1423, September 2000. URL: http://ideas.repec.org/a/eee/dyncon/v24y2000i10p1405-1423.html.
S. J. Koopman and J. Durbin. Fast Filtering and Smoothing for Multivariate State Space Models. Journal of Time Series Analysis, 21(3):281–296, May 2000. URL: https://ideas.repec.org/a/bla/jtsera/v21y2000i3p281-296.html, doi:10.1111/1467-9892.00186.
S. J. Koopman and J. Durbin. Filtering and smoothing of state vector for diffuse state‐space models. Journal of Time Series Analysis, 24(1):85–98, January 2003. URL: https://ideas.repec.org/a/bla/jtsera/v24y2003i1p85-98.html, doi:10.1111/1467-9892.00294.
Junior Maih. Conditional forecasts in DSGE models. Working Paper 2010/07, Norges Bank, April 2010. URL: https://ideas.repec.org/p/bno/worpap/2010_07.html.
Junior Maih. Efficient perturbation methods for solving regime-switching DSGE models. Working Paper 2015/01, Norges Bank, January 2015. URL: https://ideas.repec.org/p/bno/worpap/2015_01.html, doi:.
Junior Maih and Daniel Waggoner. Perturbation Methods for DSGE Models with Time Varying Coefficients and Transition Matrices. Mimeograph, Norges Bank, 2018.
Xiao-Li Meng and Wing Hung Wong. Simulating ratios of normalizing constants via a simple identity: a theoretical exploration. Statistica Sinica, 6(4):831–860, 1996. URL: http://www.jstor.org/stable/24306045.
Btażej Miasojedow, Eric Moulines, and Matti Vihola. An adaptive parallel tempering algorithm. Journal of Computational and Graphical Statistics, 22(3):649–664, 2013.
Christophe Planas, Marco Ratto, and Alessandro Rossi. Slice sampling in bayesian estimation of dsge models. Working Papers, Joint Research Centre, European Commission, 2015.
Christophe Planas and Alessandro Rossi. The slice sampler and centrally symmetric distributions. Working Papers 2018-11, Joint Research Centre, European Commission, November 2018. URL: https://ideas.repec.org/p/jrs/wpaper/201811.html, doi:.
Adrian E. Raftery and Steven Lewis. How many iterations in the gibbs sampler? In A. P. Dawid J. M. Bernardo, J. Berger and A. F. M. Smith, editors, Bayesian Statistics, volume 4, 763–73. Oxford University Press, 1992.
Marco Ratto. Analysing dsge models with global sensitivity analysis. Computational Economics, 31:115–139, 02 2008. doi:10.1007/s10614-007-9110-6.
Francisco Ruge-Murcia. Estimating nonlinear dsge models by the simulated method of moments: with an application to business cycles. Journal of Economic Dynamics and Control, 36(6):914–938, 2012. URL: https://www.sciencedirect.com/science/article/pii/S0165188912000231, doi:https://doi.org/10.1016/j.jedc.2012.01.008.
Christopher A Sims. Solving Linear Rational Expectations Models. Computational Economics, 20(1-2):1–20, October 2002. URL: https://ideas.repec.org/a/kap/compec/v20y2002i1-2p1-20.html.
Christopher A. Sims, Daniel F. Waggoner, and Tao Zha. Methods for inference in large multiple-equation Markov-switching models. Journal of Econometrics, 146(2):255–274, October 2008. URL: https://ideas.repec.org/a/eee/econom/v146y2008i2p255-274.html, doi:.
Charles F. Van Loan. The ubiquitous Kronecker product. Journal of Computational and Applied Mathematics, 123(123):85–100, 2000.