Repository navigation
Expand file tree
/
Copy pathmain.py
More file actions
45 lines (38 loc) · 1.59 KB
/
Copy pathmain.py
File metadata and controls
45 lines (38 loc) · 1.59 KB
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
40
41
42
43
44
45
import argparse
from src.experiments import e1_topology, e2_shock_loc, e3_heterogeneity, e4_severity
from src.analysis import validation
def main():
parser = argparse.ArgumentParser()
parser.add_argument("--experiment", choices=["E1", "E2", "E3", "E4", "all"], default="all")
parser.add_argument("--validation", choices=["V1", "V2", "V3", "V4", "V5", "V6", "V7", "all"], default="all")
args = parser.parse_args()
if args.experiment in ["E1", "all"]:
results = e1_topology.run_e1()
e1_topology.summarise_e1(results)
if args.experiment in ["E2", "all"]:
results = e2_shock_loc.run_e2()
e2_shock_loc.summarise_e2(results)
if args.experiment in ["E3", "all"]:
results = e3_heterogeneity.run_e3()
e3_heterogeneity.summarise_e3(results)
if args.experiment in ["E4", "all"]:
results = e4_severity.run_e4()
e4_severity.summarise_e4(results)
if args.validation == "all":
validation.run_all_validations()
if args.validation == "V1":
validation.test_v1_zero_shock()
if args.validation == "V2":
validation.test_v2_single_isolated_default()
if args.validation == "V3":
validation.test_v3_monotonicity_in_delta()
if args.validation == "V4":
validation.test_v4_convergence()
if args.validation == "V5":
validation.test_v5_balance_sheet_accounting()
if args.validation == "V6":
validation.test_v6_elminejad_heterogeneity()
if args.validation == "V7":
validation.test_v7_en_monotonicity()
if __name__ == "__main__":
main()