gate-track-record-until-close
Browse files- __pycache__/__init__.cpython-311.pyc +0 -0
- __pycache__/app.cpython-311.pyc +0 -0
- __pycache__/kotak_neo.cpython-311.pyc +0 -0
- nifty_backend/__pycache__/__init__.cpython-311.pyc +0 -0
- nifty_backend/__pycache__/runtime.cpython-311.pyc +3 -0
- nifty_backend/__pycache__/yahoo_history_client.cpython-311.pyc +0 -0
- nifty_backend/runtime.py +2 -6
- scripts/__pycache__/refresh_daily_data.cpython-311.pyc +0 -0
- scripts/__pycache__/refresh_first5_prediction.cpython-311.pyc +0 -0
- scripts/__pycache__/retrain_opening_model.cpython-311.pyc +0 -0
- scripts/__pycache__/run_ist_scheduler.cpython-311.pyc +0 -0
__pycache__/__init__.cpython-311.pyc
ADDED
|
Binary file (211 Bytes). View file
|
|
|
__pycache__/app.cpython-311.pyc
ADDED
|
Binary file (31 kB). View file
|
|
|
__pycache__/kotak_neo.cpython-311.pyc
ADDED
|
Binary file (74.3 kB). View file
|
|
|
nifty_backend/__pycache__/__init__.cpython-311.pyc
ADDED
|
Binary file (257 Bytes). View file
|
|
|
nifty_backend/__pycache__/runtime.cpython-311.pyc
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:15d55e363fc7f252b4827535702a967f81d0465b7649ef75739a960d176d2169
|
| 3 |
+
size 117741
|
nifty_backend/__pycache__/yahoo_history_client.cpython-311.pyc
ADDED
|
Binary file (27.8 kB). View file
|
|
|
nifty_backend/runtime.py
CHANGED
|
@@ -1122,6 +1122,8 @@ def build_prediction_track_record(
|
|
| 1122 |
& daily_rows["close"].map(lambda value: np.isfinite(float(value)) if pd.notna(value) else False)
|
| 1123 |
].copy()
|
| 1124 |
daily_rows = daily_rows[daily_rows["open"].astype(float) != 0]
|
|
|
|
|
|
|
| 1125 |
if daily_rows.empty:
|
| 1126 |
return []
|
| 1127 |
|
|
@@ -1142,19 +1144,13 @@ def build_prediction_track_record(
|
|
| 1142 |
**(meta or {}),
|
| 1143 |
}
|
| 1144 |
|
| 1145 |
-
for _, row in t5_test.iterrows():
|
| 1146 |
-
add_prediction(row.get("date"), row.get("prediction"), "T+5", 30, {"prob_up": row.get("prob_up")})
|
| 1147 |
for _, row in tomorrow_test.iterrows():
|
| 1148 |
pred = row.get("prediction")
|
| 1149 |
if pd.isna(pred) and "pred" in row:
|
| 1150 |
pred = "UP" if int(row.get("pred")) == 1 else "DOWN"
|
| 1151 |
add_prediction(row.get("target_date") or row.get("date"), pred, "Tomorrow", 20, {"prob_up": row.get("prob_up")})
|
| 1152 |
-
for _, row in tplus1_test.iterrows():
|
| 1153 |
-
add_prediction(row.get("target_date") or row.get("date"), row.get("prediction"), "T+1", 10, {"prob_up": row.get("prob_up")})
|
| 1154 |
|
| 1155 |
add_prediction(tomorrow_latest.get("target_date"), tomorrow_latest.get("prediction"), "Tomorrow", 40, {"prob_up": tomorrow_latest.get("prob_up")})
|
| 1156 |
-
add_prediction(tplus1_latest.get("target_date"), tplus1_latest.get("prediction"), "T+1", 35, {"prob_up": tplus1_latest.get("prob_up")})
|
| 1157 |
-
add_prediction(t5_latest.get("input_date"), t5_latest.get("prediction"), "T+5", 45, {"prob_up": t5_latest.get("prob_up")})
|
| 1158 |
|
| 1159 |
records: list[dict[str, Any]] = []
|
| 1160 |
for _, row in daily_rows.tail(20).iterrows():
|
|
|
|
| 1122 |
& daily_rows["close"].map(lambda value: np.isfinite(float(value)) if pd.notna(value) else False)
|
| 1123 |
].copy()
|
| 1124 |
daily_rows = daily_rows[daily_rows["open"].astype(float) != 0]
|
| 1125 |
+
completed_day = expected_completed_daily_date()
|
| 1126 |
+
daily_rows = daily_rows[daily_rows["date"].dt.date <= completed_day]
|
| 1127 |
if daily_rows.empty:
|
| 1128 |
return []
|
| 1129 |
|
|
|
|
| 1144 |
**(meta or {}),
|
| 1145 |
}
|
| 1146 |
|
|
|
|
|
|
|
| 1147 |
for _, row in tomorrow_test.iterrows():
|
| 1148 |
pred = row.get("prediction")
|
| 1149 |
if pd.isna(pred) and "pred" in row:
|
| 1150 |
pred = "UP" if int(row.get("pred")) == 1 else "DOWN"
|
| 1151 |
add_prediction(row.get("target_date") or row.get("date"), pred, "Tomorrow", 20, {"prob_up": row.get("prob_up")})
|
|
|
|
|
|
|
| 1152 |
|
| 1153 |
add_prediction(tomorrow_latest.get("target_date"), tomorrow_latest.get("prediction"), "Tomorrow", 40, {"prob_up": tomorrow_latest.get("prob_up")})
|
|
|
|
|
|
|
| 1154 |
|
| 1155 |
records: list[dict[str, Any]] = []
|
| 1156 |
for _, row in daily_rows.tail(20).iterrows():
|
scripts/__pycache__/refresh_daily_data.cpython-311.pyc
ADDED
|
Binary file (937 Bytes). View file
|
|
|
scripts/__pycache__/refresh_first5_prediction.cpython-311.pyc
ADDED
|
Binary file (1.84 kB). View file
|
|
|
scripts/__pycache__/retrain_opening_model.cpython-311.pyc
ADDED
|
Binary file (11.2 kB). View file
|
|
|
scripts/__pycache__/run_ist_scheduler.cpython-311.pyc
ADDED
|
Binary file (5.79 kB). View file
|
|
|