Lecture 11 · Shadow Mode: The Last Stretch Before Going Live, and the Truth of Operations¶
Chapter 4 · What a Surviving Strategy Looks Like (second lecture, closing the chapter) Learning objectives: understand the design purpose and monitoring metrics of shadow mode; through a real operational incident, understand the "meta-question of monitoring systems" — monitoring systems break too. Prerequisite: Lecture 10.
1. What shadow mode is: live trading without capital¶
After funding carry was judged SUPPORTED, it did not go straight to real money; it entered a 30-day frozen monitoring period (shadow mode): the strategy generates signals daily under live-trading logic, computes virtual positions and virtual P&L, and the ledger is logged daily — but no orders are placed.
How it differs from backtesting: shadow mode consumes real data arriving in real time, experiencing genuine data delays, gaps, and out-of-order arrivals; how it differs from live trading: no execution feedback and no capital occupied.
The design purpose has three layers:
- Validating the last mile of "implementability": whether the execution assumptions in the backtest (fillable at close price, fees as configured) hold in a real-time environment — only shadow mode can expose this
- Validating the runtime environment itself: whether the chain of data pipeline, signal computation, and ledger bookkeeping can run stably for 30 days — many strategies die not of the market but of their own operations
- Accumulating forward samples: the 30-day shadow record is a zero-cost, entirely uncontaminated stretch of forward data, citable for the deployment decision
2. The monitoring metric system of shadow mode¶
The monitoring design for funding carry's shadow period (carrying over Lecture 10's "pre-registered monitoring" principle, written before deployment):
| Layer | What is monitored | Triggered action |
|---|---|---|
| Data layer | Arrival delay, gaps, duplication of market/funding data | Degrade and retry; timeout alert |
| Signal layer | Deviation of signals from backtest convention | Pause signals when deviation exceeds limits; manual review |
| Ledger layer | Self-consistency of virtual positions/cash/P&L (every entry reconcilable) | On reconciliation failure enter DEGRADED; forbid end-of-day settlement |
| Business layer | Return composition (funding vs price legs), consistency with the structure at verdict time | Departure from the verdict-time pattern triggers review (the practical version of Lecture 10's reflection question) |
The state machine has three tiers: HEALTHY / DEGRADED / HALTED. The key design is degrade before continuing — when the ledger is inconsistent, it is better to stop bookkeeping than to produce "wrong numbers that look normal". This carries on Lecture 3's principle: when a system misbehaves, the most dangerous thing is not downtime but silently producing wrong results.
3. Real incident retrospective: the K2 false positive — the monitoring system fooled you, who monitors it¶
An event that actually occurred during the shadow period, of extremely high teaching value. The K2 detector (responsible for settlement-booking reconciliation) repeatedly alerted "settlement not booked", pushing the system into DEGRADED and flooding the alert channel. Post-hoc verification: the settlement had in fact been correctly booked — it was the detector's own judgment logic that was flawed (a boundary condition of the reconciliation time window), a false positive.
The same defect pattern recurred twice (after the first fix, it was once misjudged as "passed" — because the retest happened within the detector's time-window threshold since the last alert, the test itself was invalid). Secondary problems exposed along the way:
- Alert fatigue: false positives flooding at a rate of one every few seconds drowned the visibility of real alerts — the first design principle of an alerting system is tiering (fatal/warning/info); untiered alerts equal no alerts
- Self-deception of "the retest passed": fix verification must be done on the defect's true time scale (the detector's window is 30 minutes, so verification must wait past the window); a "pass" on a shorter scale has zero validity
- The reconciliation cost of separating alerts from books: the alert says not booked, the ledger says booked — when two sources conflict, adjudication needs third-party evidence (raw settlement records). An operations system must define in advance "what counts as authoritative when conflicts occur"
The meta-lesson from this event is the core of this lecture:
The monitoring system is part of the system; it breaks too, and it breaks in a more insidious way — when it breaks it does not stop producing output; it only outputs wrong certainty. For every detector of the monitoring system, ask: what does the world look like when the detector itself fails? If the answer is "same as normal" (false negative) or "fires everywhere" (false positive), the detector needs another layer of validation — meta-monitoring, or at least a manual spot-check channel.
4. The economics of shadow mode: when is this apparatus worth building¶
The cost must be faced honestly: shadow mode is not free — it is a quasi-production system requiring development, operations, and staffing (in this case the shadow chain included daily data pulls, signal computation, ledger, reconciliation, tiered alerting, and a state machine, and there really was an operational incident of data interruption requiring retroactive reconciliation). Is it worth building this for a cash-management-grade strategy yielding 2.37% annualized?
The campaign's actual trade-offs, presented as they were:
- Scale decides: the strategy's capacity is large (it can carry substantial capital) and its execution frequency is low (daily), so the shadow system can be thin — daily batch processing suffices, no tick-level monitoring needed
- Verdict and deployment decoupled: shadow mode validates pipeline implementability, not a re-verification of strategy validity (that is the OOS verdict's job). So its exit criterion is not "good shadow-period returns" (30 days of returns carry no statistical significance), but "30 days with zero unexplained ledger discrepancies and zero fatal pipeline failures"
- Resist the sunk-cost temptation: once the shadow system is built and running smoothly, psychological pressure arises — "we've come this far, let's just go live". The grounds for going live remain only the verdict + pipeline health; the toil of the shadow period constitutes no statistical evidence whatsoever
5. Chapter 4 summary¶
Lectures 10 and 11 together answer the final link of the entire question chain set up in Chapter 1:
290 factors → zero survivors under validation → the sole survivor at 2.37% annualized, sourced from the funding mechanism → decay monitoring and the variant ban pre-registered at verdict time → 30 days of shadow mode validating the pipeline → only then, the deployment decision.
Two counterintuitive conclusions to remember:
- The hardest part is not keeping the strategy alive, but staying humble about "having survived" — magnitude repositioning (cash-management grade), the variant ban, pre-registered monitoring are all institutions that cool down "success". The reason has recurred throughout the course: in this trade, the moments that look most like success are the moments when bias most easily sneaks in (the operations version of Lecture 7's plausibility bias).
- The failure mode of a monitoring system is more insidious than a strategy's — it outputs certainty, and keeps outputting even when broken. Meta-monitoring and manual spot-check channels are not redundancy; they are necessities.
Chapter 5 (the final chapter) rises from the individual strategy back to the research organization: how opportunities are screened, how directions get cut, how negative results are recorded — gathering the whole course's methodology into a set of research discipline you can take with you.
Reflection question: after 30 days of failure-free shadow mode, someone proposes: "the shadow system is built anyway; let's hook up two other unvalidated strategies to run in shadow alongside, at no extra cost." What hidden costs does this proposal have? (Hint: on which decision will the shadow-run data be used? For those two strategies' validation — OOS consumption, multiple testing — does the shadow period count as one "peek"?)