Spaces:
Sleeping
Sleeping
fix ohlc issues
Browse files- app.py +17 -1
- model_1h.py +2 -2
- model_90m.py +2 -2
app.py
CHANGED
@@ -222,11 +222,15 @@ with st.form("choose_model"):
|
|
222 |
return df.to_csv()
|
223 |
|
224 |
csv = convert_df(perf_daily)
|
|
|
|
|
225 |
|
226 |
with tab1:
|
227 |
-
st.subheader(f'Pred for {curr_date} as of
|
228 |
st.write(results)
|
229 |
st.write(df_probas)
|
|
|
|
|
230 |
with tab2:
|
231 |
st.subheader('Latest Data for Pred')
|
232 |
st.write(new_pred)
|
@@ -445,10 +449,14 @@ with st.form("choose_model"):
|
|
445 |
|
446 |
csv = convert_df(perf_daily)
|
447 |
|
|
|
|
|
448 |
with tab1:
|
449 |
st.subheader(f'Pred for {curr_date} as of 7AM PST')
|
450 |
st.write(results)
|
451 |
st.write(df_probas)
|
|
|
|
|
452 |
with tab2:
|
453 |
st.subheader('Latest Data for Pred')
|
454 |
st.write(new_pred)
|
@@ -665,11 +673,15 @@ with st.form("choose_model"):
|
|
665 |
return df.to_csv()
|
666 |
|
667 |
csv = convert_df(perf_daily)
|
|
|
|
|
668 |
|
669 |
with tab1:
|
670 |
st.subheader(f'Pred for {curr_date} as of 7:30AM PST')
|
671 |
st.write(results)
|
672 |
st.write(df_probas)
|
|
|
|
|
673 |
with tab2:
|
674 |
st.subheader('Latest Data for Pred')
|
675 |
st.write(new_pred)
|
@@ -886,11 +898,15 @@ with st.form("choose_model"):
|
|
886 |
return df.to_csv()
|
887 |
|
888 |
csv = convert_df(perf_daily)
|
|
|
|
|
889 |
|
890 |
with tab1:
|
891 |
st.subheader(f'Pred for {curr_date} as of 8AM PST')
|
892 |
st.write(results)
|
893 |
st.write(df_probas)
|
|
|
|
|
894 |
with tab2:
|
895 |
st.subheader('Latest Data for Pred')
|
896 |
st.write(new_pred)
|
|
|
222 |
return df.to_csv()
|
223 |
|
224 |
csv = convert_df(perf_daily)
|
225 |
+
|
226 |
+
check = data.tail(1)
|
227 |
|
228 |
with tab1:
|
229 |
+
st.subheader(f'Pred for {curr_date} as of 7AM PST')
|
230 |
st.write(results)
|
231 |
st.write(df_probas)
|
232 |
+
st.text('For checking only ππ½')
|
233 |
+
st.write(check)
|
234 |
with tab2:
|
235 |
st.subheader('Latest Data for Pred')
|
236 |
st.write(new_pred)
|
|
|
449 |
|
450 |
csv = convert_df(perf_daily)
|
451 |
|
452 |
+
check = data.tail(1)
|
453 |
+
|
454 |
with tab1:
|
455 |
st.subheader(f'Pred for {curr_date} as of 7AM PST')
|
456 |
st.write(results)
|
457 |
st.write(df_probas)
|
458 |
+
st.text('For checking only ππ½')
|
459 |
+
st.write(check)
|
460 |
with tab2:
|
461 |
st.subheader('Latest Data for Pred')
|
462 |
st.write(new_pred)
|
|
|
673 |
return df.to_csv()
|
674 |
|
675 |
csv = convert_df(perf_daily)
|
676 |
+
|
677 |
+
check = data.tail(1)
|
678 |
|
679 |
with tab1:
|
680 |
st.subheader(f'Pred for {curr_date} as of 7:30AM PST')
|
681 |
st.write(results)
|
682 |
st.write(df_probas)
|
683 |
+
st.text('For checking only ππ½')
|
684 |
+
st.write(check)
|
685 |
with tab2:
|
686 |
st.subheader('Latest Data for Pred')
|
687 |
st.write(new_pred)
|
|
|
898 |
return df.to_csv()
|
899 |
|
900 |
csv = convert_df(perf_daily)
|
901 |
+
|
902 |
+
check = data.tail(1)
|
903 |
|
904 |
with tab1:
|
905 |
st.subheader(f'Pred for {curr_date} as of 8AM PST')
|
906 |
st.write(results)
|
907 |
st.write(df_probas)
|
908 |
+
st.text('For checking only ππ½')
|
909 |
+
st.write(check)
|
910 |
with tab2:
|
911 |
st.subheader('Latest Data for Pred')
|
912 |
st.write(new_pred)
|
model_1h.py
CHANGED
@@ -248,15 +248,15 @@ def get_data():
|
|
248 |
df_30m = df_30m[['Open','High','Low','Close']]
|
249 |
|
250 |
opens_1h = df_30m.groupby('Datetime')['Open'].head(1)
|
251 |
-
closes_1h = df_30m.groupby('Datetime')['Close'].tail(1)
|
252 |
highs_1h = df_30m.groupby('Datetime')['High'].max()
|
253 |
lows_1h = df_30m.groupby('Datetime')['Low'].min()
|
|
|
254 |
|
255 |
df_1h = pd.DataFrame(index=df_30m.index.unique())
|
256 |
df_1h['Open'] = opens_1h
|
257 |
-
df_1h['Close'] = closes_1h
|
258 |
df_1h['High'] = highs_1h
|
259 |
df_1h['Low'] = lows_1h
|
|
|
260 |
|
261 |
df_1h.columns = ['Open30','High30','Low30','Close30']
|
262 |
|
|
|
248 |
df_30m = df_30m[['Open','High','Low','Close']]
|
249 |
|
250 |
opens_1h = df_30m.groupby('Datetime')['Open'].head(1)
|
|
|
251 |
highs_1h = df_30m.groupby('Datetime')['High'].max()
|
252 |
lows_1h = df_30m.groupby('Datetime')['Low'].min()
|
253 |
+
closes_1h = df_30m.groupby('Datetime')['Close'].tail(1)
|
254 |
|
255 |
df_1h = pd.DataFrame(index=df_30m.index.unique())
|
256 |
df_1h['Open'] = opens_1h
|
|
|
257 |
df_1h['High'] = highs_1h
|
258 |
df_1h['Low'] = lows_1h
|
259 |
+
df_1h['Close'] = closes_1h
|
260 |
|
261 |
df_1h.columns = ['Open30','High30','Low30','Close30']
|
262 |
|
model_90m.py
CHANGED
@@ -248,15 +248,15 @@ def get_data():
|
|
248 |
df_30m = df_30m[['Open','High','Low','Close']]
|
249 |
|
250 |
opens_1h = df_30m.groupby('Datetime')['Open'].head(1)
|
251 |
-
closes_1h = df_30m.groupby('Datetime')['Close'].tail(1)
|
252 |
highs_1h = df_30m.groupby('Datetime')['High'].max()
|
253 |
lows_1h = df_30m.groupby('Datetime')['Low'].min()
|
|
|
254 |
|
255 |
df_1h = pd.DataFrame(index=df_30m.index.unique())
|
256 |
df_1h['Open'] = opens_1h
|
257 |
-
df_1h['Close'] = closes_1h
|
258 |
df_1h['High'] = highs_1h
|
259 |
df_1h['Low'] = lows_1h
|
|
|
260 |
|
261 |
df_1h.columns = ['Open30','High30','Low30','Close30']
|
262 |
|
|
|
248 |
df_30m = df_30m[['Open','High','Low','Close']]
|
249 |
|
250 |
opens_1h = df_30m.groupby('Datetime')['Open'].head(1)
|
|
|
251 |
highs_1h = df_30m.groupby('Datetime')['High'].max()
|
252 |
lows_1h = df_30m.groupby('Datetime')['Low'].min()
|
253 |
+
closes_1h = df_30m.groupby('Datetime')['Close'].tail(1)
|
254 |
|
255 |
df_1h = pd.DataFrame(index=df_30m.index.unique())
|
256 |
df_1h['Open'] = opens_1h
|
|
|
257 |
df_1h['High'] = highs_1h
|
258 |
df_1h['Low'] = lows_1h
|
259 |
+
df_1h['Close'] = closes_1h
|
260 |
|
261 |
df_1h.columns = ['Open30','High30','Low30','Close30']
|
262 |
|