# Analysis & export

> Read deeper than the headline: regime context, probability scans, Monte Carlo, and exporting a run.

Source: https://docs.texttoquant.com/reference/analysis

---

Beyond the summary metrics, each run carries several deeper analyses that explain *why* it performed
the way it did and *how much* to trust it. This page is the reference for those panels, plus how to
take the run with you.

## Context V3

Every trade is labelled by the market regime it happened in, so you can see where the edge lives,
and filter to rerun on just one slice.

| Dimension | Labels |
| --- | --- |
| Trend | Bull / bear / chop |
| Volatility | Low → high |
| Structure | Break / pullback |
| Macro | Inflation tertile |

Filter to a bucket and rerun to see slice only performance. A strategy that only works in bull trend,
low volatility conditions is a very different bet from one that works everywhere.

<Callout variant="info" title="Any indicator can be a dimension">
  Those four are the defaults. Context can re-analyse across *any* built-in indicator (RSI, ADX, …)
  or one of your custom indicators as the dimension, and by entry position, with a minimum-sample
  threshold per bucket so a thin slice can't mislead you.
</Callout>

## Probability scan

The base rate for your *entry signal*. Your backtest holds one position at a time, so every
trigger that fires while a trade is open is skipped, the trade count is a floor, not how
often the setup actually happens. The scan re-walks **every** trigger and asks what happened
next.

| Metric | Meaning |
| --- | --- |
| Hit rate | Share of **resolved** signals that reached the target |
| Break-even | The hit rate your realised payoff actually needs |
| Signal edge | Hit rate minus break-even, the part that is really an edge |
| Expectancy | Mean return per signal, gross of fees |
| Signals | Times the trigger fired, and how many became trades |
| Avg win / loss | With average MFE and MAE beneath each |

<Callout variant="warning" title="A hit rate alone is never the finding">
  27% is excellent at a 3:1 payoff and fatal at 1:1. Always read the hit rate against the
  **break-even rate** beside it. The verdict is decided by the 95% confidence interval, not
  the raw number, and stays **inconclusive** below 30 resolved signals however good the
  rate looks.
</Callout>

**Pending signals are excluded from every rate.** A signal the scan could not resolve is
unknown, not unsuccessful, counting it as a loss would understate exactly the strategies
whose trades run longest.

### Traded vs skipped

The reason the scan exists. Every trigger is matched to a real trade, so you can see which
ones your backtest could not take and whether they resolved any differently. The two groups
are compared by **confidence-interval overlap, not by their printed rates**, a 30-signal
group and a 7-signal group will nearly always overlap, and when they do the honest answer is
that the sample cannot say whether the position filter helped or hurt.

The full list lives in the trade table's **SIGNALS** view, with a TRADED / SKIPPED column.
Those skipped triggers appear nowhere else.

### How outcomes resolve

With a profit target set, each signal is walked forward, up to 500 bars, and resolved on
whichever comes first: **stop, target, trailing stop, or time exit**. When a bar's range spans
both stop and target, intrabar order is unknowable, so it resolves as the stop.

Without a profit target it falls back to a fixed 20-bar close-to-close return against a
±0.1% flat band.

<Callout variant="info" title="It is a model, and it tells you so">
  Indicator exits, stop plans and new-high/low exits are **not** simulated. When your strategy
  carries one, the panel names it. And **Model vs reality** measures the gap directly: on the
  triggers your backtest did trade, how often the modelled outcome matched the real trade.
  High agreement means you can trust the rest; low agreement means unmodelled exits are doing
  the work.
</Callout>

<Callout variant="warning" title="Not account P&L">
  Everything here is gross of fees and slippage, and position-independent, it has no size, so
  it has no P&L. Overlapping triggers can also count the same move more than once. Read it
  alongside the backtest, never instead of it.
</Callout>

Heavy (chunked) backtests stream the series in slices and cannot run the scan; the panel says
so rather than showing an empty deck.

## Monte Carlo

Your equity curve is one path through history. Monte Carlo resamples the trade order thousands of
times to show the *range* of outcomes you could have had, and how deep a drawdown to expect. Risk
bands appear after 5+ trades.

| Metric | Meaning |
| --- | --- |
| P(ruin) | Severe loss tail |
| 95% band | Outcome range |
| Percentiles | Best / worst paths |

## Export

Take the run with you as data files or a share card.

| Format | Contents |
| --- | --- |
| CSV (trades) | Entries, exits, P&L, R, fees |
| CSV (equity) | Equity curve over time |
| CSV (signals) | Probability scan signals |
| PNG card | Metrics + logic snapshot |

## Deeper validation

Context, probability and Monte Carlo all read the run you already have. To pressure-test the edge
*itself*, the [robustness suite](/docs/reference/robustness) re-runs the strategy on new data and new
parameters:

| Check | Question |
| --- | --- |
| Last 30% vs first 70% | Did the edge persist through the last 30% of the window? Nothing is fitted — this is a chronological split of the run you specified. |
| Window consistency | Is the edge present across sequential windows of the same run? |
| Parameter sweep / grid | Is the result a stable plateau or a lone spike? |

See [robustness](/docs/reference/robustness) for the full suite and the overfit verdict.

Related: [Metrics](/docs/reference/metrics), [Robustness](/docs/reference/robustness).
