> For the complete documentation index, see [llms.txt](https://botlyz.gitbook.io/docs/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://botlyz.gitbook.io/docs/english/vue-d-ensemble-1.md).

# The Lab

The **Lab** stress-tests the *robustness* of your strategies **before** you risk capital. A strategy that looks excellent on a backtest may just be luck or overfitting to past data. The Lab tools reveal this and return a clear verdict: 🟢 robust, 🟠 watch out, 🔴 fragile.

> The Lab tools are **decision aids** based on historical data. They do not constitute investment advice. Past performance does not predict future performance.

## Plans & tools

| Tool                      | Discovery | Trader |  Quant |   Edge  |
| ------------------------- | :-------: | :----: | :----: | :-----: |
| Builder + backtest        |     ✓     |    ✓   |    ✓   |    ✓    |
| 🎯 Out-of-sample (OOS)    |     ✓     |    ✓   |    ✓   |    ✓    |
| 🗺️ Robustness heatmap    |     ·     |    ✓   |    ✓   |    ✓    |
| 🔄 Walk-forward           |     ·     |    ✓   |    ✓   |    ✓    |
| 🎲 Monte Carlo            |     ·     |    ·   |    ✓   |    ✓    |
| 📊 Scorecard              |     ·     |    ·   |    ✓   |    ✓    |
| 🌐 Multi-pair scan        |     ·     |    ·   |    ·   |    ✓    |
| 🧪 TPE optimization       |     ·     |    ·   |    ·   |    ✓    |
| CPCV · PBO                |     ·     |    ·   |    ·   |  *soon* |
| **Included credits / mo** |     10    |   240  |   800  |  2,400  |
| **Price**                 |    Free   | €29.95 | €59.95 | €149.95 |

Credits are **shared** between the AI assistant and the Lab and renew every month. Each analysis costs credits **proportional to the compute**.

## How it works, in 3 steps

1. **Create a strategy** in the Builder, then send it to the Lab with the **“Optimize in lab”** button (or pick a saved one).
2. **Set the baseline**: capital, **% of capital used**, leverage, slippage. This is the reference configuration all tools run on.
3. **Run the tools**: each opens full-screen, runs on the baseline, and returns a **verdict** plus detailed metrics. You can also ask the **AI assistant** to interpret a result.

***

## 🎯 Out-of-sample (OOS) · *from Discovery*

Replays your strategy **as-is** over two periods (training, then unseen test), re-optimizing nothing. If performance holds on the test, the edge is real; if it collapses, it was overfit.

1. Pick the train / test split (50 to 90%).
2. Run: the strategy is replayed as-is over both periods.
3. Read the verdict.

**Reading the verdict:** edge retained **≥ 50% = Robust** · 25–50% = Moderate · < 25% = Fragile.

## 🗺️ Robustness heatmap · *from Trader*

Sweeps 1 to 3 parameters and colors each combination by the chosen metric. The goal: find a robust **zone**, not an isolated setting that works by luck.

1. Pick 1 to 3 parameters (axes X, Y, and optional Z).
2. Set the ranges: a finer step = a bigger grid (more backtests).
3. Run: each cell is a backtest, colored by the metric (re-sortable without re-running).

**Reading the verdict:** look for a wide **PLATEAU** of good values, not an isolated **peak** (over-optimized). The Lab points to the **plateau center** (the median of the good cells, outlined in green), never the best peak. Click a cell for its detailed backtest. The **“Heatmap → Builder”** button loads that robust setting into the Builder, ready to re-edit then redeploy: it is a starting point to validate, not a parameter recommendation. Verdict 🟢 robust / 🟠 watch out / 🔴 fragile.

## 🔄 Walk-forward · *from Trader*

Optimizes your parameter window after window: tune on the past, validate on the next unseen period, step by step. It is the closest test to real trading.

1. Pick the parameter to optimize and the number of windows.
2. Set the range of values to test.
3. Run: on each window, the best training setting is validated on the next window.

**Reading the verdict:** aim for **≥ 60% positive windows** and a **stable parameter** (little variation).

## 🎲 Monte Carlo on trades · *from Quant*

Replays your strategy once, then resamples the **sequence of your trades** thousands of times. Instead of a single result, you get the **distribution** of possible outcomes: how much your performance depends on luck / trade order.

* **Bootstrap** (sampling with replacement): “what if the strategy had seen other similar trades?” → distribution of the **final return** plus drawdown.
* **Reshuffle** (same trades, reordered): the final return is mathematically **invariant** (commutative product); we then measure **drawdown risk** depending on trade order.

The number of simulations is adjustable (200 to 10,000). A **fan chart** shows the range of possible paths, with a button to display individual paths (best / worst).

**Reading the verdict:** in bootstrap mode, **probability of profit ≥ 85%** and **worst 5% positive** = robust. *Note: Monte Carlo drawdowns are measured at each trade close (realized), so slightly below the backtest “Max DD” which also includes intra-trade drawdown.*

## 📊 Robustness scorecard · *from Quant*

Gathers your strategy's analyses (out-of-sample, parameter stability, walk-forward, Monte Carlo) into a **single /100 score** and a global verdict. Missing analyses can be launched right from the scorecard (one click for OOS / Monte Carlo, “Configure” for heatmap / walk-forward).

1. Each already-computed dimension shows with its sub-verdict.
2. Complete the missing ones.
3. Read the score and the summary (strengths, weaknesses, recommendations).

**Reading the verdict:** aim for **green on every dimension** before going live.

## 🌐 Multi-pair scan · *from Edge*

Sweeps your strategy across **the whole universe** of pairs, then corrects the search bias: keeping the best pair out of 200 mechanically inflates the result (that is *p-hacking*). The **Deflated Sharpe Ratio (DSR)** deflates that best Sharpe by the number of trials, and a **locked hold-out** window (end of period, never used for selection) confirms the survivors.

1. Check the pairs to scan (empty = all).
2. Set the **locked hold-out** share (final segment kept aside).
3. Run: one backtest per pair, the best Sharpe is deflated by N trials, then survivors are re-confirmed on the hold-out.

**Reading the verdict:** the **top DSR** = probability of a REAL edge AFTER the search (**≥ 95% = solid**); check “DSR-OK pairs” and “Hold-out confirmed”. A tight distribution near 0 with an undeflated top = selection noise, not an edge. The **median** locates the typical performance of a random pair, never the peak. Verdict 🟢 robust / 🟠 watch out / 🔴 fragile; it is a decision aid, not a pair or parameter recommendation.

## 🧪 TPE optimization · *from Edge*

Optimizes your strategy's parameters via **Bayesian search (Optuna / TPE)**, pair by pair: for each checked pair, the tool finds the configuration that maximizes **your** score. Optimizing parameters AND scanning pairs = a double search, so the DSR deflates by **pairs × trials** (a deliberately very high, honest bar), and the locked hold-out confirms.

1. Add the parameters to optimize and their ranges (like a heatmap, but unlimited).
2. Build your objective: score = weighted sum of metrics (positive weight = maximize, negative = penalize, e.g. drawdown). Tip: a small weight on the number of trades avoids 1-2 trade configs with an inflated Sharpe.
3. Check the pairs and the number of trials per pair, then run.

**Reading the verdict:** read the **top DSR** and “Hold-out confirmed”: after this large search, what survives? Expand a row to see the found parameters (beware an extreme Sharpe from too few trades). The tool returns a verdict 🟢 robust / 🟠 watch out / 🔴 fragile and shows **median / confirmed** values, never a recommendation of “best parameters” to apply.

## 🚀 Coming soon · Edge plan

The Edge plan will keep growing with the institutional-grade anti-overfit arsenal:

* **CPCV** · combinatorial purged cross-validation (López de Prado);
* **PBO** · probability of backtest overfitting.

***

A question? See [Support](/docs/english/support.md). Plan details in the app (**Plans** page).


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter, and the optional `goal` query parameter:

```
GET https://botlyz.gitbook.io/docs/english/vue-d-ensemble-1.md?ask=<question>&goal=<endgoal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
