-
Notifications
You must be signed in to change notification settings - Fork 2
/
hparams.yaml
306 lines (287 loc) · 11 KB
/
hparams.yaml
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
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
data_root:
'9': '/data3/finance'
dataset_setting:
'vol':
time_idx: 'days_from_start'
target: 'log_vol'
group_ids: ['Symbol', 'Region']
static_categoricals: ['Symbol', 'Region']
static_reals: []
time_varying_known_categoricals: ["day_of_week", "day_of_month", "week_of_year", "month"]
variable_groups: {}
time_varying_known_reals: ["days_from_start"]
time_varying_unknown_categoricals: []
time_varying_unknown_reals: ["log_vol", "open_to_close"]
'stock_idx':
time_idx: 'days_from_start'
target: 'close_price'
group_ids: ['Symbol', 'Region']
static_categoricals: ['Symbol', 'Region']
static_reals: []
time_varying_known_categoricals: ["day_of_week", "day_of_month", "week_of_year", "month"]
variable_groups: {}
time_varying_known_reals: ["days_from_start"]
time_varying_unknown_categoricals: []
time_varying_unknown_reals: ["close_price", "log_vol", "open_to_close"]
'btc_krw':
time_idx: 'days_from_start'
target: 'Close'
group_ids: ['Symbol']
static_categoricals: ['Symbol']
static_reals: []
time_varying_known_categoricals: ['day_of_week', 'day_of_month', 'week_of_year', 'month']
variable_groups: {}
time_varying_known_reals: ["days_from_start"]
time_varying_unknown_categoricals: []
time_varying_unknown_reals: ["Close", "Volume", "Change"]
'btc_usd':
time_idx: 'days_from_start'
target: 'Close'
group_ids: ['Symbol']
static_categoricals: ['Symbol']
static_reals: []
time_varying_known_categoricals: ['day_of_week', 'day_of_month', 'week_of_year', 'month']
variable_groups: {}
time_varying_known_reals: ["days_from_start"]
time_varying_unknown_categoricals: []
time_varying_unknown_reals: ["Close", "Volume", "Change"]
'crypto':
time_idx: 'days_from_start'
target: 'Close'
# target: 'Return'
group_ids: ['Symbol']
static_categoricals: ['Symbol']
static_reals: []
time_varying_known_categoricals: ['day_of_week', 'day_of_month', 'week_of_year', 'month']
variable_groups: {}
time_varying_known_reals: ["days_from_start"]
time_varying_unknown_categoricals: []
time_varying_unknown_reals: ["Return", "Close", "Volume", "Market Cap"]
# time_varying_unknown_reals: ["Return"]
'crypto_hourly':
time_idx: 'hours_from_start'
target: 'Close'
group_ids: ['Symbol']
static_categoricals: ['Symbol']
static_reals: []
time_varying_known_categoricals: ['hour', 'day_of_week', 'day_of_month', 'week_of_year', 'month']
variable_groups: {}
time_varying_known_reals: ["hours_from_start"]
time_varying_unknown_categoricals: []
time_varying_unknown_reals: ["Return", "Close", "Volume USD"]
'crypto_daily':
time_idx: 'days_from_start'
target: 'Close'
group_ids: ['Symbol']
static_categoricals: ['Symbol']
static_reals: []
time_varying_known_categoricals: ['day_of_week', 'day_of_month', 'week_of_year', 'month']
variable_groups: {}
time_varying_known_reals: ["days_from_start"]
time_varying_unknown_categoricals: []
time_varying_unknown_reals: ["Return", "Close", "Volume USD"]
'sp500':
time_idx: 'days_from_start'
target: 'Close'
group_ids: ['Symbol']
static_categoricals: ['Symbol', 'Sector']
static_reals: []
time_varying_known_categoricals: ['day_of_week', 'day_of_month', 'week_of_year', 'month']
variable_groups: {}
time_varying_known_reals: ["days_from_start"]
time_varying_unknown_categoricals: []
time_varying_unknown_reals: ["Close", "Volume"]
'kospi':
time_idx: 'days_from_start'
target: 'Close'
group_ids: ['Symbol']
static_categoricals: ['Symbol', 'Sector']
static_reals: []
time_varying_known_categoricals: ['day_of_week', 'day_of_month', 'week_of_year', 'month']
variable_groups: {}
time_varying_known_reals: ["days_from_start"]
time_varying_unknown_categoricals: []
time_varying_unknown_reals: ["Close", "Volume"]
'kospi200':
time_idx: 'days_from_start'
target: 'Close'
group_ids: ['Symbol']
static_categoricals: ['Symbol', 'Sector']
static_reals: []
time_varying_known_categoricals: ['day_of_week', 'day_of_month', 'week_of_year', 'month']
variable_groups: {}
time_varying_known_reals: ["days_from_start"]
time_varying_unknown_categoricals: []
# time_varying_unknown_reals: ["Close", "Volume"]
# time_varying_unknown_reals: ["Open", "High", "Low", "Close", "Volume", "Change"]
time_varying_unknown_reals: ["Close"] # for DeepAR
'kospi200+AUDCHF':
time_idx: 'days_from_start'
target: 'Close'
group_ids: ['Symbol']
static_categoricals: ['Symbol', 'Sector']
static_reals: []
time_varying_known_categoricals: ['day_of_week', 'day_of_month', 'week_of_year', 'month']
variable_groups: {}
time_varying_known_reals: ["days_from_start"]
time_varying_unknown_categoricals: []
time_varying_unknown_reals: ["Close", "Volume", "Change", "AUD_CHF_Close", "AUD_CHF_Change"]
'kospi200+TI':
time_idx: 'days_from_start'
target: 'Close'
group_ids: ['Symbol']
static_categoricals: ['Symbol', 'Sector']
static_reals: []
time_varying_known_categoricals: ['day_of_week', 'day_of_month', 'week_of_year', 'month']
variable_groups: {}
time_varying_known_reals: ["days_from_start"]
time_varying_unknown_categoricals: []
time_varying_unknown_reals: ['Open', 'High', 'Low', 'Close', 'Volume', 'Change', 'mc_mc', 'mc_mcdiff', 'mc_mcsig', 'pa_pa', 'pa_pad', 'pa_padi',
'pa_pau', 'pa_paui', 'bb_bbm', 'bb_bbh', 'bb_bbl', 'bb_bbhi', 'bb_bbli', 'so_so', 'so_sosi', 'roc', 'obv', 'fi'] # 24 features
# time_varying_unknown_reals: ['Close'] # only close price
model:
hidden_size: 160 #160
attention_head_size: 1 #1
dropout: 0.3 #0.3
hidden_continuous_size: 8 #8
output_size: 3 # 7 quantiles by default
log_interval: 10 # uncomment for learning rate finder and otherwise, e.g. to 10 for logging every 10 batches
reduce_on_plateau_patience: 1000 # 1000
alpha: 0.5 # (shape:time) ratio in DILATE
weight: 0.1 # weight for directional and dilate quantile loss
ent_ratio: 1.5 # entmax ratio for Sparse Transformer {1.5: entmax15, 2.0: sparsemax}
optimizer: 'ranger' # default: 'ranger'
experiment:
epoch: 50 # 50
batch_size: 128 # (64, 512)
lr:
vol: 0.01
stock_idx: 0.01
btc_krw: 0.01
btc_usd: 0.01
crypto: 0.01
crypto_hourly: 0.01
crypto_daily: 0.01
sp500: 0.01
kospi: 0.01
kospi200: 0.01
kospi200+AUDCHF: 0.01
kospi200+TI: 0.01 #0.01
max_prediction_length: 5 #5
max_encoder_length:
vol: 252
stock_idx: 252
btc_krw: 252
btc_usd: 252
crypto: 252
crypto_hourly: 252
crypto_daily: 252
sp500: 252
kospi: 252
kospi200: 252 # 252, 504
kospi200+AUDCHF: 252
kospi200+TI: 252
symbol_boundary:
'.SPX':
'recession':
- '2008.02.01'
- '2009.02.01'
'stable':
- '2014.08.01'
- '2015.08.01'
'boom':
- '2019.02.01'
- '2020.02.01'
train_boundary:
vol: '2000'
stock_idx: '2000'
btc_krw: '2000'
btc_usd: '2000'
crypto: '2000'
crypto_hourly: '2000'
crypto_daily: '2000'
sp500: '2000'
kospi: '2010'
kospi200: '2010'
kospi200+AUDCHF: '2010'
kospi200+TI: '2010'
valid_boundary:
vol: '2016'
stock_idx: '2016'
btc_krw: '2019'
btc_usd: '2016'
crypto: '2016'
crypto_hourly: '2019'
crypto_daily: '2019'
sp500: '2019'
kospi: '2019'
kospi200: '2019' # 2018, 2019
kospi200+AUDCHF: '2019'
kospi200+TI: '2019'
test_boundary:
vol: '2018'
stock_idx: '2019'
btc_krw: '2020'
btc_usd: '2018'
crypto: '2017'
crypto_hourly: '2020'
crypto_daily: '2020'
sp500: '2020'
kospi: '2020'
kospi200: '2020'
kospi200+AUDCHF: '2020'
kospi200+TI: '2020'
weights_summary: 'top'
gradient_clip: 0.1 # 0.1
limit_train_batches: 1.0 # 1.0
asset_root:
'9':
'tft': '/data3/finance/assets/cjhan/tft_logs/'
'stft': '/data3/finance/assets/cjhan/stft_logs/'
'deepar': '/data3/finance/assets/cjhan/deepar_logs/'
optuna_root:
'9':
'tft': '/data3/finance/assets/cjhan/tft_logs/optuna_test'
'stft': '/data3/finance/assets/cjhan/stft_logs/optuna_test'
'deepar': '/data3/finance/assets/cjhan/deepar_logs/optuna_test'
transfer_path:
'9':
'sp500': '/data3/finance/assets/cjhan/tft_logs/sp500/version_2/checkpoints/epoch=13.ckpt'
'vol': '/data3/finance/assets/cjhan/tft_logs/vol/version_45/checkpoints/epoch=26.ckpt'
'kospi': '/data3/finance/assets/cjhan/tft_logs/kospi/version_214/checkpoints/epoch=499.ckpt'
repeat_exp:
'9': '/data3/finance/assets/cjhan/repeat_exp/'
backtest:
'from_date': '2020-01-01'
'to_date': '2021-03-01'
'9':
data:
'kospi200+TI':
model:
'TFT':
loss:
'quantile':
ckpt: '/data3/finance/assets/cjhan/tft_logs/kospi200+TI/version_2/checkpoints/epoch=33.ckpt'
stocks: ['메리츠증권', '에스원', '쌍용양회', '하나금융지주', '아시아나항공', 'KT&G', 'KB금융', '삼성중공업', '강원랜드', 'BNK금융지주']
'directional(0.1)':
ckpt: '/data3/finance/assets/cjhan/tft_logs/kospi200+TI/version_5/checkpoints/epoch=27.ckpt'
stocks: ['대한항공', '에스원', '한샘', 'KT&G', '제일기획', '빙그레', 'KB금융', '아시아나항공', 'JW중외제약', '호텔신라']
'directional(0.5)':
ckpt: '/data3/finance/assets/cjhan/tft_logs/kospi200+TI/version_7/checkpoints/epoch=17.ckpt'
stocks: ['현대그린푸드', '삼성화재', '에스원', '유한양행', '쌍용양회', '빙그레', '하이트진로', '아시아나항공', '제일기획', 'KT&G']
'dilate':
ckpt: '/data3/finance/assets/cjhan/tft_logs/kospi200+TI/version_4/checkpoints/epoch=23.ckpt'
stocks: ['제일기획', '메리츠증권', '에스원', '대한항공', '하나금융지주', '빙그레', 'KB금융', '삼성화재', 'KT&G', '아모레G']
'entmax15':
loss:
'quantile':
ckpt: '/data3/finance/assets/cjhan/stft_logs/kospi200+TI/version_0/checkpoints/epoch=9.ckpt'
stocks: ['대한항공', '에스원', 'KT&G', '메리츠증권', '제일기획', '쌍용양회', 'LG생활건강', '하나금융지주', '대우조선해양', '빙그레']
'directional(0.1)':
ckpt: '/data3/finance/assets/cjhan/stft_logs/kospi200+TI/version_6/checkpoints/epoch=4.ckpt'
stocks: ['제일기획', '메리츠증권', '에스원', '호텔신라', '빙그레', '동원F&B', '대한항공', 'KT&G', '강원랜드', 'KB금융']
'sparsemax':
loss:
'quantile':
ckpt: '/data3/finance/assets/cjhan/stft_logs/kospi200+TI/version_2/checkpoints/epoch=5.ckpt'
stocks: ['에스원', '제일기획', '동원F&B', '대한항공', 'KB금융', '쌍용양회', '아시아나항공', '한샘', '메리츠증권', '강원랜드']