fix: read the data feed through the Tradier wrapper — live volume was 80-160x
With BROKER=tradier the loop's `client` is a TradierClient that delegates market data to the Alpaca client in `data_client`. Two places read the feed as getattr(client.settings, "feed", "iex"). TradierSettings has no feed, so both read "iex" even though the container runs ALPACA_DATA_FEED=sip (verified in the running loop and in config_overrides): - step_vratio kept computing IEX->SIP ratios as if on the free feed - ingest_live_minute_bars multiplied the real SIP volume by those ratios Checked against the paper stack's SIP bars for the same minutes: prices are identical and unscaled volume matches 1.00x, but scaled rows run x83 (GLND), x117-126 (GRML) and x163 (SKYQ). The 2026-09-25 GRML signal logged a cum_volume of 1.39 billion shares and an rvol of 64.6. For any name with a ratio, every volume gate — rvol, the 300k day-volume floor, min dollar volume, the 2.5%-of-volume liquidity cap, and the gap x rvol ranking — has been reading inflated numbers since the stack went live on 2026-07-31. data_feed() reads through data_client when present. The regression test wraps a SIP client in a TradierClient and fails without the fix. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
1 parent
e2e9687c45
commit
7f1ebe9cab
3 files changed
+30
-2
No files matched your search
+2
-1
@@ -44,6 +44,7 @@ from api.main import DashboardState, serve_in_background
|
||||
from research.ingestion.market_data import (
|
||||
IngestionResult,
|
||||
classify_session,
|
||||
data_feed,
|
||||
discover_active_symbols,
|
||||
ingest_daily_history,
|
||||
ingest_live_minute_bars,
|
||||
@@ -706,7 +707,7 @@ def main(argv: list[str] | None = None) -> int:
|
||||
(ingest_live_minute_bars refuses too; this just saves the API calls)."""
|
||||
if not client:
|
||||
return "skipped (no keys)"
|
||||
if getattr(client.settings, "feed", "iex") != "iex":
|
||||
if data_feed(client) != "iex":
|
||||
return "off (live feed is SIP)"
|
||||
from research.ingestion.volume_ratio import compute_ratios, persist_ratios
|
||||
fresh = compute_ratios(client, list(symbols))
|
||||
|
||||
Reference in new issue
Block a user