wnstnb commited on
Commit
e8fc579
ยท
1 Parent(s): 1348076

tgs part 3

Browse files
Files changed (4) hide show
  1. app.py +21 -193
  2. model_day.py +2 -3
  3. model_intra.py +2 -3
  4. troubleshoot_day_model.ipynb +362 -287
app.py CHANGED
@@ -66,17 +66,13 @@ def get_time_emojis(_times, _pst_now):
66
  return emojis
67
 
68
  # Example usage:
69
- times_list = ['06:30', '07:00', '07:30', '08:00']
70
  emojis_list = get_time_emojis(times_list, pst_now)
71
 
72
 
73
  st.title('๐ŸŽฎ Gameday Model for $SPX')
74
  st.markdown('**PLEASE NOTE:** Model should be run at or after market open. Documentation on the model and its features [can be found here.](https://huggingface.co/spaces/boomsss/gamedayspx/blob/main/README.md)')
75
  with st.form("choose_model"):
76
- # option = st.selectbox(
77
- # 'Select a model, then run.',
78
- # ('', '๐ŸŒž At Open', 'โŒš 30 Mins', 'โณ 60 Mins', '๐Ÿ•ฐ 90 Mins'))
79
-
80
 
81
  col1, col2 = st.columns(2)
82
 
@@ -98,10 +94,11 @@ with st.form("choose_model"):
98
  st.write('No model selected.')
99
 
100
  if submitted:
 
 
101
 
102
  if option == '06:30':
103
- # runday = st.button('๐Ÿƒ๐Ÿฝโ€โ™‚๏ธ Run')
104
- # if runday:
105
  from model_day import *
106
 
107
  fname='performance_for_open_model.csv'
@@ -155,142 +152,14 @@ with st.form("choose_model"):
155
  new_pred['H2BreakPct'] = new_pred['H2BreakPct'].astype(float)
156
 
157
  seq_proba = seq_predict_proba(new_pred, xgbr, seq2)
158
-
159
- elif option == '07:00':
160
- # run30 = st.button('๐Ÿƒ๐Ÿฝโ€โ™‚๏ธ Run')
161
- # if run30:
162
- from model_intra import *
163
-
164
- fname='performance_for_30m_model.csv'
165
-
166
- with st.spinner('Loading data...'):
167
- data, df_final, final_row = get_data(1)
168
- # st.success("โœ… Historical data")
169
-
170
- with st.spinner("Training models..."):
171
- def train_models():
172
- res1, xgbr, seq2 = walk_forward_validation_seq(df_final.dropna(), 'Target_clf', 'Target', 100, 1)
173
- return res1, xgbr, seq2
174
- res1, xgbr, seq2 = train_models()
175
- # st.success("โœ… Models trained")
176
-
177
- with st.spinner("Getting new prediction..."):
178
-
179
- # Get last row
180
- new_pred = data.loc[final_row, model_cols]
181
-
182
- new_pred = pd.DataFrame(new_pred).T
183
- # new_pred_show = pd.DataFrame(index=[new_pred.columns], columns=[new_pred.index], data=[[v] for v in new_pred.values])
184
- # last_date = datetime.datetime.strptime(data.loc[final_row], '%Y-%m-%d')
185
- curr_date = final_row + BDay(1)
186
- curr_date = curr_date.strftime('%Y-%m-%d')
187
-
188
- new_pred['BigNewsDay'] = new_pred['BigNewsDay'].astype(float)
189
- new_pred['Quarter'] = new_pred['Quarter'].astype(int)
190
- new_pred['Perf5Day'] = new_pred['Perf5Day'].astype(bool)
191
- new_pred['Perf5Day_n1'] = new_pred['Perf5Day_n1'].astype(bool)
192
- new_pred['DaysGreen'] = new_pred['DaysGreen'].astype(float)
193
- new_pred['DaysRed'] = new_pred['DaysRed'].astype(float)
194
- new_pred['CurrentHigh30toClose'] = new_pred['CurrentHigh30toClose'].astype(float)
195
- new_pred['CurrentLow30toClose'] = new_pred['CurrentLow30toClose'].astype(float)
196
- new_pred['CurrentClose30toClose'] = new_pred['CurrentClose30toClose'].astype(float)
197
- new_pred['CurrentRange30'] = new_pred['CurrentRange30'].astype(float)
198
- new_pred['GapFill30'] = new_pred['GapFill30'].astype(float)
199
- new_pred['CurrentGap'] = new_pred['CurrentGap'].astype(float)
200
- new_pred['RangePct'] = new_pred['RangePct'].astype(float)
201
- new_pred['RangePct_n1'] = new_pred['RangePct_n1'].astype(float)
202
- new_pred['RangePct_n2'] = new_pred['RangePct_n2'].astype(float)
203
- new_pred['OHLC4_VIX'] = new_pred['OHLC4_VIX'].astype(float)
204
- new_pred['OHLC4_VIX_n1'] = new_pred['OHLC4_VIX_n1'].astype(float)
205
- new_pred['OHLC4_VIX_n2'] = new_pred['OHLC4_VIX_n2'].astype(float)
206
- new_pred['OpenL1'] = new_pred['OpenL1'].astype(float)
207
- new_pred['OpenL2'] = new_pred['OpenL2'].astype(float)
208
- new_pred['OpenH1'] = new_pred['OpenH1'].astype(float)
209
- new_pred['OpenH2'] = new_pred['OpenH2'].astype(float)
210
- new_pred['L1TouchPct'] = new_pred['L1TouchPct'].astype(float)
211
- new_pred['L2TouchPct'] = new_pred['L2TouchPct'].astype(float)
212
- new_pred['H1TouchPct'] = new_pred['H1TouchPct'].astype(float)
213
- new_pred['H2TouchPct'] = new_pred['H2TouchPct'].astype(float)
214
- new_pred['L1BreakPct'] = new_pred['L1BreakPct'].astype(float)
215
- new_pred['L2BreakPct'] = new_pred['L2BreakPct'].astype(float)
216
- new_pred['H1BreakPct'] = new_pred['H1BreakPct'].astype(float)
217
- new_pred['H2BreakPct'] = new_pred['H2BreakPct'].astype(float)
218
- new_pred['GreenProbas'] = new_pred['GreenProbas'].astype(float)
219
-
220
- seq_proba = seq_predict_proba(new_pred, xgbr, seq2)
221
 
222
- elif option == '07:30':
223
- # run60 = st.button('๐Ÿƒ๐Ÿฝโ€โ™‚๏ธ Run')
224
- # if run60:
225
- from model_intra import *
226
-
227
- fname='performance_for_1h_model.csv'
228
-
229
- with st.spinner('Loading data...'):
230
- data, df_final, final_row = get_data(2)
231
- # st.success("โœ… Historical data")
232
-
233
- with st.spinner("Training models..."):
234
- def train_models():
235
- res1, xgbr, seq2 = walk_forward_validation_seq(df_final.dropna(), 'Target_clf', 'Target', 100, 1)
236
- return res1, xgbr, seq2
237
- res1, xgbr, seq2 = train_models()
238
- # st.success("โœ… Models trained")
239
-
240
- with st.spinner("Getting new prediction..."):
241
-
242
- # Get last row
243
- new_pred = data.loc[final_row, model_cols]
244
-
245
- new_pred = pd.DataFrame(new_pred).T
246
- # new_pred_show = pd.DataFrame(index=[new_pred.columns], columns=[new_pred.index], data=[[v] for v in new_pred.values])
247
- # last_date = datetime.datetime.strptime(data.loc[final_row], '%Y-%m-%d')
248
- curr_date = final_row + BDay(1)
249
- curr_date = curr_date.strftime('%Y-%m-%d')
250
-
251
- new_pred['BigNewsDay'] = new_pred['BigNewsDay'].astype(float)
252
- new_pred['Quarter'] = new_pred['Quarter'].astype(int)
253
- new_pred['Perf5Day'] = new_pred['Perf5Day'].astype(bool)
254
- new_pred['Perf5Day_n1'] = new_pred['Perf5Day_n1'].astype(bool)
255
- new_pred['DaysGreen'] = new_pred['DaysGreen'].astype(float)
256
- new_pred['DaysRed'] = new_pred['DaysRed'].astype(float)
257
- new_pred['CurrentHigh30toClose'] = new_pred['CurrentHigh30toClose'].astype(float)
258
- new_pred['CurrentLow30toClose'] = new_pred['CurrentLow30toClose'].astype(float)
259
- new_pred['CurrentClose30toClose'] = new_pred['CurrentClose30toClose'].astype(float)
260
- new_pred['CurrentRange30'] = new_pred['CurrentRange30'].astype(float)
261
- new_pred['GapFill30'] = new_pred['GapFill30'].astype(float)
262
- new_pred['CurrentGap'] = new_pred['CurrentGap'].astype(float)
263
- new_pred['RangePct'] = new_pred['RangePct'].astype(float)
264
- new_pred['RangePct_n1'] = new_pred['RangePct_n1'].astype(float)
265
- new_pred['RangePct_n2'] = new_pred['RangePct_n2'].astype(float)
266
- new_pred['OHLC4_VIX'] = new_pred['OHLC4_VIX'].astype(float)
267
- new_pred['OHLC4_VIX_n1'] = new_pred['OHLC4_VIX_n1'].astype(float)
268
- new_pred['OHLC4_VIX_n2'] = new_pred['OHLC4_VIX_n2'].astype(float)
269
- new_pred['OpenL1'] = new_pred['OpenL1'].astype(float)
270
- new_pred['OpenL2'] = new_pred['OpenL2'].astype(float)
271
- new_pred['OpenH1'] = new_pred['OpenH1'].astype(float)
272
- new_pred['OpenH2'] = new_pred['OpenH2'].astype(float)
273
- new_pred['L1TouchPct'] = new_pred['L1TouchPct'].astype(float)
274
- new_pred['L2TouchPct'] = new_pred['L2TouchPct'].astype(float)
275
- new_pred['H1TouchPct'] = new_pred['H1TouchPct'].astype(float)
276
- new_pred['H2TouchPct'] = new_pred['H2TouchPct'].astype(float)
277
- new_pred['L1BreakPct'] = new_pred['L1BreakPct'].astype(float)
278
- new_pred['L2BreakPct'] = new_pred['L2BreakPct'].astype(float)
279
- new_pred['H1BreakPct'] = new_pred['H1BreakPct'].astype(float)
280
- new_pred['H2BreakPct'] = new_pred['H2BreakPct'].astype(float)
281
- new_pred['GreenProbas'] = new_pred['GreenProbas'].astype(float)
282
 
283
- seq_proba = seq_predict_proba(new_pred, xgbr, seq2)
284
-
285
- elif option == '08:00':
286
- # run60 = st.button('๐Ÿƒ๐Ÿฝโ€โ™‚๏ธ Run')
287
- # if run60:
288
  from model_intra import *
289
-
290
- fname='performance_for_90m_model.csv'
291
 
292
  with st.spinner('Loading data...'):
293
- data, df_final, final_row = get_data(3)
294
  # st.success("โœ… Historical data")
295
 
296
  with st.spinner("Training models..."):
@@ -448,7 +317,7 @@ with st.form("choose_model"):
448
  prices.columns = ['']
449
 
450
  roc_auc_score_all = roc_auc_score(res1['True'].astype(int), res1['Predicted'].values)
451
- roc_auc_score_calib = roc_auc_score(res1.dropna(subset='CalibGreenProba')['True'].astype(int), res1.dropna(subset='CalibGreenProba')['CalibGreenProba'].values)
452
  precision_score_all = precision_score(res1['True'].astype(int), res1['Predicted'] > 0.5)
453
  recall_score_all = recall_score(res1['True'].astype(int), res1['Predicted'] > 0.5)
454
  len_all = len(res1)
@@ -456,7 +325,7 @@ with st.form("choose_model"):
456
  res2_filtered = res1.loc[(res1['Predicted'] > hi_thres) | (res1['Predicted'] <= lo_thres)]
457
 
458
  roc_auc_score_hi = roc_auc_score(res2_filtered['True'].astype(int), res2_filtered['Predicted'].values)
459
- roc_auc_score_hi_calib = roc_auc_score(res2_filtered.dropna(subset='CalibGreenProba')['True'].astype(int), res2_filtered.dropna(subset='CalibGreenProba')['CalibGreenProba'].values)
460
  precision_score_hi = precision_score(res2_filtered['True'].astype(int), res2_filtered['Predicted'] > 0.5)
461
  recall_score_hi = recall_score(res2_filtered['True'].astype(int), res2_filtered['Predicted'] > 0.5)
462
  len_hi = len(res2_filtered)
@@ -533,32 +402,16 @@ with st.form("choose_model"):
533
 
534
  check = data.tail(1)
535
 
536
- data['VIX_EM'] = data['Close'] * (data['Close_VIX']/100) * (np.sqrt( 1 ) / np.sqrt(252))
537
- data['VIX_EM_High'] = data['Close'] + data['VIX_EM']
538
- data['VIX_EM_Low'] = data['Close'] - data['VIX_EM']
539
-
540
- # Tomorrrow's EM and Today's EM
541
- fwd_em, curr_em = data['VIX_EM'].iloc[-1], data['VIX_EM'].iloc[-2]
542
-
543
- data['VIX_EM_125'] = data['VIX_EM'] * 1.25
544
- data['VIX_EM_125_High'] = data['Close'] + data['VIX_EM_125']
545
- data['VIX_EM_125_Low'] = data['Close'] - data['VIX_EM_125']
546
-
547
- data['VIX_EM_15'] = data['VIX_EM'] * 1.5
548
- data['VIX_EM_15_High'] = data['Close'] + data['VIX_EM_15']
549
- data['VIX_EM_15_Low'] = data['Close'] - data['VIX_EM_15']
550
-
551
- data['VIX_EM'] = data['VIX_EM'].shift(1)
552
- data['VIX_EM_High'] = data['VIX_EM_High'].shift(1)
553
- data['VIX_EM_Low'] = data['VIX_EM_Low'].shift(1)
554
-
555
- data['VIX_EM_15'] = data['VIX_EM_15'].shift(1)
556
- data['VIX_EM_15_High'] = data['VIX_EM_15_High'].shift(1)
557
- data['VIX_EM_15_Low'] = data['VIX_EM_15_Low'].shift(1)
558
-
559
- data['VIX_EM_125'] = data['VIX_EM_125'].shift(1)
560
- data['VIX_EM_125_High'] = data['VIX_EM_125_High'].shift(1)
561
- data['VIX_EM_125_Low'] = data['VIX_EM_125_Low'].shift(1)
562
 
