Skip to content

Chapter 0: QGTM Gold/Silver System at a Glance

Reading time: 8 minutes | Difficulty: Beginner | Prerequisites: None

Pin this page. It is the single-pane overview of the entire system. Come back to it whenever you need to re-orient.


What This System Does

QGTM is an algorithmic trading platform that trades gold and silver instruments exclusively -- physical ETFs, miners, leveraged products, futures, and options -- using 29 purpose-built strategies running simultaneously.

It is not a broad commodity system. No energy, no agriculture, no industrial metals. Every line of code, every data feed, every risk parameter is calibrated for the unique microstructure of precious metals.

Two audiences use this system:

Role Who Primary concern
OpA (Owner) Quant background, makes strategy decisions Is each strategy performing within its decay envelope? Which regimes are active?
OpB (Partner) Smart non-trader, monitors business health Is the system making or losing money today? Are risk limits intact?

The Architecture in One Diagram

 QGTM GOLD/SILVER ENGINE
 ======================================================================

                        DATA SOURCES
     +--------+  +--------+  +--------+  +--------+  +--------+
     | LBMA   |  | COMEX  |  | CFTC   |  | FRED   |  | Alpaca |
     | Fix,   |  | GC/SI  |  | COT    |  | DFII10 |  | Prices |
     | AM/PM  |  | curves |  | weekly |  | DXY    |  | 20 ETFs|
     | spot   |  | OI     |  | specs  |  | VIX    |  | fills  |
     +---+----+  +---+----+  +---+----+  +---+----+  +---+----+
         |            |            |            |            |
         v            v            v            v            v
 .--------------------------------------------------------------------.
 |  FEATURE ENGINE                                                    |
 |  Raw data -> 100+ features: momentum, vol, z-scores, carry,       |
 |  COT positioning, ETF flows, term structure, fix dislocations      |
 '-------------------------------+------------------------------------'
                                 |
                                 v
 .--------------------------------------------------------------------.
 |  29 STRATEGIES (8 categories)                                      |
 |                                                                    |
 |  [A] Macro Regime (5)      [B] Curve & Carry (4)                  |
 |  Real Rate Gold            GC Term Structure                       |
 |  DXY Gold                  SI Term Structure                       |
 |  Breakeven Inflation       Cross Carry                             |
 |  VIX Haven                 Backwardation Stress                    |
 |  Central Bank Gold                                                 |
 |                                                                    |
 |  [C] Cross-Metal Arb (4)   [D] Positioning & Flows (5)            |
 |  Gold/Silver Ratio          COT Precious                           |
 |  Gold/Platinum              Hedging Pressure                       |
 |  Miners vs Metal            ETF Flow PM                            |
 |  Leveraged ETF Decay        COMEX Warehouse                        |
 |                             SGE Withdrawals                        |
 |                                                                    |
 |  [E] Options (4)            [F] Microstructure (4)                 |
 |  Vol Risk Premium           Event Drift PM                         |
 |  Skew Trades                Fix Dislocation                        |
 |  Gamma Scalp                Overnight Gold                         |
 |  Vol Term Structure         Seasonality PM                         |
 |                                                                    |
 |  [G] ML Meta (2)            [H] Tail Hedge (1)                    |
 |  Meta Labeller              Permanent OTM Put Spread               |
 |  Regime Classifier                                                 |
 '-------------------------------+------------------------------------'
                                 |
                                 v
 .--------------------------------------------------------------------.
 |  SIGNAL AGGREGATOR                                                 |
 |  Weight = inverse_vol x skill_score x capacity_headroom            |
 |           x meta_label_confidence                                  |
 |  Output: per-symbol net weight + aggregate confidence              |
 '-------------------------------+------------------------------------'
                                 |
                                 v
 .--------------------------------------------------------------------.
 |  REGIME ALLOCATOR                                                  |
 |  Regime: risk_on | risk_off | inflation | deflation | crisis       |
 |  Optimizer: risk-parity (normal) / min-variance (crisis)           |
 |  Vol target: 12% annualized (10-18% dynamic band)                  |
 '-------------------------------+------------------------------------'
                                 |
                                 v
 .--------------------------------------------------------------------.
 |  COMPLIANCE GATEWAY (4 checks -- every order passes ALL)           |
 |                                                                    |
 |  1. Wash-sale detector (30-day IRS lookback)                       |
 |  2. Reg-T / Pattern Day Trader check                               |
 |  3. Position limits (15% single name, 40% sector, 2x gross)       |
 |  4. Restricted-list filter                                         |
 |                                                                    |
 |  ANY check fails --> order BLOCKED, audit log entry                |
 '-------------------------------+------------------------------------'
                                 |
                                 v
 .--------------------------------------------------------------------.
 |  EXECUTION (Alpaca)                                                |
 |  < 1% ADV -> market order | 1-5% ADV -> VWAP 10 slices            |
 |  > 5% ADV -> TWAP with 10% participation cap                      |
 |  Reconciliation: broker truth every 60 seconds                     |
 '-------------------------------+------------------------------------'
                                 |
                          +------+------+
                          |             |
                          v             v
 .-------------------------.  .-------------------------.
 |  PORTFOLIO TRACKING     |  |  SELF-LEARNING LOOP     |
 |  P&L, drawdown,         |  |  Drift detection (KS)   |
 |  risk metrics 24/7      |  |  Decay monitor           |
 |  Kill switch: 4 tiers   |  |  Auto postmortem         |
 |                         |  |  Retrain -> shadow ->    |
 |  WARN -> THROTTLE ->    |  |  promote pipeline        |
 |  NO_NEW -> FLATTEN      |  |                         |
 '-------------------------'  '-------------------------'

