forked from sbenthall/DistributionOfWealthMPC
-
Notifications
You must be signed in to change notification settings - Fork 8
/
Copy pathdo_custom.py
39 lines (32 loc) · 1.42 KB
/
do_custom.py
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
"""
This module runs a custom model specification, with all options specified by the user.
"""
import code.calibration as parameters
from code.estimation import estimate
param_name = "DiscFac" # Which parameter to introduce heterogeneity in
dist_type = "uniform" # Which type of distribution to use
do_param_dist = False # Do param-dist version if True, param-point if False
do_lifecycle = False # Use lifecycle model if True, perpetual youth if False
do_agg_shocks = False # Solve the FBS aggregate shocks version of the model
do_liquid = False # Matches liquid assets data when True, net worth data when False
run_estimation = True # Runs the estimation if True
# Choose which sensitivity analyses to run: rho, xi_sigma, psi_sigma, mu, urate, mortality, g, R
run_sensitivity = [False, False, False, False, False, False, False, False]
# Computes K/Y ratio for a wide range of beta; should have do_beta_dist = False
find_beta_vs_KY = False
# Uses a "tractable consumer" rather than solving full model when True
do_tractable = False
options = {
"param_name": param_name,
"dist_type": dist_type,
"run_estimation": run_estimation,
"run_sensitivity": run_sensitivity,
"find_beta_vs_KY": find_beta_vs_KY,
"do_tractable": do_tractable,
"do_param_dist": do_param_dist,
"do_lifecycle": do_lifecycle,
"do_agg_shocks": do_agg_shocks,
"do_liquid": do_liquid,
}
# Run the custom model
estimate(options, parameters)