test(quant): add strict regression assertion ensuring all real market history dates are in dates_utc

This commit is contained in:
Hermes Agent committed 2026-12-02 13:36:30 +00:00
1 parent d20e76a000
commit 24d66f706e
2 files changed
+11 -1

No files matched your search

+10
View File
@@ -319,6 +319,16 @@ def test_ipld_quant_and_mcp_server() -> None:
assert all(re.match(r"^\d{4}-\d{2}-\d{2}$", d) for d in ts_full["dates_utc"])
assert len(ts_full["instruments"]) == 24
# Strict regression check: Ensure all dates present in real market history are fully covered in dates_utc
from hyperstitionstud_io.quant.timeseries import _load_real_market_history_bars
cfg_test = load_workspace_config()
real_hist_test = _load_real_market_history_bars(cfg_test)
history_dates = set()
for sym_obj in real_hist_test.values():
history_dates.update(sym_obj.keys())
for d in history_dates:
assert d in ts_full["dates_utc"], f"Regression: Real history date {d} missing from timeseries dates_utc!"
anthr_ts = next(x for x in ts_full["instruments"] if x["symbol"] == "ANTHR-PVT")
assert anthr_ts["data_available"] is False
assert anthr_ts["available_trading_days"] == 0