The Gold/Silver Universe

Twenty tradeable instruments across 7 sectors, plus 5 cross-asset signal inputs and 8 FRED macro series:

Sector Symbols Role
Gold ETFs GLD, IAU, SGOL, AAAU, OUNZ Core gold exposure (physical-backed)
Silver ETFs SLV, SIVR Core silver exposure
Cross-Precious GLTR, PPLT, PALL Basket, platinum, palladium
Gold Miners GDX, GDXJ, NUGT, RING, GOAU Leveraged equity exposure to gold price
Silver Miners SIL, SILJ, SLVP Leveraged equity exposure to silver price
Leveraged UGL, AGQ 2x gold/silver (path-dependent, tactical only)
Cross-Asset Inputs UUP, TIP, IEF, IBIT, CPER Signal-only: dollar, rates, bitcoin, copper

FRED macro feeds: DFII10 (real yields), DGS10 (nominal 10Y), DTWEXBGS (trade-weighted dollar), T10YIE (breakeven inflation), EFFR (fed funds), VIXCLS (VIX), M2SL (money supply), WALCL (Fed balance sheet).

Liquidity tiers: - Tier 1 (>5M ADV, full sizing): GLD, IAU, SLV, GDX, GDXJ, NUGT, IEF, IBIT - Tier 2 (500K-5M ADV, reduced sizing): SGOL, SIVR, SIL, UUP, TIP, CPER, AGQ, NUGT - Tier 3 (<500K ADV, signal-only): AAAU, OUNZ, GLTR, PPLT, PALL, RING, GOAU, SILJ, SLVP, UGL


Data Flow: Source to Signal to Order

  LBMA AM/PM Fix -------+
  COMEX GC/SI curves ----+---> Feature Engine ---> 29 Strategies
  CFTC COT (Fri) --------+         |                    |
  FRED DFII10/DXY/VIX ---+         |              Signal Aggregator
  Alpaca live prices -----+         |                    |
  ETF flow data ----------+         |              Regime Allocator
  SGE withdrawal data ----+         |                    |
                                    |              Compliance Gateway
                                    |                    |
                                    |              Execution (Alpaca)
                                    |                    |
                                    +--- TCA <-----------+
                                    |
                                    +--- Self-Learning Loop

Timing: - 6:00 AM ET: Overnight data fetch (FRED, COT, ETF flows) - 9:00 AM ET: Feature calculation from overnight data - 9:30 AM ET: Market open, live price streaming begins - 3:30 PM ET: Daily rebalance -- all 29 strategies generate signals - 3:45 PM ET: Orders sent through compliance gateway to Alpaca - 4:00 PM ET: Market close, final reconciliation - 4:30 PM ET: TCA report, self-learning drift checks - 10:00 PM ET: Nightly retrain cycle (if triggered by decay monitor)


