Chapter 6: PM Risk Management
The most important chapter in this tutorial. Making money is secondary to not losing it. Every hedge fund blowup -- LTCM, Amaranth, the Hunt brothers -- shares one root cause: inadequate risk management. Our system is built to survive first and profit second.
The 8-Factor PM Risk Model
Our portfolio risk is decomposed into 8 orthogonal factors. Every position, every strategy, every trade is measured against these factors. If any single factor exposure exceeds its limit, the risk manager blocks new trades that would increase it.
THE 8 RISK FACTORS
====================================================================
FACTOR PROXY LIMIT WHY IT MATTERS
────────────── ──────────────────── ───────── ──────────────────────────
1. Real Rate DFII10 (10Y TIPS) 40% of Gold's #1 driver. A 50bp
total risk move in real rates can
move gold 5-8%.
2. DXY US Dollar Index 30% of Inverse correlation to
total risk all precious metals.
3. Gold Vol GVZ (Gold VIX) 25% of Regime shifts in gold
total risk volatility change all
strategy payoffs.
4. Silver Vol SLV 30d realized vol 20% of Silver is 1.5x the vol
total risk of gold. Sizing matters.
5. Curve GC term structure slope 15% of Carry strategies are
total risk exposed to curve shifts.
6. Equity SPY beta of portfolio 15% of Gold-equity correlation
total risk spikes in crises.
7. Industrial Copper/Gold ratio 10% of Silver's industrial
total risk component. Recession
risk proxy.
8. Crypto BTC 30d correlation 10% of Gold-BTC correlation
total risk has risen since 2020.
New risk to manage.
====================================================================
NOTE: Limits are on MARGINAL CONTRIBUTION to total portfolio risk,
not on raw exposure. A 10% gold position contributes different risk
in a low-vol regime vs. a crisis regime.
How Factor Risk Is Calculated
For each position i in the portfolio:
factor_exposure_i = position_weight_i * beta_i_to_factor
Total factor exposure = SUM(factor_exposure_i) for all positions
Factor contribution to portfolio variance:
FC_j = factor_exposure_j * factor_volatility_j * correlation_j_portfolio
Risk budget check:
IF FC_j / total_portfolio_variance > factor_limit_j:
BLOCK new trades that increase factor j exposure
Stress Scenarios: Learning from History
We test every strategy and the combined portfolio against four specific precious metals crises. A strategy that blows up in any of these does not trade live.
Stress Test 1: Hunt Brothers Silver Squeeze (1980)
What happened: Nelson Bunker Hunt and Herbert Hunt accumulated roughly one-third of the world's privately held silver, driving prices from $6 to $50/oz in 6 months. The COMEX changed margin rules mid-crisis ("Silver Rule 7"), allowing only liquidation orders. Silver crashed 80% in 4 days.
HUNT BROTHERS TIMELINE:
+------------------+----------+-------------------------------------------+
| Date | Silver | Event |
+------------------+----------+-------------------------------------------+
| Jan 1979 | $6.00 | Hunts begin accumulating |
| Sep 1979 | $16.00 | Accelerating buying |
| Jan 18, 1980 | $50.35 | All-time high |
| Jan 21, 1980 | $34.00 | COMEX implements position limits |
| Mar 25, 1980 | $21.00 | "Silver Thursday" margin calls |
| Mar 27, 1980 | $10.80 | -48% in 2 days. Hunts default. |
+------------------+----------+-------------------------------------------+
OUR SYSTEM'S SIMULATED RESPONSE:
- Vol targeting would have cut silver positions 70%+ as vol spiked
- Gold/silver ratio strategy would have gone LONG gold / SHORT silver
as ratio collapsed from 40 to 15 (unprecedented)
- Kill switch fires on the first -15% day
- Max portfolio loss in simulation: -6.8%
Lesson: Position limits and exchange rule changes are risks that no model can predict. Our defense: never have more than 15% in silver instruments combined, and the kill switch fires mechanically.
Stress Test 2: Gold Crash of April 2013
What happened: Gold fell from $1,560 to $1,320 in two trading days (-15.4%). The trigger: rumours that Cyprus would sell its gold reserves, combined with a Goldman Sachs sell recommendation. It was the largest 2-day gold decline in 30 years.
GOLD CRASH 2013:
+------------------+----------+-------------------------------------------+
| Date | Gold | Event |
+------------------+----------+-------------------------------------------+
| Apr 11 | $1,560 | Cyprus selloff rumors |
| Apr 12 | $1,480 | -5.1% (Goldman recommends short) |
| Apr 15 | $1,360 | -8.1% (stop-loss cascade) |
| Apr 16 | $1,320 | Exhaustion low (-15.4% from Thursday) |
| Jun 28 | $1,192 | Final low for the move |
+------------------+----------+-------------------------------------------+
OUR SYSTEM'S SIMULATED RESPONSE:
- Macro strategies already had reduced gold (real rates rising in 2013)
- Vol targeting halves positions on Day 1 as vol doubles
- Kill switch fires midday Day 2 at -8% portfolio drawdown
- Tail hedge (SPY puts) partially offsets as equities dip
- Max portfolio loss in simulation: -7.2%
Stress Test 3: COVID March 2020
What happened: Gold initially rallied as a safe haven, then crashed 12% in a week as funds liquidated everything to meet margin calls. Silver fell 35% in 2 weeks. Then both rallied to new highs by August.
COVID 2020 PRECIOUS METALS:
+------------------+----------+----------+-------------------------------+
| Date | Gold | Silver | Event |
+------------------+----------+----------+-------------------------------+
| Feb 24 | $1,660 | $18.30 | First major equity selloff |
| Mar 9 | $1,670 | $16.90 | Gold holds, silver cracks |
| Mar 16 | $1,520 | $12.50 | Liquidation. Everything sells. |
| Mar 19 | $1,480 | $11.80 | Margin call nadir |
| Apr 14 | $1,770 | $15.50 | Fed QE. Recovery begins. |
| Aug 7 | $2,070 | $28.30 | New all-time highs |
+------------------+----------+----------+-------------------------------+
OUR SYSTEM'S SIMULATED RESPONSE:
- VIX Haven strategy fires early (VIX > 40 by Mar 9)
- Vol targeting cuts all positions 60% by Mar 12
- Gold/silver ratio strategy: LONG gold / SHORT silver as ratio
explodes from 90 to 125 (massive winner)
- Tail hedge (VIX calls + SPY puts) pays 8x premium
- Kill switch fires Mar 16 at -9.1% drawdown
- Net portfolio loss in simulation: -5.4% (tail hedge profits offset)
Stress Test 4: Silver Spike 2024
What happened: Silver rallied 40% in 2 months (Feb-Apr 2024) driven by solar panel demand, AI-related industrial demand, and speculative frenzy. Then gave back 15% in 3 weeks.
OUR SYSTEM'S SIMULATED RESPONSE:
- Momentum strategies captured the uptrend (+12% contribution)
- COT strategy flagged extreme managed money longs at the top
- Vol risk premium strategy collected premium as IV spiked
- Meta-labeller reduced silver size as crowding indicators fired
- Max drawdown during the 15% selloff: -3.8% (already de-risked)
Summary of Stress Test Results
+------------------------+-----------+------------+-----------+
| Crisis | Max DD | Recovery | Tail Hedge|
| | (simulated| Time | P&L |
+------------------------+-----------+------------+-----------+
| Hunt 1980 | -6.8% | 8 weeks | N/A |
| Gold Crash 2013 | -7.2% | 6 weeks | +1.1% |
| COVID 2020 | -5.4% | 4 weeks | +4.2% |
| Silver Spike 2024 | -3.8% | 3 weeks | +0.3% |
+------------------------+-----------+------------+-----------+
IN EVERY SCENARIO: Drawdown stays within the -15% hard limit.
The system survives. Always.
EVT / CVaR Tail Risk
Standard Value-at-Risk (VaR) assumes returns are normally distributed. They are not. Gold has fat tails -- extreme moves are 3-5x more frequent than a normal distribution predicts. We use Extreme Value Theory (EVT) and Conditional VaR (CVaR) to model the tail.
The math
1. Fit a Generalized Pareto Distribution (GPD) to the tail:
Threshold u = VaR(95%)
Excess losses above u follow GPD(xi, sigma)
2. CVaR (Expected Shortfall) = expected loss GIVEN we are in the tail:
CVaR_99% = VaR_99% * (1 + (sigma - xi*u) / ((1-xi) * VaR_99%))
3. Our limit:
CVaR_99% of portfolio < 8% of NAV on any given day
In English: "If we have a 1-in-100 bad day, the average loss in that
worst 1% of days should be less than 8% of our portfolio."
Why CVaR, not VaR?
VaR says: "There is a 1% chance of losing more than X."
CVaR says: "If we're in that 1% worst case, we expect to lose Y."
VaR tells you where the cliff is.
CVaR tells you how far you fall.
Tiered Kill Switch with Two-Person Reset
The kill switch is not a single trigger. It is a tiered system with escalating responses.
+=================================================================+
| TIERED KILL SWITCH |
+=================================================================+
| |
| TIER 1: YELLOW ALERT |
| Trigger: Daily P&L < -2% OR Weekly P&L < -3% |
| Action: |
| - Halt new position initiation |
| - Existing positions continue |
| - Alert to Slack + Telegram |
| - Auto-resolve if P&L recovers within session |
| |
| TIER 2: ORANGE ALERT |
| Trigger: Daily P&L < -3% OR Drawdown > -8% from peak |
| Action: |
| - Close all positions at 50% (de-risk, don't flatten) |
| - No new trades |
| - Alert + phone call to PM |
| - ONE authorized person can reset after 4-hour cooldown |
| |
| TIER 3: RED ALERT |
| Trigger: Daily P&L < -5% OR Drawdown > -15% from peak |
| Action: |
| - CLOSE ALL POSITIONS IMMEDIATELY |
| - Cancel all open orders |
| - Set live_trading = FALSE |
| - Alert to all channels + email to compliance |
| - TWO authorized persons must BOTH approve reset |
| - Minimum 24-hour cooling period |
| - Restart at 25% position size for first 5 trading days |
| |
+=================================================================+
| |
| CRITICAL: The two-person reset exists because a single person |
| under stress makes bad decisions. The second person provides |
| emotional detachment and independent judgment. |
| |
| There is NO override mechanism. There is NO "emergency bypass." |
| The code that enforces this is in qgtm_risk/circuit_breaker.py |
| and it cannot be disabled via API, config, or environment var. |
| |
+=================================================================+
Heartbeat Monitor
Every 30 seconds, the live engine sends a heartbeat to the risk manager.
IF heartbeat_missed > 60 seconds:
PAUSE all trading (Tier 1 equivalent)
Alert: "System heartbeat lost. Possible crash or network failure."
IF heartbeat_missed > 300 seconds:
CLOSE ALL POSITIONS (Tier 3 equivalent)
"If the system is dead, we cannot manage risk. Go flat."
Drawdown-Responsive Deleveraging
Rather than a binary on/off kill switch, we also implement continuous deleveraging as drawdown deepens.
DRAWDOWN vs LEVERAGE MULTIPLIER:
Drawdown from Peak Leverage Multiplier Action
────────────────── ─────────────────── ──────────────────────
0% to -4% 1.00x Full risk budget
-4% to -8% Linear from 1.0 to 0.5 Gradual de-risking
-8% (SOFT LIMIT) 0.50x Half positions
-8% to -15% Linear from 0.5 to 0.0 Aggressive de-risking
-15% (HARD LIMIT) 0.00x FLAT. Kill switch.
Formula:
IF drawdown <= -0.04:
multiplier = 1.0
ELIF drawdown <= -0.08:
multiplier = 1.0 - (drawdown - (-0.04)) / (0.08 - 0.04) * 0.5
ELIF drawdown <= -0.15:
multiplier = 0.5 - (drawdown - (-0.08)) / (0.15 - 0.08) * 0.5
ELSE:
multiplier = 0.0 # KILL
Why continuous, not binary? A binary kill switch at -8% means a portfolio at -7.9% is running full risk, then at -8.1% it closes everything. The act of closing in a bad market can itself cause 1-2% of slippage. Continuous deleveraging reduces this cliff effect.
VISUAL: Leverage vs Drawdown
Leverage
1.0x |████████████
| ████
0.5x | ████████
| ████
0.0x |____________________________████___
0% -4% -8% -12% -15%
Drawdown from Peak
[Full Risk] [Soft Zone] [Hard Zone] [KILL]
Compliance Controls
Wash Sale Prevention
A wash sale occurs when you sell a security at a loss and repurchase a "substantially identical" security within 30 days. The IRS disallows the loss deduction.
Our wash sale engine:
- Tracks all realized losses by symbol
- Before any BUY order, checks: was this symbol sold at a loss in the
prior 30 days?
- IF YES: Flag the trade. Options:
a) Delay the purchase to day 31
b) Purchase a non-identical instrument (e.g., GLD -> IAU for gold)
c) Override with compliance approval (loss deduction forfeited)
Pattern Day Trader (PDT) Compliance
If the account is under $25,000, PDT rules limit day trades to 3 per rolling 5-day window. Our system tracks this automatically and blocks the 4th day trade.
Position Limits
COMEX GOLD futures: 6,000 contracts (spot month)
COMEX SILVER futures: 1,500 contracts (spot month)
We trade ETFs, not futures directly, but if our ETF positions imply
a futures-equivalent above 50% of the COMEX limit, the risk manager
flags it for review. We never want to be big enough to move the market.
CFTC Large Trader Reporting
If any position exceeds the CFTC reportable threshold, we file automatically. For gold: 200 contracts equivalent. For silver: 150 contracts equivalent.
Portfolio-Level Limits (Summary)
+=================================================================+
| PORTFOLIO HARD LIMITS |
+=================================================================+
| |
| Max gross leverage: 2.0x |
| Max net leverage: 1.0x |
| Max single instrument: 15% of NAV |
| Max gold sector: 50% of NAV |
| Max silver sector: 30% of NAV |
| Max options notional: 25% of NAV |
| Max single strategy: 20% of risk budget |
| Tail hedge budget: 1.0% of NAV per month |
| Drawdown soft limit: -8% |
| Drawdown hard limit: -15% |
| Daily loss kill: -5% |
| CVaR(99%) limit: 8% of NAV |
| |
+=================================================================+
Chapter Summary
| Defence Layer | What It Does |
|---|---|
| 8-Factor Risk Model | Decomposes all risk into 8 measurable factors with hard limits |
| Stress Testing | Proves survival against Hunt 1980, Gold Crash 2013, COVID 2020, Silver 2024 |
| EVT/CVaR | Models fat tails that VaR misses |
| Tiered Kill Switch | Yellow/Orange/Red alerts with escalating responses |
| Two-Person Reset | Prevents emotional overrides after major losses |
| Continuous Deleveraging | 8% soft, 15% hard -- smooth ramp-down, not a cliff |
| Compliance | Wash sale, PDT, position limits, CFTC reporting |
The most important thing: The system is designed so that the worst possible outcome is a -15% drawdown that takes 3-6 months to recover. Not comfortable, but survivable. Compare that to LTCM (-90%), Amaranth (-65%), or the Hunts (bankrupt). Survival is the only edge that compounds.
Next up: Where all our data comes from and why it matters. Chapter 7: Our Data Edge -->