-
Notifications
You must be signed in to change notification settings - Fork 5
/
main.py
47 lines (46 loc) · 1.62 KB
/
main.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
40
41
42
43
44
45
46
47
from implement_experiment_functions import *
for max_depth in [8, 11, 14]:
for min_sample in [5]:
# Fama-French Carhart
test_multiple_periods(
months_testing_period=36,
characteristics=['hml', 'smb', 'mom'],
factors=['mkt', 'hml', 'smb', 'mom'],
sorting_quantiles=3,
ap_tree_max_depth=max_depth,
ap_tree_min_samples_leaf=min_sample
)
# CAPM
test_multiple_periods(
months_testing_period=36,
characteristics=['hml', 'smb', 'mom'],
factors=['mkt'],
sorting_quantiles=3,
ap_tree_max_depth=max_depth,
ap_tree_min_samples_leaf=min_sample
)
test_multiple_periods(
months_testing_period=36,
characteristics=['hml', 'smb'],
factors=['mkt'],
sorting_quantiles=4,
ap_tree_max_depth=max_depth,
ap_tree_min_samples_leaf=min_sample
)
# Fama-French
test_multiple_periods(
months_testing_period=36,
characteristics=['hml', 'smb'],
factors=['mkt', 'hml', 'smb'],
sorting_quantiles=4,
ap_tree_max_depth=max_depth,
ap_tree_min_samples_leaf=min_sample
)
test_multiple_periods(
months_testing_period=36,
characteristics=['hml', 'smb', 'mom'],
factors=['mkt', 'hml', 'smb'],
sorting_quantiles=3,
ap_tree_max_depth=max_depth,
ap_tree_min_samples_leaf=min_sample
)