> ## Documentation Index
> Fetch the complete documentation index at: https://uncoded.ch/docs/llms.txt
> Use this file to discover all available pages before exploring further.

# Shadow Mode — Forward-Testing Without Real Capital

> Run a strategy live against real market data without committing real capital. The bridge between backtest and full live deployment.

<Info>
  **Shadow mode runs your strategy live against real market data — but without placing real orders.** It's the bridge between historical backtesting and live trading. You see exactly what trades the strategy would have executed in real time, with real exchange data, but no capital at risk.
</Info>

## What shadow mode is

<CardGroup cols={2}>
  <Card title="Live evaluation, no orders" icon="eye">
    The strategy receives the same real-time market data your live bot would. It evaluates conditions and decides "this is when I'd buy." But it does not actually place orders.
  </Card>

  <Card title="Records what would have happened" icon="clipboard-list">
    Every "would-have-bought" and "would-have-sold" event is recorded. After running for some time, you have a record of the strategy's "shadow trades" — what it would have done if active.
  </Card>

  <Card title="Compares against backtest expectations" icon="balance-scale">
    Compare shadow-mode behavior to backtest expectations. Does the shadow mirror what backtest predicted? Match = confidence; mismatch = investigation needed.
  </Card>

  <Card title="Free of slippage and fee uncertainty" icon="circle-info">
    Pure strategy-logic test. No real fills, no real slippage. Doesn't capture all real-world frictions but isolates the strategy decision logic.
  </Card>
</CardGroup>

## When to use shadow mode

<AccordionGroup>
  <Accordion title="✅ After backtest, before live deployment" icon="forward">
    Backtest validates on history. Shadow mode validates on the present. Together they're stronger than either alone.

    Run shadow mode for 2-4 weeks. If shadow behavior matches backtest predictions, deploy live with small capital.
  </Accordion>

  <Accordion title="✅ When backtest isn't trustable for real-time conditions" icon="circle-question">
    Some real-world conditions aren't fully captured in backtests:

    * Latency to the exchange in your specific VPS location.
    * Fast-moving market behavior that historical candles don't fully represent.
    * Recent regime characteristics that backtest's window may not cover.

    Shadow mode in real time captures these. Backtest captures historical depth.
  </Accordion>

  <Accordion title="✅ When you're testing a new strategy you want to validate before risking capital" icon="flask">
    A custom SignalEditor recipe with several tuning parameters. Even after walk-forward backtest validation, shadow mode in real time gives you another layer of confidence.
  </Accordion>

  <Accordion title="✅ When operator is risk-averse" icon="shield">
    For operators who value low-risk approaches, shadow mode lets you verify a strategy's real-time behavior over an extended period (4+ weeks) before committing any real capital.

    Slow but cautious. Many operators benefit from this discipline.
  </Accordion>
</AccordionGroup>

## How to set up shadow mode

<Steps>
  <Step title="Author the strategy you want to shadow-test">
    Pre-built mode or SignalEditor recipe. Same as live operation.
  </Step>

  <Step title="Configure for shadow mode in the SignalEditor">
    For SignalEditor recipes: start the strategy with `dry_run` flag enabled (or whatever shadow-mode flag the SignalEditor exposes). The strategy evaluates and logs intended actions but does not POST to webhooks.

    For pre-built modes: set `canBuy: false` on the mode. The mode will evaluate buy conditions and log "would have bought" events but won't actually place orders.

    Note: `canBuy: false` doesn't fully shadow — it skips the order, but tracks of what would have happened are limited. For richer shadow tracking, the SignalEditor's `dry_run` is more capable.
  </Step>

  <Step title="Watch the Dashboard's logs and analytics">
    The Dashboard surfaces "would have triggered" events. Track these against the backtest's expectations.
  </Step>

  <Step title="Run for at least 2 weeks">
    Shadow mode shorter than 2 weeks may not include enough variability to be informative. 4 weeks is better.
  </Step>

  <Step title="Compare shadow behavior to backtest predictions">
    Does shadow mode produce trades at the same frequency backtest predicted? At similar prices? At similar conditions?

    If yes: the strategy's logic transfers to live conditions. Deploy with small capital.

    If no: investigate the divergence before deploying any capital.
  </Step>
</Steps>

## Limitations of shadow mode

