Skip to content

feat(gold): argon computes the gold factor model (IB via xenon) - #550

Merged
moremeds merged 1 commit into
mainfrom
feat/gold-factor-engine
Oct 11, 2026
Merged

moremeds merged 1 commit into
mainfrom
feat/gold-factor-engine

Conversation

@moremeds

Copy link
Copy Markdown
Owner

What

argon now computes the signal-lab gold factor model itself and shows it on the Gold tab. The model is a rolling 252-day fit of gold's daily move (XAUUSD) on the 10-year real yield (DFII10), a synthetic ICE dollar index and a safe-haven spread, with coefficients lagged two rows. Each day's move is split into real-yield, dollar, safe-haven, last-year's-pace and unexplained parts. Every research panel carries this label: Historical description, not a forecast · the direction test (Phase 3) failed.

  • Engine macro/gold_factor.py → gold_factor_daily (migration 162, idempotent DDL, no DML).
  • Job gold_factor_compute, 17:40 ET Mon–Fri on massive-0, after gold_fred_ingest. It fetches the last month of IB 1-day MIDPOINT closes (6 FX pairs + CMDTY XAUUSD) through xenon POST /historical/bars into macro_series_daily (source IB), then recomputes and upserts. It is healer-enrolled (gold_factor). Needs xenon ≥ v0.8.2, which is live on the mini (verified CASH 200 / CMDTY 200 / unknown 404 with argon's key).
  • GET /api/gold/factor, plus the "What moved gold" band of six charts on the Gold tab.
  • statsmodels is now declared. It was already installed through arch.

Evidence

  • docs/research/2026-10-10-gold-factor-parity.json (scripts/research/gold_factor_parity.py --study <signal-lab worktree @ 2408775> --xenon <bars dir>):
  • The seed ran end-to-end against IB through a temporary xenon feat(stock): per-stock Short-Vol card on Market Structure tab #174 server into option_wizard_local: 28/28 calls OK, 4080 rows, identical to the CSV-seeded output on the 4079 shared dates.
  • Local: CI lint gates; unit 3176 passed; integration 1887 passed, 9 skipped; vitest, typecheck and eslint green.

After merge + release

  1. Run the seed on the mini (a prod write): scripts/backfill/gold_factor_seed.py. Without it the job refuses to run (fewer than 254 rows) and names the seed.
  2. Confirm the first 17:40 ET run is green.

🤖 Generated with Claude Code

Port of the signal-lab gold study: a rolling 252-day fit of gold's daily
move (XAUUSD) on the 10-year real yield, a synthetic dollar index and a
safe-haven spread, coefficients lagged two rows, with 95% intervals, the
63-day explained share and its label, and each day split into real-yield,
dollar, safe-haven, last-year's-pace and unexplained parts. A historical
description, not a forecast: the study's direction test failed.

- engine macro/gold_factor.py; table gold_factor_daily (migration 162)
- job gold_factor_compute (17:40 ET Mon-Fri, massive-0): IB 1-day MIDPOINT
  closes through xenon POST /historical/bars (xenon v0.8.2), then a full
  recompute + upsert; healer-enrolled
- GET /api/gold/factor; Gold tab "What moved gold" band
- seed scripts/backfill/gold_factor_seed.py (xenon, overlapping 6 Y windows)
- parity scripts/research/gold_factor_parity.py: exact on the study's IB
  closes and on xenon's (4079 rows, diff 0, 0 label mismatches)
- statsmodels declared (already installed via arch)
@moremeds
moremeds merged commit 7aac6de into main Oct 11, 2026
7 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant