# Strategy lab

> Popular strategy templates run on a year of Binance and Bybit data, each through five validation gates next to a random-entry control. Nothing is called "working" unless it passes all five.

The [Strategy lab](https://deskr.trade/app/lab) answers one question honestly: **does this common strategy beat chance on crypto perps?** Nothing on Deskr (the lab, ideas, MCP or marketing) may call a preset "working" unless it passes **all five** gates below.

## Data

- Up to **365 days** of closed 1h candles for the top 20 coins by 24h volume.
- Candles come from Binance and Bybit perps, combined the same way as live candles: volume-weighted OHLC with volume summed in USD.
- The engine refreshes the history every 6 hours and re-runs the lab.

## How trades are simulated

- Fills happen at the **next bar's open**.
- Costs are 5 bp fee + 3 bp slippage per side, so **16 bp per round trip**.
- When a bar touches both the stop and the target, **the stop counts first**.
- One position at a time, except for DCA.
- Paper equity starts at $1,000, with 10% of the starting balance per trade and no compounding.

## Presets

| Preset | Rule | Parameter grid |
|---|---|---|
| Breakout | 1h close beyond the prior N-hour range on ≥ k× 24h volume. Exit after 24h, 2 ATR stop, 3 ATR target. | N 24/48/96 × k 1.2/1.5/2 |
| Stretch fade | Fade a 24h move larger than s × volatility. Exit after h hours, 2 ATR stop and target. | s 2.5/3/3.5 × h 6/12/24 |
| RSI 30/70 | RSI 14 crosses below b → long, above 100 − b → short. h hours, 2 ATR stop and target. | b 25/30/35 × h 12/24/48 |
| EMA cross 4h | 4h EMA fast/slow cross (10/30, 20/50, 30/80), hold h bars, no stop | pair × h 15/30/60 |
| DCA | Buy every e hours at UTC-aligned times, hold h hours, overlapping allowed | e 24/72/168 × h 168/336/720 |

## The five gates

:::steps
1. **Random control.** At least 30 trades, a positive mean after costs, and at least 10 bp per trade better than random-entry controls with the same coins, count, directions, exits and costs (5 draws pooled).
2. **Permutation test.** The default setting's mean must beat 200 random-entry sets with p < 0.05.
3. **Walk-forward.** Pick the setting on 120 days, trade it on the next 30, roll forward by 30 days. The stitched out-of-sample trades must be positive after costs and at least 10 bp better than their control.
4. **Walk-forward permutation.** The out-of-sample mean must beat 200 sets of random entries placed inside the same unseen windows, with p < 0.05. The rule has to win on timing, not on the trend of the window.
5. **Parameter plateau.** At least two-thirds of the grid cells with 30+ trades must be positive and beat their control, and so must every neighbour of the default setting.
:::

A gate with too little data reports **not enough data**, which isn't a pass. The verdict is **pass** only if all five pass, **fail** if any fails, and **unproven** otherwise.

:::note Honest limitation
Gate 4 shuffles entry timing rather than price paths and doesn't re-optimise on shuffled data. That makes it weaker than a full price-permutation re-optimisation, but much cheaper to run. The lab says so.
:::

## House books

Separately, the engine runs Deskr's own rule-based **house books** (for example *Breakout follow*: a 1h close beyond the 48h range on 1.5× volume, out after 24h, 2 ATR stop, 3 ATR target) over the stored history every hour, each next to a random-entry control. These are a rolling backtest and are labelled as such.
