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

# Backtest Metrics Explained

> A practical guide to the most important backtest metrics in Trinigence and how to interpret them.

## How to read metrics (the right order)

Most traders look at profit first. That’s backwards.

A better order:

1. **Trade count & exposure** (is the sample meaningful?)
2. **Drawdown** (can you survive it?)
3. **Profit factor / expectancy** (is it edge or noise?)
4. **Sharpe/Sortino** (quality of returns)
5. **CAGR / total return** (scale of returns)

<Info>
  Metrics are only meaningful together. One number rarely tells the truth.
</Info>

***

## Trade activity metrics

### Trade count

How many trades the strategy took in the selected period.

Why it matters:

* very low trade count = high uncertainty
* very high trade count = noise sensitivity

### Win rate

Percent of trades that are profitable.

Interpretation:

* high win rate can still lose money (small wins, big losses)
* lower win rate can still be profitable (big wins, controlled losses)

### Exposure time

Percent of time the strategy is in a position.

Interpretation:

* high exposure = higher market risk
* low exposure = fewer opportunities, often more selective

***

## Profitability metrics

### Total return / Total PnL

The total profit/loss over the backtest period.

Interpretation:

* depends heavily on position sizing assumptions
* compare alongside drawdowns

### Profit factor

Gross profit divided by gross loss.

Rules of thumb:

* \< 1.0 = losing strategy
* \~1.1–1.3 = weak edge (often fragile)
* 1.5+ = stronger edge (still needs validation)

### Expectancy

Average profit per trade (often expressed in R or %).

Interpretation:

* tells you if trades are positive on average
* can be positive even with low win rate

***

## Risk metrics

### Max drawdown

The largest peak-to-trough decline in equity during the backtest.

Interpretation:

* the “pain” you must tolerate
* compare to total return and exposure

### Drawdown duration

How long the strategy stayed below its previous equity peak.

Interpretation:

* long durations can be psychologically hard
* often indicates regime dependence

### Largest loss / worst trade

The biggest single losing trade.

Interpretation:

* helps detect tail risk
* check if it aligns with your stop loss design

***

## Return-quality metrics

### Sharpe ratio

Return adjusted by volatility.

Interpretation:

* higher is better
* sensitive to outliers and assumptions

### Sortino ratio

Like Sharpe, but penalizes only downside volatility.

Interpretation:

* often more relevant for strategies with asymmetric returns

### Calmar ratio

CAGR divided by max drawdown.

Interpretation:

* balances return against worst drawdown
* useful for comparing strategies with different risk profiles

***

## Growth metrics

### CAGR

Compound annual growth rate.

Interpretation:

* assumes reinvestment and stable behavior
* can be misleading on short backtests

<Warning>
  CAGR is not meaningful without enough time and enough trades.
</Warning>

***

## Trade-level metrics

### Average trade

Average profit/loss per trade.

### Average win / average loss

Mean size of winning vs losing trades.

Interpretation:

* helps explain why win rate is (or isn’t) profitable
* a healthy profile often has controlled losses and meaningful wins

### Avg / max trade duration

How long trades last.

Interpretation:

* affects opportunity cost and exposure
* impacts suitability for your style (fast vs slow systems)

***

## Strategy quality metrics (advanced)

### SQN (System Quality Number)

A measure that combines trade expectancy and variability.

Interpretation:

* higher values imply more consistent outcomes
* unreliable with low trade counts

### Kelly criterion

A sizing heuristic based on edge and variance.

Interpretation:

* can be unstable
* useful as a signal of edge strength, not as a literal sizing rule

<Warning>
  Do not blindly apply Kelly sizing in live trading.
</Warning>

***

## Common misreads

<AccordionGroup>
  <Accordion title="High win rate but losing total return">
    Usually caused by small wins and occasional large losses (poor risk control).
  </Accordion>

  <Accordion title="Great CAGR on a short window">
    Often overfit or regime-specific. Extend the backtest range.
  </Accordion>

  <Accordion title="Profit factor looks good but drawdown is huge">
    Edge may exist, but risk is likely unacceptable.
  </Accordion>

  <Accordion title="Sharpe/Sortino look bad but return is positive">
    Returns may be inconsistent or volatility is high.
  </Accordion>
</AccordionGroup>

***

## Best practices

* Compare strategies using the same backtest range
* Start by validating trade history (not metrics)
* Prefer robustness over maximal returns
* Always measure risk first

<Card title="Trade history & logs" icon="list-check" href="/backtesting/trade-history-and-logs" horizontal>
  Metrics are summaries - trades are the truth.
</Card>

***

## What to read next

<CardGroup cols={2}>
  <Card title="How backtesting works" icon="chart-line" href="/backtesting/how-backtesting-works">
    Understand the simulation model.
  </Card>

  <Card title="Data coverage" icon="database" href="/backtesting/data-coverage">
    Ensure your backtest window is valid.
  </Card>

  <Card title="Common pitfalls" icon="triangle-exclamation" href="/backtesting/common-pitfalls">
    Avoid misinterpretation traps.
  </Card>

  <Card title="Improving a strategy" icon="sliders" href="/iteration-optimization/improving-a-strategy">
    Iterate without overfitting.
  </Card>
</CardGroup>

<Note>
  Metrics are compressed reality.\
  Always verify them against the trade list.
</Note>