Reading the Dashboard in 30 Seconds (OpB)

When you open the dashboard, look at these five things in this order:

What to check Where Good Bad
Today's P&L Top banner Green or small red Red and > -1%
Kill switch status Top right Green "NORMAL" Yellow/Red any tier
Drawdown from peak Risk panel < 8% > 12% (approaching 15% hard limit)
Active strategies Strategy grid 20+ green < 15 active
Reconciliation Bottom bar "Synced" + timestamp < 2 min ago "STALE" or > 5 min

If all five are normal, the system is healthy. If the kill switch is anything other than green NORMAL, check the audit log for why.


Making a Decision in 5 Minutes (OpA)

Daily check (2 minutes): 1. Open strategy grid. Scan for any strategy where rolling 21-day Sharpe is below 0.3 (amber) or negative (red). 2. Check regime classifier output. If regime changed overnight (e.g., risk_on to risk_off), verify the allocator shifted weights accordingly. 3. Glance at decay monitor. Any strategy flagged "WARN" (6-month Sharpe < 60% of in-sample) needs a root-cause note within 48 hours.

Weekly review (3 minutes): 4. Open self-learning panel. Check if any retrain jobs ran overnight. Review shadow vs. production comparison for any model that was retrained. 5. Check the gold/silver ratio. If it moved more than 5 standard deviations in the week, the cross-metal arb strategies should be the largest contributors to P&L.

Decision triggers that require manual action: - Decay monitor promotes a strategy to "QUARANTINE" (24-month Sharpe < 30% of in-sample) -- you must decide: retrain, restructure, or decommission. - Self-learning loop flags a regime not seen in training data -- allocator defaults to min-variance, but you may want to override. - Kill switch fired at FLATTEN tier -- system requires manual restart after review.


Key Numbers at a Glance

 +====================================================================+
 |  QGTM GOLD/SILVER SYSTEM                                          |
 +====================================================================+
 |  Universe:          20 PM instruments + 5 cross-asset inputs       |
 |  Strategies:        29 (22 active, 5 shadow, 2 meta-models)       |
 |  Categories:        8 (macro, carry, arb, flows, options,          |
 |                        microstructure, ML meta, tail hedge)        |
 |  Vol target:        12% annualized (10-18% dynamic band)           |
 |  Max single name:   15% of NAV                                     |
 |  Max sector:        40% of NAV                                     |
 |  Max gross leverage: 2.0x                                          |
 |  Kill switch:       -3% daily | -5% weekly | -15% peak drawdown   |
 |  Rebalance:         3:30 PM ET daily                               |
 |  Reconciliation:    Every 60 seconds vs Alpaca                     |
 |  Heartbeat:         Every 30 seconds (dead-man switch at 120s)     |
 |  Broker:            Alpaca (FINRA/SEC regulated, SIPC insured)     |
 |  FRED series:       8 macro inputs (DFII10, DGS10, DXY, VIX, ...) |
 |  Kelly fraction:    Half-Kelly (0.5x optimal)                      |
 |  Backtest window:   2-year train, 1-quarter test, 1-month embargo  |
 |  Decay threshold:   Sharpe < 50% of in-sample -> retrain triggered |
 +====================================================================+

Chapter Map

Chapter Title What you will learn
0 You are here System overview
1 Precious Metals Primer Why gold/silver, key drivers, physical markets
2 PM Vehicles GLD vs IAU, miners, leveraged, futures vs ETFs
3 Our PM Universe The 20 instruments, sectors, liquidity tiers
4 How Algo Trading Works Full pipeline with worked PM example
5 Strategies Explained All 29 strategies by category
6 Risk Management Kill switch, compliance, drawdown controls
7 Data Sources LBMA, COMEX, CFTC, FRED, Alpaca feeds
8 Tech Stack Python, TypeScript, Cloudflare, architecture
9 Running the Platform git clone to live trading in 10 steps
10 The Signals Business Subscription tiers, pricing, delivery
11 Glossary 80+ terms organized by domain

Next: Chapter 1: Precious Metals Primer -- why gold and silver, not 42 random commodities.