Spaces:
Sleeping
Sleeping
bigger top of fold
Browse files
app.py
CHANGED
@@ -294,7 +294,7 @@ with st.form("choose_model"):
|
|
294 |
|
295 |
seq_proba = seq_predict_proba(new_pred, xgbr, seq2)
|
296 |
|
297 |
-
st.success(f
|
298 |
|
299 |
green_proba = seq_proba[0]
|
300 |
red_proba = 1 - green_proba
|
@@ -342,19 +342,24 @@ with st.form("choose_model"):
|
|
342 |
|
343 |
score_fmt = f'{score:.1%}'
|
344 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
345 |
results = pd.DataFrame(index=[
|
346 |
'PrevClose',
|
347 |
-
'
|
348 |
-
'Success Rate',
|
349 |
-
f'NumObs {operator} {"" if do_not_play else score_fmt}',
|
350 |
], data = [
|
351 |
-
f"{
|
352 |
-
f
|
353 |
-
f'{historical_proba:.1%}',
|
354 |
-
num_obs,
|
355 |
])
|
356 |
|
357 |
-
results.columns = ['
|
358 |
|
359 |
# st.subheader('New Prediction')
|
360 |
|
@@ -487,12 +492,11 @@ with st.form("choose_model"):
|
|
487 |
f"{len(data.query('Close <= VIX_EM_15_High & Close >= VIX_EM_15_Low')) / len(data):.1%}",
|
488 |
f"{len(data.query('High > VIX_EM_15_High | Low < VIX_EM_15_Low')) / len(data):.1%}"
|
489 |
]
|
490 |
-
st.subheader(f'๐ฎ for {option} on {curr_date}')
|
491 |
-
st.write(results.T)
|
492 |
|
493 |
tab1, tab2, tab3, tab4 = st.tabs(["๐ค Stats", "โจ New Data", "๐ Historical", "๐ Performance"])
|
494 |
|
495 |
with tab1:
|
|
|
496 |
st.write(df_probas)
|
497 |
st.text(f'VIX EM ({curr_em:.2f} / {fwd_em:.2f})')
|
498 |
st.write(df_em)
|
|
|
294 |
|
295 |
seq_proba = seq_predict_proba(new_pred, xgbr, seq2)
|
296 |
|
297 |
+
st.success(f'๐ฎ for {option} on {curr_date} ๐๐ฝ', icon="โ
")
|
298 |
|
299 |
green_proba = seq_proba[0]
|
300 |
red_proba = 1 - green_proba
|
|
|
342 |
|
343 |
score_fmt = f'{score:.1%}'
|
344 |
|
345 |
+
prev_close = data.loc[final_row,'Close']
|
346 |
+
curr_close = data['Close'].iloc[-1]
|
347 |
+
|
348 |
+
confidence, success, nn = st.columns(3)
|
349 |
+
|
350 |
+
confidence.metric('Confidence',value=f'{text_cond} {score:.1%}')
|
351 |
+
success.metric('SuccessRate',value=f'{historical_proba:.1%}')
|
352 |
+
nn.metric(f'N{operator}{"" if do_not_play else score_fmt}',value=num_obs)
|
353 |
+
|
354 |
results = pd.DataFrame(index=[
|
355 |
'PrevClose',
|
356 |
+
'CurrClose'
|
|
|
|
|
357 |
], data = [
|
358 |
+
f"{prev_close:.2f}",
|
359 |
+
f"{curr_close:.2f}"
|
|
|
|
|
360 |
])
|
361 |
|
362 |
+
results.columns = ['']
|
363 |
|
364 |
# st.subheader('New Prediction')
|
365 |
|
|
|
492 |
f"{len(data.query('Close <= VIX_EM_15_High & Close >= VIX_EM_15_Low')) / len(data):.1%}",
|
493 |
f"{len(data.query('High > VIX_EM_15_High | Low < VIX_EM_15_Low')) / len(data):.1%}"
|
494 |
]
|
|
|
|
|
495 |
|
496 |
tab1, tab2, tab3, tab4 = st.tabs(["๐ค Stats", "โจ New Data", "๐ Historical", "๐ Performance"])
|
497 |
|
498 |
with tab1:
|
499 |
+
st.write(results.T)
|
500 |
st.write(df_probas)
|
501 |
st.text(f'VIX EM ({curr_em:.2f} / {fwd_em:.2f})')
|
502 |
st.write(df_em)
|