An open sourece DSGE solver under uncertainty
Project description
Risk Uncertainty Value
Expansion Suite
is an open source Python toolbox for macro-finance research. It solves the nonlinear DSGE model with recursive utility formulation motivated by robustness or risk concerns based on the small-noise expansion method.
Expansion Suite
is built on the Linear Quadratic framework proposed by Borovička and Hansen (2014). It follows the algorithm in Exploring Recursive Utility to approximate the model solution under uncertainty.
Jupyter Notebook Illustrations
-
A guide to solve the DSGE model with
Expansion Suite
. -
An example of the Adjustment Cost Model is provided in the notebook.
-
A guide to compute shock elasticities with
Expansion Suite
-
An example of the Bansal Yaron Long-run Risk Model is provided in the notebook.
- Provides a five-minute guide to solve the DSGE model using the expansion suite, as well as how to
- compute shock elasticities and IRF
- approximate and simulate variables based on model solutions.
- Provides some examples for
LinQuadVar
computations
Source Files
- Defines the linear-quadratic variable structure to facilitate operations in expansion solvers and elasticity calculation with
LinQuadVar
class.
- Integrated operation tools on
LinQuadVar
.
- Matrix and linear algebra operation functions facilitate the computation.
- Functions to compute numerical derivatives used in the expansion solver.
- Functions to implement first and second order expansion, approximate the continuation values, change of probability measure, and iteration schemes.
- Functions to compute shock elasticities.
- Produce the solutions for the Bansal Yaron Long-run Risk Model used in the shockelasticity.ipynb.
Recent Updates, by Jan. 27, 00:12, CT
-
-
remove
gb_tp1
as a state variable -
parameters updating for the adjustment cost model example, which are consistent with the homework.
- Note the $\gamma=1$ cannot be solved by the
Expansion Suite
, the reason is that $1-\gamma$ will show in denominators of the recursive utility adjustment terms, we can try to use values close to $1$,γ=1+1e-5
, for example.
γ = 10. ρ = 4./3 β = np.exp(-0.0025) a = 0.0288 ϕ_2 = 88. ϕ_1 = 1/ϕ_2 α_k = 0.0088 σ_k = np.array([[0.477],[0]]) * 0.01 A = np.exp(-0.014) B = np.array([[0.011,0.025]]) * 0.01
- Note the $\gamma=1$ cannot be solved by the
-
-
uncertain_expansion.py, lin_quad_util.py, BY_example_sol.py
- New functions and methods added
-
- New notebook added
- Section 1 is a five-minute guide for the
Expansion Suite
as a DSGE solver. - Section 2 are examples for the computations in
LinQuadVar
.
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
File details
Details for the file mfrpy-0.0.1.tar.gz
.
File metadata
- Download URL: mfrpy-0.0.1.tar.gz
- Upload date:
- Size: 29.2 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.2 CPython/3.9.12
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | c5a0b8c3617f8acf660056cbbffa045be40e4218a54c8119b4a04c3c5d8b841d |
|
MD5 | ef9b5944ed3ea0688d7219175e505102 |
|
BLAKE2b-256 | 04cca79ee628fd738de6bd486df813c523c309e437435070207c62c0d76e4ec5 |
File details
Details for the file mfrpy-0.0.1-py3-none-any.whl
.
File metadata
- Download URL: mfrpy-0.0.1-py3-none-any.whl
- Upload date:
- Size: 30.9 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.2 CPython/3.9.12
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 60359ca825e479065c20c3d1ee339dd4d5d8f2e555462dd1845c526bb5554f3f |
|
MD5 | 4dbc9cec5de1726328640bd788e75987 |
|
BLAKE2b-256 | eb26bf068df75e158688d79323a69c20879a3bf3f6c5ef581b83572f476de875 |