563
  # Cache all DFs
564
  all_dfs = []
@@ -571,33 +424,8 @@ with st.form("choose_model"):
571
  # st.dataframe(prices.T.set_index('PrevClose', drop=True))
572
  st.write(df_probas)
573
 
574
- for close_use, em_use, lbl in zip([prev_close, curr_close], [curr_em, fwd_em], ['Current','Forward']):
575
-
576
- st.write(f'๐ŸŒŠ VIX EM {lbl}: {em_use:.2f}')
577
- df_em = pd.DataFrame(columns=['EM','Low','High','InRange','Tested'])
578
- df_em.index.name = f'{close_use:.2f}'
579
- df_em.loc['EM 1X'] = [
580
- f"{em_use:.2f} ({em_use / close_use:.1%})",
581
- f"{close_use - em_use:.2f}",
582
- f"{close_use + em_use:.2f}",
583
- f"{len(data.query('Close <= VIX_EM_High & Close >= VIX_EM_Low')) / len(data):.1%}",
584
- f"{len(data.query('High > VIX_EM_High | Low < VIX_EM_Low')) / len(data):.1%}"
585
- ]
586
- df_em.loc['EM 1.25X'] = [
587
- f"{curr_em * 1.25:.2f} ({(em_use * 1.25) / close_use:.1%})",
588
- f"{close_use - (em_use * 1.25):.2f}",
589
- f"{close_use + (em_use * 1.25):.2f}",
590
- f"{len(data.query('Close <= VIX_EM_125_High & Close >= VIX_EM_125_Low')) / len(data):.1%}",
591
- f"{len(data.query('High > VIX_EM_125_High | Low < VIX_EM_125_Low')) / len(data):.1%}"
592
- ]
593
- df_em.loc[f"EM 1.5X"] = [
594
- f"{curr_em * 1.5:.2f} ({(em_use * 1.5) / close_use:.1%})",
595
- f"{close_use - (em_use * 1.5):.2f}",
596
- f"{close_use + (em_use * 1.5):.2f}",
597
- f"{len(data.query('Close <= VIX_EM_15_High & Close >= VIX_EM_15_Low')) / len(data):.1%}",
598
- f"{len(data.query('High > VIX_EM_15_High | Low < VIX_EM_15_Low')) / len(data):.1%}"
599
- ]
600
- st.write(df_em)
601
 
602
  with tab2:
603
  st.subheader('Latest Data for Pred')
 
66
  return emojis
67
 
68
  # Example usage:
69
+ times_list = ['06:30', '07:00', '07:30', '08:00', '08:30', '09:00', '09:30', '10:00', '10:30', '11:00', '11:30', '12:00', '12:30']
70
  emojis_list = get_time_emojis(times_list, pst_now)
71
 
72
 
73
  st.title('๐ŸŽฎ Gameday Model for $SPX')
74
  st.markdown('**PLEASE NOTE:** Model should be run at or after market open. Documentation on the model and its features [can be found here.](https://huggingface.co/spaces/boomsss/gamedayspx/blob/main/README.md)')
75
  with st.form("choose_model"):
 
 
 
 
76
 
77
  col1, col2 = st.columns(2)
78
 
 
94
  st.write('No model selected.')
95
 
96
  if submitted:
97
+
98
+ fname=f'performance_for_{option}_model.csv'
99
 
100
  if option == '06:30':
101
+
 
102
  from model_day import *
103
 
104
  fname='performance_for_open_model.csv'
 
152
  new_pred['H2BreakPct'] = new_pred['H2BreakPct'].astype(float)
153
 
154
  seq_proba = seq_predict_proba(new_pred, xgbr, seq2)
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
155
 
156
+ else:
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
157
 
 
 
 
 
 
158
  from model_intra import *
159
+ idx = times_list.index(option)
 
160
 
161
  with st.spinner('Loading data...'):
162
+ data, df_final, final_row = get_data(idx)
163
  # st.success("โœ… Historical data")
164
 
165
  with st.spinner("Training models..."):
 
317
  prices.columns = ['']
318
 
319
  roc_auc_score_all = roc_auc_score(res1['True'].astype(int), res1['Predicted'].values)
320
+ roc_auc_score_calib = roc_auc_score(res1.dropna(subset='CalibPredicted')['True'].astype(int), res1.dropna(subset='CalibPredicted')['CalibPredicted'].values)
321
  precision_score_all = precision_score(res1['True'].astype(int), res1['Predicted'] > 0.5)
322
  recall_score_all = recall_score(res1['True'].astype(int), res1['Predicted'] > 0.5)
323
  len_all = len(res1)
 
325
  res2_filtered = res1.loc[(res1['Predicted'] > hi_thres) | (res1['Predicted'] <= lo_thres)]
326
 
327
  roc_auc_score_hi = roc_auc_score(res2_filtered['True'].astype(int), res2_filtered['Predicted'].values)
328
+ roc_auc_score_hi_calib = roc_auc_score(res2_filtered.dropna(subset='CalibPredicted')['True'].astype(int), res2_filtered.dropna(subset='CalibPredicted')['CalibPredicted'].values)
329
  precision_score_hi = precision_score(res2_filtered['True'].astype(int), res2_filtered['Predicted'] > 0.5)
330
  recall_score_hi = recall_score(res2_filtered['True'].astype(int), res2_filtered['Predicted'] > 0.5)
331
  len_hi = len(res2_filtered)
 
402
 
403
  check = data.tail(1)
404
 
405
+ df_levels = pd.DataFrame(
406
+ index=['H2','H1','L1','L2'],
407
+ columns=['Level','BreakPct(100)','TouchPct(100)'],
408
+ data=[
409
+ [f"{data['H2'].iloc[-1]:.2f}",f"{data['H2BreakPct'].iloc[-2]:.1%}",f"{data['H2TouchPct'].iloc[-2]:.1%}"],
410
+ [f"{data['H1'].iloc[-1]:.2f}",f"{data['H1BreakPct'].iloc[-2]:.1%}",f"{data['H1TouchPct'].iloc[-2]:.1%}"],
411
+ [f"{data['L1'].iloc[-1]:.2f}",f"{data['L1BreakPct'].iloc[-2]:.1%}",f"{data['L1TouchPct'].iloc[-2]:.1%}"],
412
+ [f"{data['L2'].iloc[-1]:.2f}",f"{data['L2BreakPct'].iloc[-2]:.1%}",f"{data['L2TouchPct'].iloc[-2]:.1%}"]
413
+ ]
414
+ )
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
415
 
416
  # Cache all DFs
417
  all_dfs = []
 
424
  # st.dataframe(prices.T.set_index('PrevClose', drop=True))
425
  st.write(df_probas)
426
 
427
+ st.write(f'๐ŸŒŠ JC Levels')
428
+ st.write(df_levels)
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
429
 
430
  with tab2:
431
  st.subheader('Latest Data for Pred')