<Warning>
  **Shadow mode is not a perfect prediction of live performance.**

  What shadow mode captures:

  * Strategy decision logic in real time.
  * Real-time market data feed integrity.
  * Frequency of triggers in current regime.

  What shadow mode does NOT capture:

  * **Slippage** — real fills aren't at recorded prices.
  * **Fees** — depending on shadow setup, fees may not be deducted from shadow P\&L.
  * **Order book impact** — your live orders affect the book; shadow doesn't.
  * **Partial fills** — shadow assumes you get full fills; live can produce partial fills.
  * **Latency-induced misses** — fast moves can have you missed by milliseconds.

  Treat shadow mode as **strategy-logic validation**, not as performance prediction. Real performance is `90–95%` of shadow performance for most operators, after frictions.
</Warning>

## Shadow vs forward-test on small capital

These are different tools for different purposes:

|                                    | Shadow mode       | Forward-test (small live)             |
| ---------------------------------- | ----------------- | ------------------------------------- |
| **Capital risk**                   | Zero              | Small (`$1,500–$3,000`)               |
| **Real fills**                     | No                | Yes                                   |
| **Slippage modeling**              | No                | Yes (real)                            |
| **Operator emotional involvement** | Low               | Higher                                |
| **Validation depth**               | Strategy logic    | Strategy + frictions + emotions       |
| **Time investment**                | 2-4 weeks         | 2-4 weeks                             |
| **Use when**                       | Logic uncertainty | Logic confident, want full validation |

For thorough operators: shadow mode first (logic validation), then small-capital forward-test (full validation), then full deployment. Each step builds confidence.

## Common mistakes with shadow mode

<AccordionGroup>
  <Accordion title="❌ Running too short" icon="hourglass">
    Shadow for 3 days, see good results, deploy live. The 3 days happen to be in a regime that's particularly suited to your strategy. Live deployment runs into a different regime and underperforms.

    **Fix**: minimum 2 weeks of shadow; ideally 4 weeks. Multiple regime characters need to be experienced.
  </Accordion>

  <Accordion title="❌ Confusing shadow mode with live" icon="ban">
    Operators sometimes forget shadow mode is shadow — they look at "would have bought" P\&L and treat it as if it were realized.

    **Fix**: clearly label shadow vs live in your operator records. Shadow P\&L is hypothetical; live P\&L is real.
  </Accordion>

  <Accordion title="❌ Not comparing shadow to backtest" icon="ban">
    Running shadow mode but never explicitly comparing to backtest expectations. Missing the diagnostic value.

    **Fix**: explicitly: "Backtest predicted 8 trades/week, shadow showed 6. That's roughly aligned. Backtest predicted 12 trades/week, shadow showed 2. That's a substantial divergence — investigate before live."
  </Accordion>

  <Accordion title="❌ Shadowing for 4 weeks then skipping forward-test" icon="ban">
    Shadow validates strategy logic. It doesn't validate strategy + frictions + operator emotion. The forward-test step is still needed.

    **Fix**: shadow → small-capital forward-test → full deployment. Don't skip forward-test even after extensive shadow.
  </Accordion>
</AccordionGroup>

## Best practices

<Tip>
  * ✅ **Shadow mode after backtest, before any live capital** — the right sequence.
  * ✅ **2-4 weeks minimum** for meaningful sample.
  * ✅ **Compare shadow against backtest predictions** explicitly.
  * ✅ **Don't skip forward-test on small capital** even after extensive shadow.
  * ✅ **Use SignalEditor's dry-run flag** for strategies (richer tracking than `canBuy: false`).
  * ✅ **Document shadow results** in your operator runbook for retrospective.
  * ✅ **Monitor for divergence** between shadow and backtest — early warning of strategy problems.
  * ✅ **Treat shadow as logic validation**, not performance prediction.
  * ✅ **Don't believe shadow if it diverges substantially from backtest** — strategy may be regime-mismatched.
</Tip>

## What's next

<CardGroup cols={2}>
  <Card title="Why backtest" icon="circle-question" href="/backtesting/why-backtest">
    The fundamentals.
  </Card>

  <Card title="Reading results" icon="chart-bar" href="/backtesting/reading-results">
    Interpreting backtest output.
  </Card>

  <Card title="Walk-forward" icon="timeline" href="/backtesting/walk-forward">
    Catching curve-fitting before deployment.
  </Card>

  <Card title="Common mistakes" icon="ban" href="/backtesting/common-mistakes">
    Pitfalls to avoid in your validation pipeline.
  </Card>
</CardGroup>
