config.json
2.9 KB · 121 lines · json Raw
1 {
2 "model_type": "v4_regime_threshold",
3 "base_model": "LightGBM regressor (MSE, 47 features)",
4 "objective": "predict next-day log return per stock",
5 "feature_columns": [
6 "logret_1d",
7 "ret_2d",
8 "ret_3d",
9 "ret_5d",
10 "ret_10d",
11 "ret_20d",
12 "ret_60d",
13 "ret_120d",
14 "ret_252d",
15 "vol_5d",
16 "vol_20d",
17 "vol_60d",
18 "dd_20d",
19 "dd_60d",
20 "dd_252d",
21 "mom_12_1",
22 "px_over_ma_20",
23 "px_over_ma_50",
24 "px_over_ma_200",
25 "logv",
26 "logv_over_ma_5",
27 "logv_over_ma_20",
28 "logv_over_ma_60",
29 "dollar_vol_20",
30 "range_pct",
31 "body_pct",
32 "gap_pct",
33 "up_frac_10",
34 "up_frac_20",
35 "ret_20d_chg",
36 "vwap_gap",
37 "ret_z60",
38 "days_since_earn",
39 "days_until_earn",
40 "near_earn_window",
41 "eps_est_known",
42 "dow",
43 "spy_ret_20",
44 "spy_vol_20",
45 "spy_dd_252",
46 "spy_over_ma_200",
47 "xs_ret_5d",
48 "xs_ret_20d",
49 "xs_vol_20d",
50 "xs_mom_12_1",
51 "xs_px_over_ma_50",
52 "xs_dd_60d"
53 ],
54 "transaction_cost_bps": 5.0,
55 "regime_rule": {
56 "trigger": "SPY above 200-day moving average",
57 "bull_threshold": -0.003,
58 "bear_threshold": "tuned per split on last 10% of training",
59 "description": "In bull regime, stay long unless prediction < bull_threshold. In bear regime, long only if pred > bear_threshold."
60 },
61 "training": {
62 "base_params": {
63 "objective": "regression",
64 "metric": "l2",
65 "learning_rate": 0.03,
66 "num_leaves": 63,
67 "min_data_in_leaf": 200,
68 "feature_fraction": 0.8,
69 "bagging_fraction": 0.8,
70 "bagging_freq": 5,
71 "lambda_l2": 1.0
72 },
73 "num_boost_round": 2000,
74 "early_stopping_rounds": 50,
75 "val_frac": 0.1,
76 "val_selection": "chronological last 10% of train dates"
77 },
78 "decision": "long if position=1 else cash (no shorts, no leverage)",
79 "splits": {
80 "2010": {
81 "train_start": "2005-01-01",
82 "train_end": "2009-12-31",
83 "test_start": "2010-01-01",
84 "test_end": "2010-12-31",
85 "bear_threshold": -0.002,
86 "best_iter": 1
87 },
88 "2018": {
89 "train_start": "2005-01-01",
90 "train_end": "2017-12-31",
91 "test_start": "2018-01-01",
92 "test_end": "2018-12-31",
93 "bear_threshold": -0.002,
94 "best_iter": 90
95 },
96 "2020": {
97 "train_start": "2005-01-01",
98 "train_end": "2019-12-31",
99 "test_start": "2020-01-01",
100 "test_end": "2020-12-31",
101 "bear_threshold": -0.00175,
102 "best_iter": 280
103 },
104 "2022": {
105 "train_start": "2005-01-01",
106 "train_end": "2021-12-31",
107 "test_start": "2022-01-01",
108 "test_end": "2022-12-31",
109 "bear_threshold": -0.002,
110 "best_iter": 1
111 },
112 "live": {
113 "train_start": "2005-01-01",
114 "train_end": "2025-04-23",
115 "test_start": "2025-04-24",
116 "test_end": "2026-04-23",
117 "bear_threshold": -0.00125,
118 "best_iter": 120
119 }
120 }
121 }