model_day.py CHANGED
@@ -126,7 +126,7 @@ def walk_forward_validation_seq(df, target_column_clf, target_column_regr, num_t
126
 
127
  greenprobas = []
128
  meanprobas = []
129
- for i, pct in enumerate(df_results['Predicted']):
130
  try:
131
  df_q = get_quantiles(df_results.iloc[:i], 'Predicted', 7)
132
  for q in df_q.index:
@@ -140,8 +140,7 @@ def walk_forward_validation_seq(df, target_column_clf, target_column_regr, num_t
140
  greenprobas.append(p)
141
  meanprobas.append(c)
142
 
143
- df_results['CalibPredicted'] = meanprobas
144
- df_results['CalibGreenProba'] = greenprobas
145
 
146
  return df_results, model1, model2
147
 
 
126
 
127
  greenprobas = []
128
  meanprobas = []
129
+ for i, pct in tqdm(enumerate(df_results['Predicted'], desc='Calibrating Probas')):
130
  try:
131
  df_q = get_quantiles(df_results.iloc[:i], 'Predicted', 7)
132
  for q in df_q.index:
 
140
  greenprobas.append(p)
141
  meanprobas.append(c)
142
 
143
+ df_results['CalibPredicted'] = greenprobas
 
144
 
145
  return df_results, model1, model2
146
 
model_intra.py CHANGED
@@ -135,7 +135,7 @@ def walk_forward_validation_seq(df, target_column_clf, target_column_regr, num_t
135
 
136
  greenprobas = []
137
  meanprobas = []
138
- for i, pct in enumerate(df_results['Predicted']):
139
  try:
140
  df_q = get_quantiles(df_results.iloc[:i], 'Predicted', 7)
141
  for q in df_q.index:
@@ -149,8 +149,7 @@ def walk_forward_validation_seq(df, target_column_clf, target_column_regr, num_t
149
  greenprobas.append(p)
150
  meanprobas.append(c)
151
 
152
- df_results['CalibPredicted'] = meanprobas
153
- df_results['CalibGreenProba'] = greenprobas
154
 
155
  return df_results, model1, model2
156
 
 
135
 
136
  greenprobas = []
137
  meanprobas = []
138
+ for i, pct in tqdm(enumerate(df_results['Predicted']), desc='Calibrating Probas'):
139
  try:
140
  df_q = get_quantiles(df_results.iloc[:i], 'Predicted', 7)
141
  for q in df_q.index:
 
149
  greenprobas.append(p)
150
  meanprobas.append(c)
151
 
152
+ df_results['CalibPredicted'] = greenprobas
 
153
 
154
  return df_results, model1, model2
155
 
troubleshoot_day_model.ipynb CHANGED
@@ -2,7 +2,7 @@
2
  "cells": [
3
  {
4
  "cell_type": "code",
5
- "execution_count": 61,
6
  "metadata": {},
7
  "outputs": [],
8
  "source": [
@@ -13,18 +13,18 @@
13
  },
14
  {
15
  "cell_type": "code",
16
- "execution_count": 62,
17
  "metadata": {},
18
  "outputs": [
19
  {
20
  "name": "stderr",
21
  "output_type": "stream",
22
  "text": [
23
- "getting econ tickers: 100%|โ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆ| 3/3 [00:00<00:00, 6.07it/s]\n",
24
- "Getting release dates: 100%|โ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆ| 8/8 [00:01<00:00, 4.53it/s]\n",
25
- "Making indicators: 100%|โ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆ| 8/8 [00:00<00:00, 3997.43it/s]\n",
26
  "Found cached dataset text (C:/Users/WINSTON-ITX/.cache/huggingface/datasets/boomsss___text/boomsss--spx_intra-e0e5e7af8fd43022/0.0.0/cb1e9bd71a82ad27976be3b12b407850fe2837d80c22c5e03a28949843a8ace2)\n",
27
- "Merging econ data: 100%|โ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆ| 8/8 [00:00<00:00, 999.12it/s]\n"
28
  ]
29
  }
30
  ],
@@ -34,7 +34,7 @@
34
  },
35
  {
36
  "cell_type": "code",
37
- "execution_count": 63,
38
  "metadata": {},
39
  "outputs": [],
40
  "source": [
@@ -46,23 +46,22 @@
46
  },
47
  {
48
  "cell_type": "code",
49
- "execution_count": 64,
50
  "metadata": {},
51
  "outputs": [
52
  {
53
  "name": "stderr",
54
  "output_type": "stream",
55
  "text": [
56
- "LR Model: 100%|โ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆ| 1126/1126 [00:03<00:00, 332.50it/s]\n",
57
- "d:\\Projects\\gamedayspx\\model_intra.py:97: SettingWithCopyWarning:\n",
58
- "\n",
59
- "\n",
60
  "A value is trying to be set on a copy of a slice from a DataFrame.\n",
61
  "Try using .loc[row_indexer,col_indexer] = value instead\n",
62
  "\n",
63
  "See the caveats in the documentation: https://pandas.pydata.org/pandas-docs/stable/user_guide/indexing.html#returning-a-view-versus-a-copy\n",
64
- "\n",
65
- "CLF Model: 100%|โ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆ| 1026/1026 [00:07<00:00, 141.65it/s]\n"
 
66
  ]
67
  }
68
  ],
@@ -72,7 +71,7 @@
72
  },
73
  {
74
  "cell_type": "code",
75
- "execution_count": 65,
76
  "metadata": {},
77
  "outputs": [],
78
  "source": [
@@ -101,7 +100,7 @@
101
  "hi_thres = 0.6 # res1.loc[middle_quantiles, 'Predicted'].max()\n",
102
  "\n",
103
  "roc_auc_score_all = roc_auc_score(res1['True'].astype(int), res1['Predicted'].values)\n",
104
- "roc_auc_score_calib = roc_auc_score(res1.dropna(subset='CalibGreenProba')['True'].astype(int), res1.dropna(subset='CalibGreenProba')['CalibGreenProba'].values)\n",
105
  "precision_score_all = precision_score(res1['True'].astype(int), res1['Predicted'] > 0.5)\n",
106
  "recall_score_all = recall_score(res1['True'].astype(int), res1['Predicted'] > 0.5)\n",
107
  "len_all = len(res1)\n",
@@ -109,7 +108,7 @@
109
  "res2_filtered = res1.loc[(res1['Predicted'] > hi_thres) | (res1['Predicted'] <= lo_thres)]\n",
110
  "\n",
111
  "roc_auc_score_hi = roc_auc_score(res2_filtered['True'].astype(int), res2_filtered['Predicted'].values)\n",
112
- "roc_auc_score_hi_calib = roc_auc_score(res2_filtered.dropna(subset='CalibGreenProba')['True'].astype(int), res2_filtered.dropna(subset='CalibGreenProba')['CalibGreenProba'].values)\n",
113
  "precision_score_hi = precision_score(res2_filtered['True'].astype(int), res2_filtered['Predicted'] > 0.5)\n",
114
  "recall_score_hi = recall_score(res2_filtered['True'].astype(int), res2_filtered['Predicted'] > 0.5)\n",
115
  "len_hi = len(res2_filtered)\n",
@@ -167,7 +166,7 @@
167
  },
168
  {
169
  "cell_type": "code",
170
- "execution_count": 66,
171
  "metadata": {},
172
  "outputs": [
173
  {
@@ -194,189 +193,168 @@
194
  " <th>True</th>\n",
195
  " <th>Predicted</th>\n",
196
  " <th>CalibPredicted</th>\n",
197
- " <th>CalibGreenProba</th>\n",
198
  " <th>Accuracy</th>\n",
199
  " <th>HTML</th>\n",
200
  " </tr>\n",
201
  " </thead>\n",
202
  " <tbody>\n",
203
  " <tr>\n",
204
- " <th>2023-09-11</th>\n",
205
- " <td>False</td>\n",
206
- " <td>0.207403</td>\n",
207
- " <td>0.2350</td>\n",
208
- " <td>0.120567</td>\n",
209
- " <td>โœ…</td>\n",
210
- " <td>&amp;#9989;</td>\n",
211
- " </tr>\n",
212
- " <tr>\n",
213
  " <th>2023-09-12</th>\n",
214
  " <td>True</td>\n",
215
- " <td>0.568866</td>\n",
216
- " <td>0.6140</td>\n",
217
- " <td>0.556391</td>\n",
218
  " <td>๐ŸŸจ</td>\n",
219
  " <td>&amp;#11036;</td>\n",
220
  " </tr>\n",
221
  " <tr>\n",
222
  " <th>2023-09-13</th>\n",
223
  " <td>True</td>\n",
224
- " <td>0.766335</td>\n",
225
- " <td>0.8030</td>\n",
226
- " <td>0.870690</td>\n",
227
  " <td>โœ…</td>\n",
228
  " <td>&amp;#9989;</td>\n",
229
  " </tr>\n",
230
  " <tr>\n",
231
  " <th>2023-09-14</th>\n",
232
  " <td>False</td>\n",
233
- " <td>0.252581</td>\n",
234
- " <td>0.2350</td>\n",
235
- " <td>0.119718</td>\n",
236
  " <td>โœ…</td>\n",
237
  " <td>&amp;#9989;</td>\n",
238
  " </tr>\n",
239
  " <tr>\n",
240
  " <th>2023-09-15</th>\n",
241
  " <td>True</td>\n",
242
- " <td>0.587229</td>\n",
243
- " <td>0.6140</td>\n",
244
- " <td>0.559701</td>\n",
245
  " <td>๐ŸŸจ</td>\n",
246
  " <td>&amp;#11036;</td>\n",
247
  " </tr>\n",
248
  " <tr>\n",
249
  " <th>2023-09-18</th>\n",
250
  " <td>False</td>\n",
251
- " <td>0.223258</td>\n",
252
- " <td>0.2350</td>\n",
253
- " <td>0.118881</td>\n",
254
  " <td>โœ…</td>\n",
255
  " <td>&amp;#9989;</td>\n",
256
  " </tr>\n",
257
  " <tr>\n",
258
  " <th>2023-09-19</th>\n",
259
  " <td>False</td>\n",
260
- " <td>0.606953</td>\n",
261
- " <td>0.6140</td>\n",
262
- " <td>0.562963</td>\n",
263
- " <td>โŒ</td>\n",
264
- " <td>&amp;#10060;</td>\n",
265
  " </tr>\n",
266
  " <tr>\n",
267
  " <th>2023-09-20</th>\n",
268
  " <td>False</td>\n",
269
- " <td>0.196109</td>\n",
270
- " <td>0.2350</td>\n",
271
- " <td>0.118056</td>\n",
272
  " <td>โœ…</td>\n",
273
  " <td>&amp;#9989;</td>\n",
274
  " </tr>\n",
275
  " <tr>\n",
276
  " <th>2023-09-21</th>\n",
277
  " <td>False</td>\n",
278
- " <td>0.431239</td>\n",
279
- " <td>0.4245</td>\n",
280
- " <td>0.420168</td>\n",
281
  " <td>๐ŸŸจ</td>\n",
282
  " <td>&amp;#11036;</td>\n",
283
  " </tr>\n",
284
  " <tr>\n",
285
  " <th>2023-09-22</th>\n",
286
  " <td>True</td>\n",
287
- " <td>0.411964</td>\n",
288
- " <td>0.4245</td>\n",
289
- " <td>0.416667</td>\n",
290
- " <td>๐ŸŸจ</td>\n",
291
- " <td>&amp;#11036;</td>\n",
292
  " </tr>\n",
293
  " <tr>\n",
294
  " <th>2023-09-25</th>\n",
295
  " <td>False</td>\n",
296
- " <td>0.199644</td>\n",
297
- " <td>0.2350</td>\n",
298
- " <td>0.117241</td>\n",
299
  " <td>โœ…</td>\n",
300
  " <td>&amp;#9989;</td>\n",
301
  " </tr>\n",
302
  " <tr>\n",
303
  " <th>2023-09-26</th>\n",
304
  " <td>True</td>\n",
305
- " <td>0.446124</td>\n",
306
- " <td>0.4245</td>\n",
307
- " <td>0.421488</td>\n",
308
  " <td>๐ŸŸจ</td>\n",
309
  " <td>&amp;#11036;</td>\n",
310
  " </tr>\n",
311
  " <tr>\n",
312
  " <th>2023-09-27</th>\n",
313
  " <td>True</td>\n",
314
- " <td>0.637091</td>\n",
315
- " <td>0.6140</td>\n",
316
- " <td>0.558824</td>\n",
317
  " <td>โœ…</td>\n",
318
  " <td>&amp;#9989;</td>\n",
319
  " </tr>\n",
320
  " <tr>\n",
321
  " <th>2023-09-28</th>\n",
322
  " <td>False</td>\n",
323
- " <td>0.776567</td>\n",
324
- " <td>0.8030</td>\n",
325
- " <td>0.871245</td>\n",
326
  " <td>โŒ</td>\n",
327
  " <td>&amp;#10060;</td>\n",
328
  " </tr>\n",
329
  " <tr>\n",
330
  " <th>2023-09-29</th>\n",
331
  " <td>True</td>\n",
332
- " <td>0.502801</td>\n",
333
- " <td>0.5195</td>\n",
334
- " <td>0.557377</td>\n",
335
  " <td>๐ŸŸจ</td>\n",
336
  " <td>&amp;#11036;</td>\n",
337
  " </tr>\n",
338
  " <tr>\n",
339
  " <th>2023-10-02</th>\n",
340
  " <td>False</td>\n",
341
- " <td>0.198343</td>\n",
342
- " <td>0.2350</td>\n",
343
- " <td>0.116438</td>\n",
344
  " <td>โœ…</td>\n",
345
  " <td>&amp;#9989;</td>\n",
346
  " </tr>\n",
347
  " <tr>\n",
348
  " <th>2023-10-03</th>\n",
349
  " <td>True</td>\n",
350
- " <td>0.610792</td>\n",
351
- " <td>0.6140</td>\n",
352
- " <td>0.562044</td>\n",
353
- " <td>โœ…</td>\n",
354
- " <td>&amp;#9989;</td>\n",
355
  " </tr>\n",
356
  " <tr>\n",
357
  " <th>2023-10-04</th>\n",
358
  " <td>False</td>\n",
359
- " <td>0.250420</td>\n",
360
- " <td>0.2350</td>\n",
361
- " <td>0.115646</td>\n",
362
  " <td>โœ…</td>\n",
363
  " <td>&amp;#9989;</td>\n",
364
  " </tr>\n",
365
  " <tr>\n",
366
  " <th>2023-10-05</th>\n",
367
  " <td>True</td>\n",
368
- " <td>0.303259</td>\n",
369
- " <td>0.3300</td>\n",
370
- " <td>0.204724</td>\n",
371
  " <td>โŒ</td>\n",
372
  " <td>&amp;#10060;</td>\n",
373
  " </tr>\n",
374
  " <tr>\n",
375
  " <th>2023-10-06</th>\n",
376
  " <td>True</td>\n",
377
- " <td>0.628482</td>\n",
378
- " <td>0.6140</td>\n",
379
- " <td>0.565217</td>\n",
 
 
 
 
 
 
 
380
  " <td>โœ…</td>\n",
381
  " <td>&amp;#9989;</td>\n",
382
  " </tr>\n",
@@ -385,52 +363,30 @@
385
  "</div>"
386
  ],
387
  "text/plain": [
388
- " True Predicted CalibPredicted CalibGreenProba Accuracy \\\n",
389
- "2023-09-11 False 0.207403 0.2350 0.120567 โœ… \n",
390
- "2023-09-12 True 0.568866 0.6140 0.556391 ๐ŸŸจ \n",
391
- "2023-09-13 True 0.766335 0.8030 0.870690 โœ… \n",
392
- "2023-09-14 False 0.252581 0.2350 0.119718 โœ… \n",
393
- "2023-09-15 True 0.587229 0.6140 0.559701 ๐ŸŸจ \n",
394
- "2023-09-18 False 0.223258 0.2350 0.118881 โœ… \n",
395
- "2023-09-19 False 0.606953 0.6140 0.562963 โŒ \n",
396
- "2023-09-20 False 0.196109 0.2350 0.118056 โœ… \n",
397
- "2023-09-21 False 0.431239 0.4245 0.420168 ๐ŸŸจ \n",
398
- "2023-09-22 True 0.411964 0.4245 0.416667 ๐ŸŸจ \n",
399
- "2023-09-25 False 0.199644 0.2350 0.117241 โœ… \n",
400
- "2023-09-26 True 0.446124 0.4245 0.421488 ๐ŸŸจ \n",
401
- "2023-09-27 True 0.637091 0.6140 0.558824 โœ… \n",
402
- "2023-09-28 False 0.776567 0.8030 0.871245 โŒ \n",
403
- "2023-09-29 True 0.502801 0.5195 0.557377 ๐ŸŸจ \n",
404
- "2023-10-02 False 0.198343 0.2350 0.116438 โœ… \n",
405
- "2023-10-03 True 0.610792 0.6140 0.562044 โœ… \n",
406
- "2023-10-04 False 0.250420 0.2350 0.115646 โœ… \n",
407
- "2023-10-05 True 0.303259 0.3300 0.204724 โŒ \n",
408
- "2023-10-06 True 0.628482 0.6140 0.565217 โœ… \n",
409
- "\n",
410
- " HTML \n",
411
- "2023-09-11 &#9989; \n",
412
- "2023-09-12 &#11036; \n",
413
- "2023-09-13 &#9989; \n",
414
- "2023-09-14 &#9989; \n",
415
- "2023-09-15 &#11036; \n",
416
- "2023-09-18 &#9989; \n",
417
- "2023-09-19 &#10060; \n",
418
- "2023-09-20 &#9989; \n",
419
- "2023-09-21 &#11036; \n",
420
- "2023-09-22 &#11036; \n",
421
- "2023-09-25 &#9989; \n",
422
- "2023-09-26 &#11036; \n",
423
- "2023-09-27 &#9989; \n",
424
- "2023-09-28 &#10060; \n",
425
- "2023-09-29 &#11036; \n",
426
- "2023-10-02 &#9989; \n",
427
- "2023-10-03 &#9989; \n",
428
- "2023-10-04 &#9989; \n",
429
- "2023-10-05 &#10060; \n",
430
- "2023-10-06 &#9989; "
431
  ]
432
  },
433
- "execution_count": 66,
434
  "metadata": {},
435
  "output_type": "execute_result"
436
  }
@@ -441,7 +397,7 @@
441
  },
442
  {
443
  "cell_type": "code",
444
- "execution_count": 67,
445
  "metadata": {},
446
  "outputs": [
447
  {
@@ -450,7 +406,7 @@
450
  "147"
451
  ]
452
  },
453
- "execution_count": 67,
454
  "metadata": {},
455
  "output_type": "execute_result"
456
  }
@@ -461,7 +417,102 @@
461
  },
462
  {
463
  "cell_type": "code",
464
- "execution_count": 68,
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
465
  "metadata": {},
466
  "outputs": [
467
  {
@@ -492,28 +543,28 @@
492
  " <tbody>\n",
493
  " <tr>\n",
494
  " <th>N</th>\n",
495
- " <td>1026.00</td>\n",
496
- " <td>761.00</td>\n",
497
  " </tr>\n",
498
  " <tr>\n",
499
  " <th>ROC AUC</th>\n",
500
- " <td>0.80</td>\n",
501
  " <td>0.85</td>\n",
502
  " </tr>\n",
503
  " <tr>\n",
504
  " <th>Calib. AUC</th>\n",
505
  " <td>0.77</td>\n",
506
- " <td>0.82</td>\n",
507
  " </tr>\n",
508
  " <tr>\n",
509
  " <th>Precision</th>\n",
510
- " <td>0.72</td>\n",
511
- " <td>0.76</td>\n",
512
  " </tr>\n",
513
  " <tr>\n",
514
  " <th>Recall</th>\n",
515
  " <td>0.79</td>\n",
516
- " <td>0.86</td>\n",
517
  " </tr>\n",
518
  " </tbody>\n",
519
  "</table>\n",
@@ -521,14 +572,14 @@
521
  ],
522
  "text/plain": [
523
  " All High Confidence\n",
524
- "N 1026.00 761.00\n",
525
- "ROC AUC 0.80 0.85\n",
526
- "Calib. AUC 0.77 0.82\n",
527
- "Precision 0.72 0.76\n",
528
- "Recall 0.79 0.86"
529
  ]
530
  },
531
- "execution_count": 68,
532
  "metadata": {},
533
  "output_type": "execute_result"
534
  }
@@ -539,7 +590,7 @@
539
  },
540
  {
541
  "cell_type": "code",
542
- "execution_count": 69,
543
  "metadata": {},
544
  "outputs": [
545
  {
@@ -551,6 +602,8 @@
551
  "data": [
552
  {
553
  "close": [
 
 
554
  3000.929931640625,
555
  3009.570068359375,
556
  3007.389892578125,
@@ -1576,7 +1629,8 @@
1576
  4229.4501953125,
1577
  4263.75,
1578
  4258.18994140625,
1579
- 4308.5
 
1580
  ],
1581
  "decreasing": {
1582
  "fillcolor": "#ff5f5f",
@@ -1585,6 +1639,8 @@
1585
  }
1586
  },
1587
  "high": [
 
 
1588
  3000.929931640625,
1589
  3020.739990234375,
1590
  3017.330078125,
@@ -2610,7 +2666,8 @@
2610
  4281.14990234375,
2611
  4268.5,
2612
  4267.1298828125,
2613
- 4324.10009765625
 
2614
  ],
2615
  "increasing": {
2616
  "fillcolor": "#3399ff",
@@ -2619,6 +2676,8 @@
2619
  }
2620
  },
2621
  "low": [
 
 
2622
  2975.31005859375,
2623
  3000.919921875,
2624
  3002.89990234375,
@@ -3644,10 +3703,13 @@
3644
  4216.4501953125,
3645
  4220.47998046875,
3646
  4225.91015625,
3647
- 4219.5498046875
 
3648
  ],
3649
  "name": "OHLC Chart",
3650
  "open": [
 
 
3651
  2981.409912109375,
3652
  3009.080078125,
3653
  3012.2099609375,
@@ -4673,10 +4735,13 @@
4673
  4269.75,
4674
  4233.830078125,
4675
  4259.31005859375,
4676
- 4234.7900390625
 
4677
  ],
4678
  "type": "candlestick",
4679
  "x": [
 
 
4680
  "2019-09-11T00:00:00",
4681
  "2019-09-12T00:00:00",
4682
  "2019-09-13T00:00:00",
@@ -5702,7 +5767,8 @@
5702
  "2023-10-03T00:00:00",
5703
  "2023-10-04T00:00:00",
5704
  "2023-10-05T00:00:00",
5705
- "2023-10-06T00:00:00"
 
5706
  ]
5707
  },
5708
  {
@@ -5712,18 +5778,20 @@
5712
  "mode": "text",
5713
  "name": "Predictions",
5714
  "text": [
5715
- "&#9989;",
5716
  "&#11036;",
5717
  "&#9989;",
5718
- "&#11036;",
5719
  "&#10060;",
5720
  "&#9989;",
5721
- "&#10060;",
5722
  "&#11036;",
5723
- "&#10060;",
5724
  "&#11036;",
5725
  "&#9989;",
5726
  "&#10060;",
 
 
 
 
 
5727
  "&#9989;",
5728
  "&#9989;",
5729
  "&#9989;",
@@ -5736,14 +5804,14 @@
5736
  "&#9989;",
5737
  "&#11036;",
5738
  "&#9989;",
5739
- "&#10060;",
5740
  "&#9989;",
5741
  "&#11036;",
5742
  "&#9989;",
5743
  "&#11036;",
5744
  "&#11036;",
5745
  "&#11036;",
5746
- "&#9989;",
5747
  "&#9989;",
5748
  "&#11036;",
5749
  "&#11036;",
@@ -5751,7 +5819,7 @@
5751
  "&#9989;",
5752
  "&#9989;",
5753
  "&#10060;",
5754
- "&#11036;",
5755
  "&#9989;",
5756
  "&#11036;",
5757
  "&#9989;",
@@ -5762,12 +5830,12 @@
5762
  "&#10060;",
5763
  "&#10060;",
5764
  "&#11036;",
5765
- "&#9989;",
5766
  "&#11036;",
5767
  "&#9989;",
5768
  "&#9989;",
5769
  "&#9989;",
5770
- "&#9989;",
5771
  "&#9989;",
5772
  "&#9989;",
5773
  "&#9989;",
@@ -5775,23 +5843,23 @@
5775
  "&#9989;",
5776
  "&#11036;",
5777
  "&#10060;",
5778
- "&#11036;",
5779
  "&#9989;",
5780
  "&#9989;",
5781
  "&#9989;",
5782
  "&#11036;",
5783
- "&#11036;",
5784
- "&#11036;",
5785
  "&#9989;",
5786
  "&#9989;",
5787
  "&#11036;",
5788
  "&#9989;",
5789
  "&#9989;",
5790
  "&#9989;",
5791
- "&#10060;",
5792
  "&#9989;",
5793
  "&#9989;",
5794
- "&#10060;",
5795
  "&#9989;",
5796
  "&#11036;",
5797
  "&#9989;",
@@ -5803,7 +5871,7 @@
5803
  "&#9989;",
5804
  "&#9989;",
5805
  "&#9989;",
5806
- "&#11036;",
5807
  "&#11036;",
5808
  "&#9989;",
5809
  "&#9989;",
@@ -5830,7 +5898,7 @@
5830
  "&#9989;",
5831
  "&#9989;",
5832
  "&#9989;",
5833
- "&#11036;",
5834
  "&#9989;",
5835
  "&#9989;",
5836
  "&#9989;",
@@ -5850,7 +5918,7 @@
5850
  "&#9989;",
5851
  "&#9989;",
5852
  "&#9989;",
5853
- "&#11036;",
5854
  "&#9989;",
5855
  "&#9989;",
5856
  "&#11036;",
@@ -5887,7 +5955,7 @@
5887
  "&#11036;",
5888
  "&#9989;",
5889
  "&#11036;",
5890
- "&#10060;",
5891
  "&#9989;",
5892
  "&#11036;",
5893
  "&#10060;",
@@ -5895,7 +5963,7 @@
5895
  "&#11036;",
5896
  "&#9989;",
5897
  "&#9989;",
5898
- "&#11036;",
5899
  "&#9989;",
5900
  "&#11036;",
5901
  "&#9989;",
@@ -5919,20 +5987,20 @@
5919
  "&#9989;",
5920
  "&#9989;",
5921
  "&#9989;",
5922
- "&#11036;",
5923
  "&#11036;",
5924
  "&#10060;",
5925
  "&#11036;",
5926
  "&#9989;",
5927
- "&#9989;",
5928
  "&#11036;",
 
5929
  "&#9989;",
5930
  "&#9989;",
5931
  "&#11036;",
5932
  "&#9989;",
5933
  "&#9989;",
5934
  "&#9989;",
5935
- "&#11036;",
5936
  "&#9989;",
5937
  "&#9989;",
5938
  "&#10060;",
@@ -5949,10 +6017,10 @@
5949
  "&#9989;",
5950
  "&#11036;",
5951
  "&#10060;",
5952
- "&#9989;",
5953
- "&#9989;",
5954
- "&#9989;",
5955
  "&#11036;",
 
 
 
5956
  "&#9989;",
5957
  "&#9989;",
5958
  "&#9989;",
@@ -5969,11 +6037,11 @@
5969
  "&#9989;",
5970
  "&#10060;",
5971
  "&#9989;",
5972
- "&#11036;",
5973
  "&#9989;",
5974
  "&#9989;",
5975
  "&#11036;",
5976
- "&#9989;",
5977
  "&#9989;",
5978
  "&#9989;",
5979
  "&#10060;",
@@ -5981,12 +6049,12 @@
5981
  "&#9989;",
5982
  "&#9989;",
5983
  "&#9989;",
5984
- "&#10060;",
 
5985
  "&#9989;",
5986
  "&#9989;",
5987
  "&#9989;",
5988
  "&#9989;",
5989
- "&#11036;",
5990
  "&#11036;",
5991
  "&#9989;",
5992
  "&#9989;",
@@ -6012,9 +6080,9 @@
6012
  "&#9989;",
6013
  "&#9989;",
6014
  "&#9989;",
6015
- "&#10060;",
6016
  "&#11036;",
6017
- "&#9989;",
 
6018
  "&#9989;",
6019
  "&#9989;",
6020
  "&#9989;",
@@ -6024,9 +6092,9 @@
6024
  "&#10060;",
6025
  "&#10060;",
6026
  "&#9989;",
6027
- "&#9989;",
6028
  "&#11036;",
6029
- "&#10060;",
 
6030
  "&#10060;",
6031
  "&#11036;",
6032
  "&#10060;",
@@ -6042,16 +6110,16 @@
6042
  "&#11036;",
6043
  "&#9989;",
6044
  "&#11036;",
6045
- "&#9989;",
6046
  "&#9989;",
6047
  "&#9989;",
6048
  "&#9989;",
6049
  "&#10060;",
6050
  "&#9989;",
6051
  "&#11036;",
6052
- "&#9989;",
6053
- "&#10060;",
6054
  "&#11036;",
 
 
6055
  "&#9989;",
6056
  "&#9989;",
6057
  "&#9989;",
@@ -6072,17 +6140,17 @@
6072
  "&#9989;",
6073
  "&#11036;",
6074
  "&#10060;",
6075
- "&#9989;",
6076
  "&#9989;",
6077
  "&#10060;",
6078
  "&#9989;",
6079
  "&#10060;",
 
6080
  "&#11036;",
6081
  "&#11036;",
6082
  "&#9989;",
6083
  "&#9989;",
6084
  "&#9989;",
6085
- "&#9989;",
6086
  "&#11036;",
6087
  "&#11036;",
6088
  "&#10060;",
@@ -6096,38 +6164,38 @@
6096
  "&#9989;",
6097
  "&#11036;",
6098
  "&#9989;",
6099
- "&#11036;",
6100
  "&#10060;",
6101
  "&#10060;",
 
6102
  "&#9989;",
6103
  "&#9989;",
6104
  "&#11036;",
6105
  "&#9989;",
6106
  "&#9989;",
6107
  "&#9989;",
6108
- "&#10060;",
6109
  "&#11036;",
6110
  "&#9989;",
6111
  "&#9989;",
 
6112
  "&#9989;",
6113
  "&#11036;",
6114
  "&#10060;",
6115
  "&#9989;",
6116
  "&#11036;",
6117
  "&#9989;",
 
6118
  "&#9989;",
6119
  "&#9989;",
6120
  "&#9989;",
6121
  "&#9989;",
6122
  "&#11036;",
6123
- "&#11036;",
6124
  "&#10060;",
6125
  "&#9989;",
6126
  "&#9989;",
6127
  "&#9989;",
6128
  "&#9989;",
6129
  "&#11036;",
6130
- "&#11036;",
6131
  "&#9989;",
6132
  "&#9989;",
6133
  "&#9989;",
@@ -6135,7 +6203,7 @@
6135
  "&#9989;",
6136
  "&#9989;",
6137
  "&#9989;",
6138
- "&#10060;",
6139
  "&#9989;",
6140
  "&#9989;",
6141
  "&#10060;",
@@ -6150,16 +6218,16 @@
6150
  "&#9989;",
6151
  "&#9989;",
6152
  "&#11036;",
6153
- "&#11036;",
6154
  "&#9989;",
6155
  "&#11036;",
6156
  "&#10060;",
6157
  "&#9989;",
6158
  "&#10060;",
6159
- "&#10060;",
6160
  "&#9989;",
6161
  "&#9989;",
6162
- "&#10060;",
6163
  "&#11036;",
6164
  "&#9989;",
6165
  "&#9989;",
@@ -6172,15 +6240,15 @@
6172
  "&#11036;",
6173
  "&#9989;",
6174
  "&#9989;",
6175
- "&#11036;",
6176
- "&#11036;",
6177
  "&#9989;",
 
6178
  "&#9989;",
6179
  "&#11036;",
6180
  "&#9989;",
6181
  "&#9989;",
6182
  "&#9989;",
6183
- "&#11036;",
 
6184
  "&#9989;",
6185
  "&#10060;",
6186
  "&#9989;",
@@ -6191,19 +6259,19 @@
6191
  "&#11036;",
6192
  "&#11036;",
6193
  "&#9989;",
6194
- "&#11036;",
6195
- "&#11036;",
6196
  "&#9989;",
6197
  "&#9989;",
6198
  "&#9989;",
6199
  "&#11036;",
6200
  "&#10060;",
6201
  "&#9989;",
6202
- "&#10060;",
6203
  "&#11036;",
6204
  "&#9989;",
6205
  "&#9989;",
6206
- "&#11036;",
 
6207
  "&#11036;",
6208
  "&#9989;",
6209
  "&#9989;",
@@ -6216,8 +6284,8 @@
6216
  "&#9989;",
6217
  "&#10060;",
6218
  "&#11036;",
6219
- "&#9989;",
6220
  "&#11036;",
 
6221
  "&#11036;",
6222
  "&#9989;",
6223
  "&#9989;",
@@ -6226,7 +6294,7 @@
6226
  "&#9989;",
6227
  "&#9989;",
6228
  "&#11036;",
6229
- "&#9989;",
6230
  "&#9989;",
6231
  "&#9989;",
6232
  "&#11036;",
@@ -6244,37 +6312,37 @@
6244
  "&#10060;",
6245
  "&#9989;",
6246
  "&#9989;",
6247
- "&#11036;",
6248
  "&#10060;",
6249
- "&#9989;",
6250
- "&#9989;",
6251
  "&#11036;",
6252
  "&#9989;",
6253
  "&#11036;",
 
 
6254
  "&#11036;",
6255
  "&#11036;",
6256
  "&#10060;",
6257
  "&#9989;",
6258
  "&#9989;",
6259
- "&#11036;",
6260
  "&#9989;",
6261
- "&#11036;",
6262
  "&#9989;",
 
 
6263
  "&#9989;",
6264
  "&#10060;",
6265
  "&#9989;",
6266
  "&#9989;",
6267
  "&#11036;",
6268
- "&#9989;",
6269
- "&#10060;",
6270
  "&#11036;",
6271
  "&#10060;",
 
 
6272
  "&#9989;",
6273
  "&#9989;",
6274
  "&#9989;",
6275
  "&#10060;",
6276
  "&#9989;",
6277
- "&#9989;",
6278
  "&#9989;",
6279
  "&#9989;",
6280
  "&#11036;",
@@ -6287,25 +6355,25 @@
6287
  "&#9989;",
6288
  "&#9989;",
6289
  "&#9989;",
6290
- "&#11036;",
6291
  "&#9989;",
6292
  "&#9989;",
6293
- "&#11036;",
 
6294
  "&#11036;",
6295
  "&#10060;",
6296
  "&#11036;",
6297
  "&#9989;",
6298
- "&#10060;",
6299
  "&#11036;",
6300
- "&#10060;",
 
6301
  "&#10060;",
6302
  "&#9989;",
6303
  "&#11036;",
6304
  "&#9989;",
6305
  "&#11036;",
 
6306
  "&#9989;",
6307
- "&#9989;",
6308
- "&#10060;",
6309
  "&#10060;",
6310
  "&#9989;",
6311
  "&#10060;",
@@ -6315,15 +6383,15 @@
6315
  "&#9989;",
6316
  "&#9989;",
6317
  "&#11036;",
6318
- "&#11036;",
6319
  "&#9989;",
6320
  "&#11036;",
6321
  "&#11036;",
6322
  "&#11036;",
6323
  "&#9989;",
6324
- "&#11036;",
6325
  "&#10060;",
6326
  "&#11036;",
 
6327
  "&#9989;",
6328
  "&#10060;",
6329
  "&#9989;",
@@ -6338,7 +6406,7 @@
6338
  "&#11036;",
6339
  "&#9989;",
6340
  "&#9989;",
6341
- "&#11036;",
6342
  "&#9989;",
6343
  "&#9989;",
6344
  "&#11036;",
@@ -6346,16 +6414,16 @@
6346
  "&#11036;",
6347
  "&#9989;",
6348
  "&#11036;",
6349
- "&#11036;",
6350
- "&#11036;",
6351
  "&#9989;",
6352
  "&#9989;",
6353
  "&#11036;",
6354
  "&#11036;",
6355
  "&#11036;",
 
 
6356
  "&#9989;",
6357
  "&#9989;",
6358
- "&#11036;",
6359
  "&#11036;",
6360
  "&#9989;",
6361
  "&#9989;",
@@ -6368,7 +6436,7 @@
6368
  "&#11036;",
6369
  "&#10060;",
6370
  "&#9989;",
6371
- "&#10060;",
6372
  "&#10060;",
6373
  "&#9989;",
6374
  "&#11036;",
@@ -6383,10 +6451,10 @@
6383
  "&#9989;",
6384
  "&#9989;",
6385
  "&#9989;",
6386
- "&#10060;",
6387
  "&#10060;",
6388
  "&#9989;",
6389
- "&#11036;",
6390
  "&#9989;",
6391
  "&#9989;",
6392
  "&#9989;",
@@ -6402,8 +6470,8 @@
6402
  "&#9989;",
6403
  "&#9989;",
6404
  "&#11036;",
 
6405
  "&#11036;",
6406
- "&#10060;",
6407
  "&#9989;",
6408
  "&#9989;",
6409
  "&#11036;",
@@ -6424,7 +6492,7 @@
6424
  "&#9989;",
6425
  "&#11036;",
6426
  "&#9989;",
6427
- "&#11036;",
6428
  "&#9989;",
6429
  "&#9989;",
6430
  "&#9989;",
@@ -6442,28 +6510,28 @@
6442
  "&#9989;",
6443
  "&#9989;",
6444
  "&#11036;",
6445
- "&#9989;",
6446
- "&#10060;",
6447
  "&#11036;",
6448
- "&#9989;",
6449
  "&#10060;",
6450
  "&#9989;",
 
6451
  "&#10060;",
 
 
6452
  "&#10060;",
6453
  "&#9989;",
6454
  "&#11036;",
6455
  "&#9989;",
6456
  "&#9989;",
6457
- "&#11036;",
6458
  "&#11036;",
6459
  "&#9989;",
6460
  "&#9989;",
6461
  "&#9989;",
6462
  "&#11036;",
6463
- "&#10060;",
6464
- "&#10060;",
6465
- "&#10060;",
6466
  "&#11036;",
 
 
 
6467
  "&#9989;",
6468
  "&#11036;",
6469
  "&#9989;",
@@ -6477,17 +6545,17 @@
6477
  "&#10060;",
6478
  "&#11036;",
6479
  "&#9989;",
6480
- "&#10060;",
6481
- "&#10060;",
6482
  "&#9989;",
6483
  "&#9989;",
6484
- "&#11036;",
6485
  "&#9989;",
6486
  "&#9989;",
6487
  "&#9989;",
6488
  "&#9989;",
6489
  "&#9989;",
6490
- "&#10060;",
6491
  "&#9989;",
6492
  "&#11036;",
6493
  "&#10060;",
@@ -6496,22 +6564,22 @@
6496
  "&#9989;",
6497
  "&#11036;",
6498
  "&#10060;",
6499
- "&#11036;",
6500
- "&#11036;",
6501
  "&#9989;",
6502
  "&#11036;",
6503
- "&#11036;",
6504
  "&#9989;",
6505
  "&#9989;",
6506
- "&#11036;",
 
6507
  "&#9989;",
6508
  "&#11036;",
6509
  "&#9989;",
6510
  "&#11036;",
6511
  "&#9989;",
 
 
 
6512
  "&#9989;",
6513
  "&#9989;",
6514
- "&#11036;",
6515
  "&#11036;",
6516
  "&#9989;",
6517
  "&#9989;",
@@ -6529,8 +6597,8 @@
6529
  "&#9989;",
6530
  "&#9989;",
6531
  "&#11036;",
6532
- "&#9989;",
6533
  "&#11036;",
 
6534
  "&#11036;",
6535
  "&#9989;",
6536
  "&#10060;",
@@ -6546,19 +6614,19 @@
6546
  "&#9989;",
6547
  "&#9989;",
6548
  "&#9989;",
6549
- "&#10060;",
6550
- "&#9989;",
6551
- "&#9989;",
6552
- "&#10060;",
6553
  "&#11036;",
6554
  "&#9989;",
 
6555
  "&#10060;",
6556
  "&#11036;",
 
 
6557
  "&#10060;",
 
6558
  "&#10060;",
6559
  "&#9989;",
6560
  "&#9989;",
6561
- "&#9989;",
6562
  "&#9989;",
6563
  "&#9989;",
6564
  "&#9989;",
@@ -6573,7 +6641,7 @@
6573
  "&#9989;",
6574
  "&#10060;",
6575
  "&#11036;",
6576
- "&#9989;",
6577
  "&#11036;",
6578
  "&#10060;",
6579
  "&#9989;",
@@ -6585,7 +6653,7 @@
6585
  "&#9989;",
6586
  "&#9989;",
6587
  "&#9989;",
6588
- "&#11036;",
6589
  "&#9989;",
6590
  "&#9989;",
6591
  "&#9989;",
@@ -6598,34 +6666,34 @@
6598
  "&#10060;",
6599
  "&#9989;",
6600
  "&#9989;",
 
 
6601
  "&#9989;",
6602
  "&#10060;",
6603
  "&#9989;",
6604
- "&#10060;",
6605
  "&#9989;",
6606
  "&#9989;",
6607
  "&#9989;",
6608
  "&#9989;",
 
6609
  "&#9989;",
6610
  "&#9989;",
6611
- "&#11036;",
6612
  "&#9989;",
6613
- "&#11036;",
6614
- "&#10060;",
6615
  "&#10060;",
 
6616
  "&#10060;",
6617
  "&#9989;",
6618
  "&#11036;",
6619
  "&#11036;",
6620
  "&#9989;",
6621
- "&#9989;",
6622
- "&#9989;",
6623
  "&#11036;",
6624
  "&#9989;",
6625
- "&#9989;",
6626
  "&#11036;",
6627
  "&#9989;",
6628
  "&#11036;",
 
 
6629
  "&#11036;",
6630
  "&#9989;",
6631
  "&#10060;",
@@ -6636,7 +6704,7 @@
6636
  "&#9989;",
6637
  "&#9989;",
6638
  "&#11036;",
6639
- "&#10060;",
6640
  "&#11036;",
6641
  "&#9989;",
6642
  "&#9989;",
@@ -6646,7 +6714,7 @@
6646
  "&#9989;",
6647
  "&#9989;",
6648
  "&#9989;",
6649
- "&#9989;",
6650
  "&#9989;",
6651
  "&#11036;",
6652
  "&#9989;",
@@ -6657,7 +6725,7 @@
6657
  "&#9989;",
6658
  "&#11036;",
6659
  "&#9989;",
6660
- "&#11036;",
6661
  "&#9989;",
6662
  "&#10060;",
6663
  "&#9989;",
@@ -6673,22 +6741,22 @@
6673
  "&#9989;",
6674
  "&#9989;",
6675
  "&#11036;",
6676
- "&#11036;",
6677
  "&#9989;",
6678
  "&#9989;",
6679
  "&#9989;",
6680
  "&#10060;",
6681
  "&#9989;",
6682
- "&#11036;",
6683
  "&#9989;",
6684
  "&#9989;",
6685
- "&#11036;",
 
6686
  "&#9989;",
6687
  "&#9989;",
6688
  "&#9989;",
6689
  "&#10060;",
6690
  "&#9989;",
6691
- "&#11036;",
6692
  "&#9989;",
6693
  "&#9989;",
6694
  "&#9989;",
@@ -6701,16 +6769,16 @@
6701
  "&#9989;",
6702
  "&#9989;",
6703
  "&#10060;",
6704
- "&#10060;",
6705
- "&#9989;",
6706
  "&#11036;",
6707
  "&#11036;",
6708
- "&#9989;",
6709
  "&#11036;",
6710
  "&#9989;",
6711
  "&#9989;",
6712
  "&#9989;",
6713
- "&#10060;",
 
 
6714
  "&#10060;",
6715
  "&#9989;",
6716
  "&#9989;",
@@ -6724,24 +6792,27 @@
6724
  "&#9989;",
6725
  "&#11036;",
6726
  "&#9989;",
6727
- "&#10060;",
6728
- "&#9989;",
6729
  "&#11036;",
 
6730
  "&#11036;",
 
6731
  "&#9989;",
6732
  "&#11036;",
6733
  "&#9989;",
6734
  "&#10060;",
6735
  "&#11036;",
6736
  "&#9989;",
6737
- "&#9989;",
6738
  "&#9989;",
6739
  "&#10060;",
 
6740
  "&#9989;"
6741
  ],
6742
  "textposition": "bottom center",
6743
  "type": "scatter",
6744
  "x": [
 
 
6745
  "2019-09-11T00:00:00",
6746
  "2019-09-12T00:00:00",
6747
  "2019-09-13T00:00:00",
@@ -7767,9 +7838,12 @@
7767
  "2023-10-03T00:00:00",
7768
  "2023-10-04T00:00:00",
7769
  "2023-10-05T00:00:00",
7770
- "2023-10-06T00:00:00"
 
7771
  ],
7772
  "y": [
 
 
7773
  2960.4335083007813,
7774
  2985.915322265625,
7775
  2987.885402832031,
@@ -8795,7 +8869,8 @@
8795
  4195.367944335938,
8796
  4199.377580566406,
8797
  4204.78060546875,
8798
- 4198.452055664063
 
8799
  ]
8800
  }
8801
  ],
@@ -9630,8 +9705,8 @@
9630
  },
9631
  "xaxis": {
9632
  "range": [
9633
- "2023-07-28T00:00:00",
9634
- "2023-10-06T00:00:00"
9635
  ],
9636
  "rangebreaks": [
9637
  {
@@ -9736,7 +9811,7 @@
9736
  },
9737
  {
9738
  "cell_type": "code",
9739
- "execution_count": 70,
9740
  "metadata": {},
9741
  "outputs": [
9742
  {
 
2
  "cells": [
3
  {
4
  "cell_type": "code",
5
+ "execution_count": 1,
6
  "metadata": {},
7
  "outputs": [],
8
  "source": [
 
13
  },
14
  {
15
  "cell_type": "code",
16
+ "execution_count": 2,
17
  "metadata": {},
18
  "outputs": [
19
  {
20
  "name": "stderr",
21
  "output_type": "stream",
22
  "text": [
23
+ "getting econ tickers: 100%|โ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆ| 3/3 [00:00<00:00, 4.27it/s]\n",
24
+ "Getting release dates: 100%|โ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆ| 8/8 [00:01<00:00, 4.30it/s]\n",
25
+ "Making indicators: 100%|โ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆ| 8/8 [00:00<00:00, 2663.26it/s]\n",
26
  "Found cached dataset text (C:/Users/WINSTON-ITX/.cache/huggingface/datasets/boomsss___text/boomsss--spx_intra-e0e5e7af8fd43022/0.0.0/cb1e9bd71a82ad27976be3b12b407850fe2837d80c22c5e03a28949843a8ace2)\n",
27
+ "Merging econ data: 100%|โ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆ| 8/8 [00:00<00:00, 999.09it/s]\n"
28
  ]
29
  }
30
  ],
 
34
  },
35
  {
36
  "cell_type": "code",
37
+ "execution_count": 3,
38
  "metadata": {},
39
  "outputs": [],
40
  "source": [
 
46
  },
47
  {
48
  "cell_type": "code",
49
+ "execution_count": 4,
50
  "metadata": {},
51
  "outputs": [
52
  {
53
  "name": "stderr",
54
  "output_type": "stream",
55
  "text": [
56
+ "LR Model: 100%|โ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆ| 1129/1129 [00:03<00:00, 300.05it/s]\n",
57
+ "d:\\Projects\\gamedayspx\\model_intra.py:97: SettingWithCopyWarning: \n",
 
 
58
  "A value is trying to be set on a copy of a slice from a DataFrame.\n",
59
  "Try using .loc[row_indexer,col_indexer] = value instead\n",
60
  "\n",
61
  "See the caveats in the documentation: https://pandas.pydata.org/pandas-docs/stable/user_guide/indexing.html#returning-a-view-versus-a-copy\n",
62
+ " for_merge['RegrModelOut'] = for_merge['RegrModelOut'] > 0\n",
63
+ "CLF Model: 100%|โ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆ| 1029/1029 [00:08<00:00, 123.30it/s]\n",
64
+ "Calibrating Probas: 1029it [00:02, 415.09it/s]\n"
65
  ]
66
  }
67
  ],
 
71
  },
72
  {
73
  "cell_type": "code",
74
+ "execution_count": 5,
75
  "metadata": {},
76
  "outputs": [],
77
  "source": [
 
100
  "hi_thres = 0.6 # res1.loc[middle_quantiles, 'Predicted'].max()\n",
101
  "\n",
102
  "roc_auc_score_all = roc_auc_score(res1['True'].astype(int), res1['Predicted'].values)\n",
103
+ "roc_auc_score_calib = roc_auc_score(res1.dropna(subset='CalibPredicted')['True'].astype(int), res1.dropna(subset='CalibPredicted')['CalibPredicted'].values)\n",
104
  "precision_score_all = precision_score(res1['True'].astype(int), res1['Predicted'] > 0.5)\n",
105
  "recall_score_all = recall_score(res1['True'].astype(int), res1['Predicted'] > 0.5)\n",
106
  "len_all = len(res1)\n",
 
108
  "res2_filtered = res1.loc[(res1['Predicted'] > hi_thres) | (res1['Predicted'] <= lo_thres)]\n",
109
  "\n",
110
  "roc_auc_score_hi = roc_auc_score(res2_filtered['True'].astype(int), res2_filtered['Predicted'].values)\n",
111
+ "roc_auc_score_hi_calib = roc_auc_score(res2_filtered.dropna(subset='CalibPredicted')['True'].astype(int), res2_filtered.dropna(subset='CalibPredicted')['CalibPredicted'].values)\n",
112
  "precision_score_hi = precision_score(res2_filtered['True'].astype(int), res2_filtered['Predicted'] > 0.5)\n",
113
  "recall_score_hi = recall_score(res2_filtered['True'].astype(int), res2_filtered['Predicted'] > 0.5)\n",
114
  "len_hi = len(res2_filtered)\n",
 
166
  },
167
  {
168
  "cell_type": "code",
169
+ "execution_count": 6,
170
  "metadata": {},
171
  "outputs": [
172
  {
 
193
  " <th>True</th>\n",
194
  " <th>Predicted</th>\n",
195
  " <th>CalibPredicted</th>\n",
 
196
  " <th>Accuracy</th>\n",
197
  " <th>HTML</th>\n",
198
  " </tr>\n",
199
  " </thead>\n",
200
  " <tbody>\n",
201
  " <tr>\n",
 
 
 
 
 
 
 
 
 
202
  " <th>2023-09-12</th>\n",
203
  " <td>True</td>\n",
204
+ " <td>0.471917</td>\n",
205
+ " <td>0.422018</td>\n",
 
206
  " <td>๐ŸŸจ</td>\n",
207
  " <td>&amp;#11036;</td>\n",
208
  " </tr>\n",
209
  " <tr>\n",
210
  " <th>2023-09-13</th>\n",
211
  " <td>True</td>\n",
212
+ " <td>0.788835</td>\n",
213
+ " <td>0.876106</td>\n",
 
214
  " <td>โœ…</td>\n",
215
  " <td>&amp;#9989;</td>\n",
216
  " </tr>\n",
217
  " <tr>\n",
218
  " <th>2023-09-14</th>\n",
219
  " <td>False</td>\n",
220
+ " <td>0.224466</td>\n",
221
+ " <td>0.120805</td>\n",
 
222
  " <td>โœ…</td>\n",
223
  " <td>&amp;#9989;</td>\n",
224
  " </tr>\n",
225
  " <tr>\n",
226
  " <th>2023-09-15</th>\n",
227
  " <td>True</td>\n",
228
+ " <td>0.484659</td>\n",
229
+ " <td>0.604651</td>\n",
 
230
  " <td>๐ŸŸจ</td>\n",
231
  " <td>&amp;#11036;</td>\n",
232
  " </tr>\n",
233
  " <tr>\n",
234
  " <th>2023-09-18</th>\n",
235
  " <td>False</td>\n",
236
+ " <td>0.218419</td>\n",
237
+ " <td>0.120000</td>\n",
 
238
  " <td>โœ…</td>\n",
239
  " <td>&amp;#9989;</td>\n",
240
  " </tr>\n",
241
  " <tr>\n",
242
  " <th>2023-09-19</th>\n",
243
  " <td>False</td>\n",
244
+ " <td>0.495749</td>\n",
245
+ " <td>0.607692</td>\n",
246
+ " <td>๐ŸŸจ</td>\n",
247
+ " <td>&amp;#11036;</td>\n",
 
248
  " </tr>\n",
249
  " <tr>\n",
250
  " <th>2023-09-20</th>\n",
251
  " <td>False</td>\n",
252
+ " <td>0.193814</td>\n",
253
+ " <td>0.119205</td>\n",
 
254
  " <td>โœ…</td>\n",
255
  " <td>&amp;#9989;</td>\n",
256
  " </tr>\n",
257
  " <tr>\n",
258
  " <th>2023-09-21</th>\n",
259
  " <td>False</td>\n",
260
+ " <td>0.441842</td>\n",
261
+ " <td>0.427273</td>\n",
 
262
  " <td>๐ŸŸจ</td>\n",
263
  " <td>&amp;#11036;</td>\n",
264
  " </tr>\n",
265
  " <tr>\n",
266
  " <th>2023-09-22</th>\n",
267
  " <td>True</td>\n",
268
+ " <td>0.377387</td>\n",
269
+ " <td>0.196850</td>\n",
270
+ " <td>โŒ</td>\n",
271
+ " <td>&amp;#10060;</td>\n",
 
272
  " </tr>\n",
273
  " <tr>\n",
274
  " <th>2023-09-25</th>\n",
275
  " <td>False</td>\n",
276
+ " <td>0.196610</td>\n",
277
+ " <td>0.118421</td>\n",
 
278
  " <td>โœ…</td>\n",
279
  " <td>&amp;#9989;</td>\n",
280
  " </tr>\n",
281
  " <tr>\n",
282
  " <th>2023-09-26</th>\n",
283
  " <td>True</td>\n",
284
+ " <td>0.400516</td>\n",
285
+ " <td>0.423423</td>\n",
 
286
  " <td>๐ŸŸจ</td>\n",
287
  " <td>&amp;#11036;</td>\n",
288
  " </tr>\n",
289
  " <tr>\n",
290
  " <th>2023-09-27</th>\n",
291
  " <td>True</td>\n",
292
+ " <td>0.719858</td>\n",
293
+ " <td>0.761194</td>\n",
 
294
  " <td>โœ…</td>\n",
295
  " <td>&amp;#9989;</td>\n",
296
  " </tr>\n",
297
  " <tr>\n",
298
  " <th>2023-09-28</th>\n",
299
  " <td>False</td>\n",
300
+ " <td>0.778499</td>\n",
301
+ " <td>0.876652</td>\n",
 
302
  " <td>โŒ</td>\n",
303
  " <td>&amp;#10060;</td>\n",
304
  " </tr>\n",
305
  " <tr>\n",
306
  " <th>2023-09-29</th>\n",
307
  " <td>True</td>\n",
308
+ " <td>0.547333</td>\n",
309
+ " <td>0.603053</td>\n",
 
310
  " <td>๐ŸŸจ</td>\n",
311
  " <td>&amp;#11036;</td>\n",
312
  " </tr>\n",
313
  " <tr>\n",
314
  " <th>2023-10-02</th>\n",
315
  " <td>False</td>\n",
316
+ " <td>0.199027</td>\n",
317
+ " <td>0.117647</td>\n",
 
318
  " <td>โœ…</td>\n",
319
  " <td>&amp;#9989;</td>\n",
320
  " </tr>\n",
321
  " <tr>\n",
322
  " <th>2023-10-03</th>\n",
323
  " <td>True</td>\n",
324
+ " <td>0.528719</td>\n",
325
+ " <td>0.606061</td>\n",
326
+ " <td>๐ŸŸจ</td>\n",
327
+ " <td>&amp;#11036;</td>\n",
 
328
  " </tr>\n",
329
  " <tr>\n",
330
  " <th>2023-10-04</th>\n",
331
  " <td>False</td>\n",
332
+ " <td>0.240551</td>\n",
333
+ " <td>0.116883</td>\n",
 
334
  " <td>โœ…</td>\n",
335
  " <td>&amp;#9989;</td>\n",
336
  " </tr>\n",
337
  " <tr>\n",
338
  " <th>2023-10-05</th>\n",
339
  " <td>True</td>\n",
340
+ " <td>0.232103</td>\n",
341
+ " <td>0.116129</td>\n",
 
342
  " <td>โŒ</td>\n",
343
  " <td>&amp;#10060;</td>\n",
344
  " </tr>\n",
345
  " <tr>\n",
346
  " <th>2023-10-06</th>\n",
347
  " <td>True</td>\n",
348
+ " <td>0.638131</td>\n",
349
+ " <td>0.511111</td>\n",
350
+ " <td>โœ…</td>\n",
351
+ " <td>&amp;#9989;</td>\n",
352
+ " </tr>\n",
353
+ " <tr>\n",
354
+ " <th>2023-10-09</th>\n",
355
+ " <td>True</td>\n",
356
+ " <td>0.785267</td>\n",
357
+ " <td>0.872807</td>\n",
358
  " <td>โœ…</td>\n",
359
  " <td>&amp;#9989;</td>\n",
360
  " </tr>\n",
 
363
  "</div>"
364
  ],
365
  "text/plain": [
366
+ " True Predicted CalibPredicted Accuracy HTML\n",
367
+ "2023-09-12 True 0.471917 0.422018 ๐ŸŸจ &#11036;\n",
368
+ "2023-09-13 True 0.788835 0.876106 โœ… &#9989;\n",
369
+ "2023-09-14 False 0.224466 0.120805 โœ… &#9989;\n",
370
+ "2023-09-15 True 0.484659 0.604651 ๐ŸŸจ &#11036;\n",
371
+ "2023-09-18 False 0.218419 0.120000 โœ… &#9989;\n",
372
+ "2023-09-19 False 0.495749 0.607692 ๐ŸŸจ &#11036;\n",
373
+ "2023-09-20 False 0.193814 0.119205 โœ… &#9989;\n",
374
+ "2023-09-21 False 0.441842 0.427273 ๐ŸŸจ &#11036;\n",
375
+ "2023-09-22 True 0.377387 0.196850 โŒ &#10060;\n",
376
+ "2023-09-25 False 0.196610 0.118421 โœ… &#9989;\n",
377
+ "2023-09-26 True 0.400516 0.423423 ๐ŸŸจ &#11036;\n",
378
+ "2023-09-27 True 0.719858 0.761194 โœ… &#9989;\n",
379
+ "2023-09-28 False 0.778499 0.876652 โŒ &#10060;\n",
380
+ "2023-09-29 True 0.547333 0.603053 ๐ŸŸจ &#11036;\n",
381
+ "2023-10-02 False 0.199027 0.117647 โœ… &#9989;\n",
382
+ "2023-10-03 True 0.528719 0.606061 ๐ŸŸจ &#11036;\n",
383
+ "2023-10-04 False 0.240551 0.116883 โœ… &#9989;\n",
384
+ "2023-10-05 True 0.232103 0.116129 โŒ &#10060;\n",
385
+ "2023-10-06 True 0.638131 0.511111 โœ… &#9989;\n",
386
+ "2023-10-09 True 0.785267 0.872807 โœ… &#9989;"
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
387
  ]
388
  },
389
+ "execution_count": 6,
390
  "metadata": {},
391
  "output_type": "execute_result"
392
  }
 
397
  },
398
  {
399
  "cell_type": "code",
400
+ "execution_count": 7,
401
  "metadata": {},
402
  "outputs": [
403
  {
 
406
  "147"
407
  ]
408
  },
409
+ "execution_count": 7,
410
  "metadata": {},
411
  "output_type": "execute_result"
412
  }
 
417
  },
418
  {
419
  "cell_type": "code",
420
+ "execution_count": 37,
421
+ "metadata": {},
422
+ "outputs": [],
423
+ "source": [
424
+ "df_levels = pd.DataFrame(\n",
425
+ " index=['H2','H1','L1','L2'],\n",
426
+ " columns=['Level','BreakPct(100)','TouchPct(100)'],\n",
427
+ " data=[\n",
428
+ " [f\"{data['H2'].iloc[-1]:.2f}\",f\"{data['H2BreakPct'].iloc[-2]:.1%}\",f\"{data['H2TouchPct'].iloc[-2]:.1%}\"],\n",
429
+ " [f\"{data['H1'].iloc[-1]:.2f}\",f\"{data['H1BreakPct'].iloc[-2]:.1%}\",f\"{data['H1TouchPct'].iloc[-2]:.1%}\"],\n",
430
+ " [f\"{data['L1'].iloc[-1]:.2f}\",f\"{data['L1BreakPct'].iloc[-2]:.1%}\",f\"{data['L1TouchPct'].iloc[-2]:.1%}\"],\n",
431
+ " [f\"{data['L2'].iloc[-1]:.2f}\",f\"{data['L2BreakPct'].iloc[-2]:.1%}\",f\"{data['L2TouchPct'].iloc[-2]:.1%}\"]\n",
432
+ " ]\n",
433
+ ")"
434
+ ]
435
+ },
436
+ {
437
+ "cell_type": "code",
438
+ "execution_count": 38,
439
+ "metadata": {},
440
+ "outputs": [
441
+ {
442
+ "data": {
443
+ "text/html": [
444
+ "<div>\n",
445
+ "<style scoped>\n",
446
+ " .dataframe tbody tr th:only-of-type {\n",
447
+ " vertical-align: middle;\n",
448
+ " }\n",
449
+ "\n",
450
+ " .dataframe tbody tr th {\n",
451
+ " vertical-align: top;\n",
452
+ " }\n",
453
+ "\n",
454
+ " .dataframe thead th {\n",
455
+ " text-align: right;\n",
456
+ " }\n",
457
+ "</style>\n",
458
+ "<table border=\"1\" class=\"dataframe\">\n",
459
+ " <thead>\n",
460
+ " <tr style=\"text-align: right;\">\n",
461
+ " <th></th>\n",
462
+ " <th>Level</th>\n",
463
+ " <th>BreakPct</th>\n",
464
+ " <th>TouchPct</th>\n",
465
+ " </tr>\n",
466
+ " </thead>\n",
467
+ " <tbody>\n",
468
+ " <tr>\n",
469
+ " <th>H2</th>\n",
470
+ " <td>4379.56</td>\n",
471
+ " <td>11.0%</td>\n",
472
+ " <td>17.0%</td>\n",
473
+ " </tr>\n",
474
+ " <tr>\n",
475
+ " <th>H1</th>\n",
476
+ " <td>4359.40</td>\n",
477
+ " <td>22.0%</td>\n",
478
+ " <td>41.0%</td>\n",
479
+ " </tr>\n",
480
+ " <tr>\n",
481
+ " <th>L1</th>\n",
482
+ " <td>4317.15</td>\n",
483
+ " <td>21.0%</td>\n",
484
+ " <td>41.0%</td>\n",
485
+ " </tr>\n",
486
+ " <tr>\n",
487
+ " <th>L2</th>\n",
488
+ " <td>4296.99</td>\n",
489
+ " <td>14.0%</td>\n",
490
+ " <td>21.0%</td>\n",
491
+ " </tr>\n",
492
+ " </tbody>\n",
493
+ "</table>\n",
494
+ "</div>"
495
+ ],
496
+ "text/plain": [
497
+ " Level BreakPct TouchPct\n",
498
+ "H2 4379.56 11.0% 17.0%\n",
499
+ "H1 4359.40 22.0% 41.0%\n",
500
+ "L1 4317.15 21.0% 41.0%\n",
501
+ "L2 4296.99 14.0% 21.0%"
502
+ ]
503
+ },
504
+ "execution_count": 38,
505
+ "metadata": {},
506
+ "output_type": "execute_result"
507
+ }
508
+ ],
509
+ "source": [
510
+ "df_levels"
511
+ ]
512
+ },
513
+ {
514
+ "cell_type": "code",
515
+ "execution_count": 8,
516
  "metadata": {},
517
  "outputs": [
518
  {
 
543
  " <tbody>\n",
544
  " <tr>\n",
545
  " <th>N</th>\n",
546
+ " <td>1029.00</td>\n",
547
+ " <td>756.00</td>\n",
548
  " </tr>\n",
549
  " <tr>\n",
550
  " <th>ROC AUC</th>\n",
551
+ " <td>0.81</td>\n",
552
  " <td>0.85</td>\n",
553
  " </tr>\n",
554
  " <tr>\n",
555
  " <th>Calib. AUC</th>\n",
556
  " <td>0.77</td>\n",
557
+ " <td>0.81</td>\n",
558
  " </tr>\n",
559
  " <tr>\n",
560
  " <th>Precision</th>\n",
561
+ " <td>0.73</td>\n",
562
+ " <td>0.78</td>\n",
563
  " </tr>\n",
564
  " <tr>\n",
565
  " <th>Recall</th>\n",
566
  " <td>0.79</td>\n",
567
+ " <td>0.87</td>\n",
568
  " </tr>\n",
569
  " </tbody>\n",
570
  "</table>\n",
 
572
  ],
573
  "text/plain": [
574
  " All High Confidence\n",
575
+ "N 1029.00 756.00\n",
576
+ "ROC AUC 0.81 0.85\n",
577
+ "Calib. AUC 0.77 0.81\n",
578
+ "Precision 0.73 0.78\n",
579
+ "Recall 0.79 0.87"
580
  ]
581
  },
582
+ "execution_count": 8,
583
  "metadata": {},
584
  "output_type": "execute_result"
585
  }
 
590
  },
591
  {
592
  "cell_type": "code",
593
+ "execution_count": 9,
594
  "metadata": {},
595
  "outputs": [
596
  {
 
602
  "data": [
603
  {
604
  "close": [
605
+ 2978.429931640625,
606
+ 2979.389892578125,
607
  3000.929931640625,
608
  3009.570068359375,
609
  3007.389892578125,
 
1629
  4229.4501953125,
1630
  4263.75,
1631
  4258.18994140625,
1632
+ 4308.5,
1633
+ 4335.66015625
1634
  ],
1635
  "decreasing": {
1636
  "fillcolor": "#ff5f5f",
 
1639
  }
1640
  },
1641
  "high": [
1642
+ 2989.429931640625,
1643
+ 2979.389892578125,
1644
  3000.929931640625,
1645
  3020.739990234375,
1646
  3017.330078125,
 
2666
  4281.14990234375,
2667
  4268.5,
2668
  4267.1298828125,
2669
+ 4324.10009765625,
2670
+ 4341.72998046875
2671
  ],
2672
  "increasing": {
2673
  "fillcolor": "#3399ff",
 
2676
  }
2677
  },
2678
  "low": [
2679
+ 2969.389892578125,
2680
+ 2957.010009765625,
2681
  2975.31005859375,
2682
  3000.919921875,
2683
  3002.89990234375,
 
3703
  4216.4501953125,
3704
  4220.47998046875,
3705
  4225.91015625,
3706
+ 4219.5498046875,
3707
+ 4283.7900390625
3708
  ],
3709
  "name": "OHLC Chart",
3710
  "open": [
3711
+ 2988.429931640625,
3712
+ 2971.010009765625,
3713
  2981.409912109375,
3714
  3009.080078125,
3715
  3012.2099609375,
 
4735
  4269.75,
4736
  4233.830078125,
4737
  4259.31005859375,
4738
+ 4234.7900390625,
4739
+ 4289.02001953125
4740
  ],
4741
  "type": "candlestick",
4742
  "x": [
4743
+ "2019-09-09T00:00:00",
4744
+ "2019-09-10T00:00:00",
4745
  "2019-09-11T00:00:00",
4746
  "2019-09-12T00:00:00",
4747
  "2019-09-13T00:00:00",
 
5767
  "2023-10-03T00:00:00",
5768
  "2023-10-04T00:00:00",
5769
  "2023-10-05T00:00:00",
5770
+ "2023-10-06T00:00:00",
5771
+ "2023-10-09T00:00:00"
5772
  ]
5773
  },
5774
  {
 
5778
  "mode": "text",
5779
  "name": "Predictions",
5780
  "text": [
5781
+ "&#10060;",
5782
  "&#11036;",
5783
  "&#9989;",
 
5784
  "&#10060;",
5785
  "&#9989;",
 
5786
  "&#11036;",
 
5787
  "&#11036;",
5788
  "&#9989;",
5789
  "&#10060;",
5790
+ "&#10060;",
5791
+ "&#10060;",
5792
+ "&#11036;",
5793
+ "&#9989;",
5794
+ "&#11036;",
5795
  "&#9989;",
5796
  "&#9989;",
5797
  "&#9989;",
 
5804
  "&#9989;",
5805
  "&#11036;",
5806
  "&#9989;",
5807
+ "&#11036;",
5808
  "&#9989;",
5809
  "&#11036;",
5810
  "&#9989;",
5811
  "&#11036;",
5812
  "&#11036;",
5813
  "&#11036;",
5814
+ "&#11036;",
5815
  "&#9989;",
5816
  "&#11036;",
5817
  "&#11036;",
 
5819
  "&#9989;",
5820
  "&#9989;",
5821
  "&#10060;",
5822
+ "&#9989;",
5823
  "&#9989;",
5824
  "&#11036;",
5825
  "&#9989;",
 
5830
  "&#10060;",
5831
  "&#10060;",
5832
  "&#11036;",
5833
+ "&#11036;",
5834
  "&#11036;",
5835
  "&#9989;",
5836
  "&#9989;",
5837
  "&#9989;",
5838
+ "&#11036;",
5839
  "&#9989;",
5840
  "&#9989;",
5841
  "&#9989;",
 
5843
  "&#9989;",
5844
  "&#11036;",
5845
  "&#10060;",
5846
+ "&#9989;",
5847
  "&#9989;",
5848
  "&#9989;",
5849
  "&#9989;",
5850
  "&#11036;",
5851
+ "&#10060;",
5852
+ "&#9989;",
5853
  "&#9989;",
5854
  "&#9989;",
5855
  "&#11036;",
5856
  "&#9989;",
5857
  "&#9989;",
5858
  "&#9989;",
5859
+ "&#11036;",
5860
  "&#9989;",
5861
  "&#9989;",
5862
+ "&#11036;",
5863
  "&#9989;",
5864
  "&#11036;",
5865
  "&#9989;",
 
5871
  "&#9989;",
5872
  "&#9989;",
5873
  "&#9989;",
5874
+ "&#10060;",
5875
  "&#11036;",
5876
  "&#9989;",
5877
  "&#9989;",
 
5898
  "&#9989;",
5899
  "&#9989;",
5900
  "&#9989;",
5901
+ "&#10060;",
5902
  "&#9989;",
5903
  "&#9989;",
5904
  "&#9989;",
 
5918
  "&#9989;",
5919
  "&#9989;",
5920
  "&#9989;",
5921
+ "&#10060;",
5922
  "&#9989;",
5923
  "&#9989;",
5924
  "&#11036;",
 
5955
  "&#11036;",
5956
  "&#9989;",
5957
  "&#11036;",
5958
+ "&#11036;",
5959
  "&#9989;",
5960
  "&#11036;",
5961
  "&#10060;",
 
5963
  "&#11036;",
5964
  "&#9989;",
5965
  "&#9989;",
5966
+ "&#9989;",
5967
  "&#9989;",
5968
  "&#11036;",
5969
  "&#9989;",
 
5987
  "&#9989;",
5988
  "&#9989;",
5989
  "&#9989;",
5990
+ "&#9989;",
5991
  "&#11036;",
5992
  "&#10060;",
5993
  "&#11036;",
5994
  "&#9989;",
 
5995
  "&#11036;",
5996
+ "&#10060;",
5997
  "&#9989;",
5998
  "&#9989;",
5999
  "&#11036;",
6000
  "&#9989;",
6001
  "&#9989;",
6002
  "&#9989;",
6003
+ "&#9989;",
6004
  "&#9989;",
6005
  "&#9989;",
6006
  "&#10060;",
 
6017
  "&#9989;",
6018
  "&#11036;",
6019
  "&#10060;",
 
 
 
6020
  "&#11036;",
6021
+ "&#11036;",
6022
+ "&#9989;",
6023
+ "&#10060;",
6024
  "&#9989;",
6025
  "&#9989;",
6026
  "&#9989;",
 
6037
  "&#9989;",
6038
  "&#10060;",
6039
  "&#9989;",
6040
+ "&#10060;",
6041
  "&#9989;",
6042
  "&#9989;",
6043
  "&#11036;",
6044
+ "&#11036;",
6045
  "&#9989;",
6046
  "&#9989;",
6047
  "&#10060;",
 
6049
  "&#9989;",
6050
  "&#9989;",
6051
  "&#9989;",
6052
+ "&#11036;",
6053
+ "&#9989;",
6054
  "&#9989;",
6055
  "&#9989;",
6056
  "&#9989;",
6057
  "&#9989;",
 
6058
  "&#11036;",
6059
  "&#9989;",
6060
  "&#9989;",
 
6080
  "&#9989;",
6081
  "&#9989;",
6082
  "&#9989;",
 
6083
  "&#11036;",
6084
+ "&#11036;",
6085
+ "&#11036;",
6086
  "&#9989;",
6087
  "&#9989;",
6088
  "&#9989;",
 
6092
  "&#10060;",
6093
  "&#10060;",
6094
  "&#9989;",
 
6095
  "&#11036;",
6096
+ "&#11036;",
6097
+ "&#11036;",
6098
  "&#10060;",
6099
  "&#11036;",
6100
  "&#10060;",
 
6110
  "&#11036;",
6111
  "&#9989;",
6112
  "&#11036;",
6113
+ "&#11036;",
6114
  "&#9989;",
6115
  "&#9989;",
6116
  "&#9989;",
6117
  "&#10060;",
6118
  "&#9989;",
6119
  "&#11036;",
 
 
6120
  "&#11036;",
6121
+ "&#10060;",
6122
+ "&#9989;",
6123
  "&#9989;",
6124
  "&#9989;",
6125
  "&#9989;",
 
6140
  "&#9989;",
6141
  "&#11036;",
6142
  "&#10060;",
6143
+ "&#11036;",
6144
  "&#9989;",
6145
  "&#10060;",
6146
  "&#9989;",
6147
  "&#10060;",
6148
+ "&#9989;",
6149
  "&#11036;",
6150
  "&#11036;",
6151
  "&#9989;",
6152
  "&#9989;",
6153
  "&#9989;",
 
6154
  "&#11036;",
6155
  "&#11036;",
6156
  "&#10060;",
 
6164
  "&#9989;",
6165
  "&#11036;",
6166
  "&#9989;",
 
6167
  "&#10060;",
6168
  "&#10060;",
6169
+ "&#11036;",
6170
  "&#9989;",
6171
  "&#9989;",
6172
  "&#11036;",
6173
  "&#9989;",
6174
  "&#9989;",
6175
  "&#9989;",
 
6176
  "&#11036;",
6177
  "&#9989;",
6178
  "&#9989;",
6179
+ "&#11036;",
6180
  "&#9989;",
6181
  "&#11036;",
6182
  "&#10060;",
6183
  "&#9989;",
6184
  "&#11036;",
6185
  "&#9989;",
6186
+ "&#11036;",
6187
  "&#9989;",
6188
  "&#9989;",
6189
  "&#9989;",
6190
  "&#9989;",
6191
  "&#11036;",
 
6192
  "&#10060;",
6193
  "&#9989;",
6194
  "&#9989;",
6195
  "&#9989;",
6196
  "&#9989;",
6197
  "&#11036;",
6198
+ "&#10060;",
6199
  "&#9989;",
6200
  "&#9989;",
6201
  "&#9989;",
 
6203
  "&#9989;",
6204
  "&#9989;",
6205
  "&#9989;",
6206
+ "&#11036;",
6207
  "&#9989;",
6208
  "&#9989;",
6209
  "&#10060;",
 
6218
  "&#9989;",
6219
  "&#9989;",
6220
  "&#11036;",
6221
+ "&#10060;",
6222
  "&#9989;",
6223
  "&#11036;",
6224
  "&#10060;",
6225
  "&#9989;",
6226
  "&#10060;",
6227
+ "&#11036;",
6228
  "&#9989;",
6229
  "&#9989;",
6230
+ "&#11036;",
6231
  "&#11036;",
6232
  "&#9989;",
6233
  "&#9989;",
 
6240
  "&#11036;",
6241
  "&#9989;",
6242
  "&#9989;",
 
 
6243
  "&#9989;",
6244
+ "&#10060;",
6245
  "&#9989;",
6246
  "&#11036;",
6247
  "&#9989;",
6248
  "&#9989;",
6249
  "&#9989;",
6250
+ "&#9989;",
6251
+ "&#9989;",
6252
  "&#9989;",
6253
  "&#10060;",
6254
  "&#9989;",
 
6259
  "&#11036;",
6260
  "&#11036;",
6261
  "&#9989;",
6262
+ "&#9989;",
6263
+ "&#9989;",
6264
  "&#9989;",
6265
  "&#9989;",
6266
  "&#9989;",
6267
  "&#11036;",
6268
  "&#10060;",
6269
  "&#9989;",
 
6270
  "&#11036;",
6271
  "&#9989;",
6272
  "&#9989;",
6273
+ "&#9989;",
6274
+ "&#9989;",
6275
  "&#11036;",
6276
  "&#9989;",
6277
  "&#9989;",
 
6284
  "&#9989;",
6285
  "&#10060;",
6286
  "&#11036;",
 
6287
  "&#11036;",
6288
+ "&#9989;",
6289
  "&#11036;",
6290
  "&#9989;",
6291
  "&#9989;",
 
6294
  "&#9989;",
6295
  "&#9989;",
6296
  "&#11036;",
6297
+ "&#11036;",
6298
  "&#9989;",
6299
  "&#9989;",
6300
  "&#11036;",
 
6312
  "&#10060;",
6313
  "&#9989;",
6314
  "&#9989;",
 
6315
  "&#10060;",
6316
+ "&#10060;",
 
6317
  "&#11036;",
6318
  "&#9989;",
6319
  "&#11036;",
6320
+ "&#9989;",
6321
+ "&#10060;",
6322
  "&#11036;",
6323
  "&#11036;",
6324
  "&#10060;",
6325
  "&#9989;",
6326
  "&#9989;",
 
6327
  "&#9989;",
 
6328
  "&#9989;",
6329
+ "&#11036;",
6330
+ "&#11036;",
6331
  "&#9989;",
6332
  "&#10060;",
6333
  "&#9989;",
6334
  "&#9989;",
6335
  "&#11036;",
 
 
6336
  "&#11036;",
6337
  "&#10060;",
6338
+ "&#11036;",
6339
+ "&#11036;",
6340
  "&#9989;",
6341
  "&#9989;",
6342
  "&#9989;",
6343
  "&#10060;",
6344
  "&#9989;",
6345
+ "&#11036;",
6346
  "&#9989;",
6347
  "&#9989;",
6348
  "&#11036;",
 
6355
  "&#9989;",
6356
  "&#9989;",
6357
  "&#9989;",
 
6358
  "&#9989;",
6359
  "&#9989;",
6360
+ "&#9989;",
6361
+ "&#10060;",
6362
  "&#11036;",
6363
  "&#10060;",
6364
  "&#11036;",
6365
  "&#9989;",
 
6366
  "&#11036;",
6367
+ "&#11036;",
6368
+ "&#11036;",
6369
  "&#10060;",
6370
  "&#9989;",
6371
  "&#11036;",
6372
  "&#9989;",
6373
  "&#11036;",
6374
+ "&#11036;",
6375
  "&#9989;",
6376
+ "&#11036;",
 
6377
  "&#10060;",
6378
  "&#9989;",
6379
  "&#10060;",
 
6383
  "&#9989;",
6384
  "&#9989;",
6385
  "&#11036;",
6386
+ "&#9989;",
6387
  "&#9989;",
6388
  "&#11036;",
6389
  "&#11036;",
6390
  "&#11036;",
6391
  "&#9989;",
 
6392
  "&#10060;",
6393
  "&#11036;",
6394
+ "&#11036;",
6395
  "&#9989;",
6396
  "&#10060;",
6397
  "&#9989;",
 
6406
  "&#11036;",
6407
  "&#9989;",
6408
  "&#9989;",
6409
+ "&#9989;",
6410
  "&#9989;",
6411
  "&#9989;",
6412
  "&#11036;",
 
6414
  "&#11036;",
6415
  "&#9989;",
6416
  "&#11036;",
6417
+ "&#10060;",
 
6418
  "&#9989;",
6419
  "&#9989;",
6420
  "&#11036;",
6421
  "&#11036;",
6422
  "&#11036;",
6423
+ "&#11036;",
6424
+ "&#9989;",
6425
  "&#9989;",
6426
  "&#9989;",
 
6427
  "&#11036;",
6428
  "&#9989;",
6429
  "&#9989;",
 
6436
  "&#11036;",
6437
  "&#10060;",
6438
  "&#9989;",
6439
+ "&#11036;",
6440
  "&#10060;",
6441
  "&#9989;",
6442
  "&#11036;",
 
6451
  "&#9989;",
6452
  "&#9989;",
6453
  "&#9989;",
6454
+ "&#11036;",
6455
  "&#10060;",
6456
  "&#9989;",
6457
+ "&#10060;",
6458
  "&#9989;",
6459
  "&#9989;",
6460
  "&#9989;",
 
6470
  "&#9989;",
6471
  "&#9989;",
6472
  "&#11036;",
6473
+ "&#9989;",
6474
  "&#11036;",
 
6475
  "&#9989;",
6476
  "&#9989;",
6477
  "&#11036;",
 
6492
  "&#9989;",
6493
  "&#11036;",
6494
  "&#9989;",
6495
+ "&#9989;",
6496
  "&#9989;",
6497
  "&#9989;",
6498
  "&#9989;",
 
6510
  "&#9989;",
6511
  "&#9989;",
6512
  "&#11036;",
 
 
6513
  "&#11036;",
 
6514
  "&#10060;",
6515
  "&#9989;",
6516
+ "&#9989;",
6517
  "&#10060;",
6518
+ "&#9989;",
6519
+ "&#11036;",
6520
  "&#10060;",
6521
  "&#9989;",
6522
  "&#11036;",
6523
  "&#9989;",
6524
  "&#9989;",
6525
+ "&#10060;",
6526
  "&#11036;",
6527
  "&#9989;",
6528
  "&#9989;",
6529
  "&#9989;",
6530
  "&#11036;",
 
 
 
6531
  "&#11036;",
6532
+ "&#11036;",
6533
+ "&#10060;",
6534
+ "&#9989;",
6535
  "&#9989;",
6536
  "&#11036;",
6537
  "&#9989;",
 
6545
  "&#10060;",
6546
  "&#11036;",
6547
  "&#9989;",
6548
+ "&#11036;",
6549
+ "&#11036;",
6550
  "&#9989;",
6551
  "&#9989;",
6552
+ "&#10060;",
6553
  "&#9989;",
6554
  "&#9989;",
6555
  "&#9989;",
6556
  "&#9989;",
6557
  "&#9989;",
6558
+ "&#11036;",
6559
  "&#9989;",
6560
  "&#11036;",
6561
  "&#10060;",
 
6564
  "&#9989;",
6565
  "&#11036;",
6566
  "&#10060;",
 
 
6567
  "&#9989;",
6568
  "&#11036;",
 
6569
  "&#9989;",
6570
  "&#9989;",
6571
+ "&#10060;",
6572
+ "&#9989;",
6573
  "&#9989;",
6574
  "&#11036;",
6575
  "&#9989;",
6576
  "&#11036;",
6577
  "&#9989;",
6578
+ "&#10060;",
6579
+ "&#9989;",
6580
+ "&#9989;",
6581
  "&#9989;",
6582
  "&#9989;",
 
6583
  "&#11036;",
6584
  "&#9989;",
6585
  "&#9989;",
 
6597
  "&#9989;",
6598
  "&#9989;",
6599
  "&#11036;",
 
6600
  "&#11036;",
6601
+ "&#10060;",
6602
  "&#11036;",
6603
  "&#9989;",
6604
  "&#10060;",
 
6614
  "&#9989;",
6615
  "&#9989;",
6616
  "&#9989;",
 
 
 
 
6617
  "&#11036;",
6618
  "&#9989;",
6619
+ "&#11036;",
6620
  "&#10060;",
6621
  "&#11036;",
6622
+ "&#11036;",
6623
+ "&#11036;",
6624
  "&#10060;",
6625
+ "&#11036;",
6626
  "&#10060;",
6627
  "&#9989;",
6628
  "&#9989;",
6629
+ "&#11036;",
6630
  "&#9989;",
6631
  "&#9989;",
6632
  "&#9989;",
 
6641
  "&#9989;",
6642
  "&#10060;",
6643
  "&#11036;",
6644
+ "&#11036;",
6645
  "&#11036;",
6646
  "&#10060;",
6647
  "&#9989;",
 
6653
  "&#9989;",
6654
  "&#9989;",
6655
  "&#9989;",
6656
+ "&#10060;",
6657
  "&#9989;",
6658
  "&#9989;",
6659
  "&#9989;",
 
6666
  "&#10060;",
6667
  "&#9989;",
6668
  "&#9989;",
6669
+ "&#11036;",
6670
+ "&#11036;",
6671
  "&#9989;",
6672
  "&#10060;",
6673
  "&#9989;",
 
6674
  "&#9989;",
6675
  "&#9989;",
6676
  "&#9989;",
6677
  "&#9989;",
6678
+ "&#11036;",
6679
  "&#9989;",
6680
  "&#9989;",
 
6681
  "&#9989;",
 
 
6682
  "&#10060;",
6683
+ "&#11036;",
6684
  "&#10060;",
6685
  "&#9989;",
6686
  "&#11036;",
6687
  "&#11036;",
6688
  "&#9989;",
 
 
6689
  "&#11036;",
6690
  "&#9989;",
6691
+ "&#11036;",
6692
  "&#11036;",
6693
  "&#9989;",
6694
  "&#11036;",
6695
+ "&#9989;",
6696
+ "&#9989;",
6697
  "&#11036;",
6698
  "&#9989;",
6699
  "&#10060;",
 
6704
  "&#9989;",
6705
  "&#9989;",
6706
  "&#11036;",
6707
+ "&#11036;",
6708
  "&#11036;",
6709
  "&#9989;",
6710
  "&#9989;",
 
6714
  "&#9989;",
6715
  "&#9989;",
6716
  "&#9989;",
6717
+ "&#11036;",
6718
  "&#9989;",
6719
  "&#11036;",
6720
  "&#9989;",
 
6725
  "&#9989;",
6726
  "&#11036;",
6727
  "&#9989;",
6728
+ "&#9989;",
6729
  "&#9989;",
6730
  "&#10060;",
6731
  "&#9989;",
 
6741
  "&#9989;",
6742
  "&#9989;",
6743
  "&#11036;",
6744
+ "&#9989;",
6745
  "&#9989;",
6746
  "&#9989;",
6747
  "&#9989;",
6748
  "&#10060;",
6749
  "&#9989;",
 
6750
  "&#9989;",
6751
  "&#9989;",
6752
+ "&#9989;",
6753
+ "&#9989;",
6754
  "&#9989;",
6755
  "&#9989;",
6756
  "&#9989;",
6757
  "&#10060;",
6758
  "&#9989;",
6759
+ "&#9989;",
6760
  "&#9989;",
6761
  "&#9989;",
6762
  "&#9989;",
 
6769
  "&#9989;",
6770
  "&#9989;",
6771
  "&#10060;",
 
 
6772
  "&#11036;",
6773
  "&#11036;",
6774
+ "&#11036;",
6775
  "&#11036;",
6776
  "&#9989;",
6777
  "&#9989;",
6778
  "&#9989;",
6779
+ "&#9989;",
6780
+ "&#9989;",
6781
+ "&#11036;",
6782
  "&#10060;",
6783
  "&#9989;",
6784
  "&#9989;",
 
6792
  "&#9989;",
6793
  "&#11036;",
6794
  "&#9989;",
 
 
6795
  "&#11036;",
6796
+ "&#9989;",
6797
  "&#11036;",
6798
+ "&#10060;",
6799
  "&#9989;",
6800
  "&#11036;",
6801
  "&#9989;",
6802
  "&#10060;",
6803
  "&#11036;",
6804
  "&#9989;",
6805
+ "&#11036;",
6806
  "&#9989;",
6807
  "&#10060;",
6808
+ "&#9989;",
6809
  "&#9989;"
6810
  ],
6811
  "textposition": "bottom center",
6812
  "type": "scatter",
6813
  "x": [
6814
+ "2019-09-09T00:00:00",
6815
+ "2019-09-10T00:00:00",
6816
  "2019-09-11T00:00:00",
6817
  "2019-09-12T00:00:00",
6818
  "2019-09-13T00:00:00",
 
7838
  "2023-10-03T00:00:00",
7839
  "2023-10-04T00:00:00",
7840
  "2023-10-05T00:00:00",
7841
+ "2023-10-06T00:00:00",
7842
+ "2023-10-09T00:00:00"
7843
  ],
7844
  "y": [
7845
+ 2954.5429431152343,
7846
+ 2942.224959716797,
7847
  2960.4335083007813,
7848
  2985.915322265625,
7849
  2987.885402832031,
 
8869
  4195.367944335938,
8870
  4199.377580566406,
8871
  4204.78060546875,
8872
+ 4198.452055664063,
8873
+ 4262.371088867188
8874
  ]
8875
  }
8876
  ],
 
9705
  },
9706
  "xaxis": {
9707
  "range": [
9708
+ "2023-07-31T00:00:00",
9709
+ "2023-10-09T00:00:00"
9710
  ],
9711
  "rangebreaks": [
9712
  {
 
9811
  },
9812
  {
9813
  "cell_type": "code",
9814
+ "execution_count": 10,
9815
  "metadata": {},
9816
  "outputs": [
9817
  {