start experiment 60 (exp/60-scheduled-algo-retrain-on-2026-08-21-tac)

This commit is contained in:
zhaoli
2026-08-24 12:01:27 +00:00
parent 7460d5fe01
commit 891bd0743d
14 changed files with 1500 additions and 21 deletions
+8 -3
View File
@@ -61,6 +61,11 @@ UNKNOWN_FIELD_NAMES = ("factor", "change", "trade_unit", "suspend_flag")
#: columns in the parquet files that are not features
NON_FEATURE_COLUMNS = ("t", "date", "market", "timeframe", "symbol")
#: Feature-family partitions merged by ``LakeConfig.load_features`` and scanned
#: by the handler's field discovery. ``macro`` holds broadcast market-state
#: columns (see skills/tac-qlib-custom/examples/persist_macro_broadcast.py).
FEATURE_FAMILIES = ("ta", "sp", "macro")
def timeframe_for_freq(freq: str) -> str:
"""Map a qlib frequency (e.g. ``day``, ``1min``) to a lake timeframe (e.g. ``1d``)."""
@@ -113,12 +118,12 @@ class LakeConfig:
return self.features_dir(timeframe) / f"symbol={str(symbol).upper()}.parquet"
def load_features(self, timeframe: str, symbol: str) -> pd.DataFrame:
"""All feature columns for a symbol, merging the `family=ta` and
`family=sp` partitions by timestamp. Returns an empty frame when no
"""All feature columns for a symbol, merging the `family=ta|sp|macro`
partitions by timestamp. Returns an empty frame when no
feature files exist (legacy flat layout falls back transparently)."""
sym = str(symbol).upper()
frames = []
for family in ("ta", "sp"):
for family in FEATURE_FAMILIES:
p = self.features_dir(timeframe) / f"family={family}" / f"symbol={sym}.parquet"
if p.exists():
frames.append(pd.read_parquet(p))