@devries-cameron20 / open-alice / commits / 82d6aa7
Fork 0

Alice — an open-source AI trading bot covering equities, crypto, commodities, forex, and macro

Refactor data filtering and return in data.py

Cameron “Camo” De Vries committed Nov 6, 2026 at 03:27 UTC 82d6aa7afe26f2cb9d05f7a0e880e168dd7daa0b
1 file changed +2 -1
src/open_alice/data.py
+2 -1
@@ -46,7 +46,8 @@ def clean_ohlcv(df: pd.DataFrame) -> pd.DataFrame:
46 return df
47 values = df[cols].to_numpy(dtype=float, na_value=np.nan)
48 finite_mask = np.isfinite(values).all(axis=1)
49 - return df[finite_mask]
49 + result: pd.DataFrame = df[finite_mask]
50 + return result
51
52
53 def add_returns(df: pd.DataFrame) -> pd.DataFrame: