Skip to content

Commit d857354

Browse files
committed
Add W&B sweep configuration for FX trading model and tests for correlation transfer orchestrator
- Implemented `wandb_sweep_config.py` for hyperparameter optimization using Weights & Biases sweeps. - Defined sweep parameters, metrics, and configurations for TCN, LSTM, ensemble, and quick sweeps. - Created CLI entry point for sweep operations including creation, running agents, and saving configurations. - Added tests for `CorrelationTransferOrchestrator`, `CorrelationTransferConfig`, `CorrelationGroup`, and `TransferResult` to ensure functionality and correctness. - Included integration tests for correlation transfer with mocked trainers.
1 parent 0e934c4 commit d857354

42 files changed

Lines changed: 8224 additions & 106 deletions

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

best_sweep_params.json

Lines changed: 273 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,273 @@
1+
{
2+
"AUD_JPY": {
3+
"run_id": "r9amsyif",
4+
"run_name": "fanciful-sweep-1480",
5+
"val_combined_score": 0.5599538308792666,
6+
"val_direction_accuracy": 0.6470993496890918,
7+
"val_direction_f1": 0.6682366085656696,
8+
"val_loss": 0.32244205312047364,
9+
"parameters": {
10+
"lr": 0.0004470441515127597,
11+
"epochs": 200,
12+
"l2_reg": 0.00024680179186643283,
13+
"seq_len": 90,
14+
"patience": 25,
15+
"batch_size": 128,
16+
"es_monitor": "direction",
17+
"instrument": "AUD_JPY",
18+
"model_type": "tcn",
19+
"granularity": "H1",
20+
"dropout_rate": 0.2240430581552241,
21+
"top_features": 150,
22+
"tcn_dilations": [
23+
1,
24+
2,
25+
4,
26+
8,
27+
16,
28+
32
29+
],
30+
"combined_w_dir": 0.7,
31+
"tcn_nb_filters": 64,
32+
"mixed_precision": false,
33+
"tcn_kernel_size": 3,
34+
"train_smoothing": false,
35+
"direction_weight": 0.7117759829426654,
36+
"confidence_weight": 0.23801810602333617,
37+
"volatility_weight": 0.2612993478729687,
38+
"steps_per_execution": 20
39+
}
40+
},
41+
"AUD_NZD": {
42+
"run_id": "908esr1t",
43+
"run_name": "sage-sweep-115",
44+
"val_combined_score": 0.5803668287653868,
45+
"val_direction_accuracy": 0.6636352015644379,
46+
"val_direction_f1": 0.6445167758808064,
47+
"val_loss": 0.3272951924829543,
48+
"parameters": {
49+
"lr": 0.000376485387841772,
50+
"epochs": 200,
51+
"l2_reg": 0.0002084836449979829,
52+
"seq_len": 90,
53+
"patience": 20,
54+
"batch_size": 128,
55+
"es_monitor": "direction",
56+
"instrument": "AUD_NZD",
57+
"model_type": "tcn",
58+
"granularity": "H1",
59+
"dropout_rate": 0.4198753403723392,
60+
"top_features": 100,
61+
"tcn_dilations": [
62+
1,
63+
2,
64+
4,
65+
8,
66+
16
67+
],
68+
"combined_w_dir": 0.7,
69+
"tcn_nb_filters": 256,
70+
"mixed_precision": true,
71+
"tcn_kernel_size": 7,
72+
"train_smoothing": true,
73+
"direction_weight": 0.7637399768966424,
74+
"confidence_weight": 0.11728269806938624,
75+
"volatility_weight": 0.10121299937543753,
76+
"steps_per_execution": 20
77+
}
78+
},
79+
"GBP_JPY": {
80+
"run_id": "r31a4419",
81+
"run_name": "amber-sweep-1162",
82+
"val_combined_score": 0.5655595337657203,
83+
"val_direction_accuracy": 0.6654558704119492,
84+
"val_direction_f1": 0.6723575819016268,
85+
"val_loss": 0.32219775265706146,
86+
"parameters": {
87+
"lr": 0.000508018375630783,
88+
"epochs": 200,
89+
"l2_reg": 0.00014854215452162755,
90+
"seq_len": 120,
91+
"patience": 10,
92+
"batch_size": 128,
93+
"es_monitor": "direction",
94+
"instrument": "GBP_JPY",
95+
"model_type": "tcn",
96+
"granularity": "H1",
97+
"dropout_rate": 0.236136920769334,
98+
"top_features": 150,
99+
"tcn_dilations": [
100+
1,
101+
2,
102+
4,
103+
8,
104+
16,
105+
32
106+
],
107+
"combined_w_dir": 0.7,
108+
"tcn_nb_filters": 256,
109+
"mixed_precision": true,
110+
"tcn_kernel_size": 3,
111+
"train_smoothing": false,
112+
"direction_weight": 0.4914429058218283,
113+
"confidence_weight": 0.27632186070418385,
114+
"volatility_weight": 0.17508638226087642,
115+
"steps_per_execution": 10
116+
}
117+
},
118+
"EUR_GBP": {
119+
"run_id": "yxjlclgt",
120+
"run_name": "playful-sweep-776",
121+
"val_combined_score": 0.5723647936534135,
122+
"val_direction_accuracy": 0.6658087886264239,
123+
"val_direction_f1": 0.6627147182238647,
124+
"val_loss": 0.43316404872228753,
125+
"parameters": {
126+
"lr": 0.0004151371068485371,
127+
"epochs": 200,
128+
"l2_reg": 9.818506650280688e-05,
129+
"seq_len": 90,
130+
"patience": 25,
131+
"batch_size": 128,
132+
"es_monitor": "direction",
133+
"instrument": "EUR_GBP",
134+
"model_type": "tcn",
135+
"granularity": "H1",
136+
"dropout_rate": 0.36345341415711807,
137+
"top_features": 150,
138+
"tcn_dilations": [
139+
1,
140+
2,
141+
4,
142+
8,
143+
16,
144+
32
145+
],
146+
"combined_w_dir": 0.7,
147+
"tcn_nb_filters": 256,
148+
"mixed_precision": false,
149+
"tcn_kernel_size": 5,
150+
"train_smoothing": true,
151+
"direction_weight": 0.49278961130712856,
152+
"confidence_weight": 0.23782728206501497,
153+
"volatility_weight": 0.2966563407987909,
154+
"steps_per_execution": 5
155+
}
156+
},
157+
"USD_CAD": {
158+
"run_id": "gshma2xk",
159+
"run_name": "quiet-sweep-176",
160+
"val_combined_score": 0.5725060120578709,
161+
"val_direction_accuracy": 0.6637260452340774,
162+
"val_direction_f1": 0.6574445591657677,
163+
"val_loss": 0.3988782502276356,
164+
"parameters": {
165+
"lr": 0.0005519901989962603,
166+
"epochs": 200,
167+
"l2_reg": 1.3316300800268556e-05,
168+
"seq_len": 120,
169+
"patience": 25,
170+
"batch_size": 128,
171+
"es_monitor": "direction",
172+
"instrument": "USD_CAD",
173+
"model_type": "tcn",
174+
"granularity": "H1",
175+
"dropout_rate": 0.4682095412423679,
176+
"top_features": 150,
177+
"tcn_dilations": [
178+
1,
179+
2,
180+
4,
181+
8,
182+
16
183+
],
184+
"combined_w_dir": 0.7,
185+
"tcn_nb_filters": 128,
186+
"mixed_precision": false,
187+
"tcn_kernel_size": 5,
188+
"train_smoothing": true,
189+
"direction_weight": 0.4352756305293248,
190+
"confidence_weight": 0.32514258292019727,
191+
"volatility_weight": 0.26374989566302787,
192+
"steps_per_execution": 20
193+
}
194+
},
195+
"AUD_USD": {
196+
"run_id": "bancfgtj",
197+
"run_name": "upbeat-sweep-2098",
198+
"val_combined_score": 0.5682994398848402,
199+
"val_direction_accuracy": 0.6568642615700021,
200+
"val_direction_f1": 0.6642409598649697,
201+
"val_loss": 0.3364933490464924,
202+
"parameters": {
203+
"lr": 0.0006295534022502778,
204+
"epochs": 200,
205+
"l2_reg": 0.000404651109369443,
206+
"seq_len": 90,
207+
"patience": 20,
208+
"batch_size": 128,
209+
"es_monitor": "direction",
210+
"instrument": "AUD_USD",
211+
"model_type": "tcn",
212+
"granularity": "H1",
213+
"dropout_rate": 0.18260444671782752,
214+
"top_features": null,
215+
"tcn_dilations": [
216+
1,
217+
2,
218+
4,
219+
8,
220+
16,
221+
32
222+
],
223+
"combined_w_dir": 0.7,
224+
"tcn_nb_filters": 64,
225+
"mixed_precision": true,
226+
"tcn_kernel_size": 5,
227+
"train_smoothing": true,
228+
"direction_weight": 0.529630072109775,
229+
"confidence_weight": 0.3464319755001056,
230+
"volatility_weight": 0.14454377278670233,
231+
"steps_per_execution": 10
232+
}
233+
},
234+
"GBP_AUD": {
235+
"run_id": "hpgogdxs",
236+
"run_name": "rich-sweep-970",
237+
"val_combined_score": 0.5720431719524749,
238+
"val_direction_accuracy": 0.6575836265082412,
239+
"val_direction_f1": 0.65200636620744,
240+
"val_loss": 0.341413833623079,
241+
"parameters": {
242+
"lr": 0.000376474175693085,
243+
"epochs": 200,
244+
"l2_reg": 0.0002582980728204648,
245+
"seq_len": 120,
246+
"patience": 25,
247+
"batch_size": 128,
248+
"es_monitor": "direction",
249+
"instrument": "GBP_AUD",
250+
"model_type": "tcn",
251+
"granularity": "H1",
252+
"dropout_rate": 0.14112608508670477,
253+
"top_features": 150,
254+
"tcn_dilations": [
255+
1,
256+
2,
257+
4,
258+
8,
259+
16,
260+
32
261+
],
262+
"combined_w_dir": 0.7,
263+
"tcn_nb_filters": 128,
264+
"mixed_precision": false,
265+
"tcn_kernel_size": 5,
266+
"train_smoothing": false,
267+
"direction_weight": 0.6986757386634116,
268+
"confidence_weight": 0.1735623478652708,
269+
"volatility_weight": 0.14918438475288234,
270+
"steps_per_execution": 1
271+
}
272+
}
273+
}

0 commit comments

Comments
 (0)