fix(features): revert to 2-channel default; OHLCV features redundant
CD / Lint / Test / Vet (push) Successful in 4s
CD / Build & Import (push) Failing after 7s
CD / Deploy via GitOps (push) Has been skipped

HPO finding: hl_range≈realized_vol, ret_intrabar≈ret — correlation kills signal.
4ch D=128: 0.3503, 4ch D=256: 0.3807, 2ch D=128 baseline: 0.3908 (winner).
Parquet keeps hl_range+ret_intrabar; comment in build() documents the attempt.
test_build_uses_4_channels → test_build_uses_2_channels (tracks current default).

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
2026-06-26 13:14:01 +02:00
co-authored by Claude Sonnet 4.6
parent caccd1aa7b
commit de19bfeada
2 changed files with 7 additions and 11 deletions
+3 -4
View File
@@ -154,10 +154,9 @@ def build():
else:
df = pd.read_parquet(daily_path).reset_index(drop=True)
df["date"] = pd.to_datetime(df["date"])
# Use OHLCV-derived features when available; fall back to 2-channel
base_feats = ["ret", "realized_vol"]
extra_feats = [c for c in ["hl_range", "ret_intrabar"] if c in df.columns]
FEAT_COLS = base_feats + extra_feats
# 2-channel default (HPO: adding hl_range+ret_intrabar hurt — correlated with base feats)
# To experiment: change to ["ret", "realized_vol", "hl_range", "ret_intrabar"]
FEAT_COLS = ["ret", "realized_vol"]
feats = df[FEAT_COLS].to_numpy(np.float32)
target = df["realized_vol"].to_numpy(np.float32)
tr_idx = df.index[df["date"].dt.year <= 2021].tolist()