Metrics
Every metric TradePilot's engine computes — return, volatility, Sharpe, Sortino, drawdown, Calmar, VaR/CVaR, win rate, profit factor, skew/kurtosis — and how to read each one.
This is the reference list of what the engine computes and how to interpret
it. For an interactive teaching version — each metric with a formula and a live
worked example — use the Learn page. The definitions below match the
engine source exactly (daily series, periodsPerYear = 252).
Headline metrics
These are the eight shown in the Compare table and on the leaderboard.
| Metric | What it measures | How to read it |
|---|---|---|
| Annualized return | Compound return scaled to a year | Higher is better, but never alone |
| Annualized volatility | Std. dev. of returns × √252 | Lower = steadier; context for return |
| Sharpe ratio | Excess return per unit of total risk | Higher is better; >1 is good |
| Sortino ratio | Excess return per unit of downside risk | Higher; Sortino > Sharpe means upside-driven vol |
| Max drawdown | Worst peak-to-trough decline | Closer to 0 is better; the pain metric |
| Calmar ratio | Annualized return / |max drawdown| | Return earned per unit of worst-case pain |
| Win rate | Fraction of periods with a positive return | 0–1; high win rate ≠ high return |
| Profit factor | Sum of gains / |sum of losses| | >1 profitable; ∞ when there are gains and no losses |
Reading the ratios
- Sharpe uses total volatility; Sortino replaces it with semideviation (the std of negative returns only), so it doesn’t punish upside swings. If Sortino ≫ Sharpe on the same run, most of the “risk” was actually upside.
- Calmar ties reward to the single worst episode rather than average volatility — useful when drawdown, not variance, is what you can’t stomach.
- Profit factor can be
+Infinity(gains, zero losses). When a run is saved, that is coerced before JSON storage — see publishing.
Risk & tail metrics
| Metric | Definition | Notes |
|---|---|---|
| Alpha | Portfolio return − risk-free rate | Excess over the risk-free baseline |
| VaR (historic) | Loss at a percentile (default 5%) | Reported as a positive loss threshold |
| VaR (Gaussian) | Parametric VaR; optional Cornish–Fisher (modified) adjustment | Uses skew & kurtosis when modified |
| CVaR | Expected shortfall — mean loss beyond VaR | Captures tail severity, not just its edge |
| Skewness | Asymmetry of the return distribution | Negative = fat left tail (crash-prone) |
| Kurtosis | Tail fatness (raw; normal = 3) | >3 = fatter tails than normal |
Trade-quality metrics
Alongside win rate and profit factor, the engine also reports:
- avgWin — mean of positive-period returns.
- avgLoss — mean of negative-period returns (itself negative).
Beyond scalars
A run also returns:
- Monthly returns — each calendar month’s compounded return (a returns heatmap).
- Top drawdowns — the deepest peak → trough → recovery episodes, each with
depth, trough date, recovery date (or
nullif never recovered), and length in days.
Related
- Learn — the same metrics, taught interactively with live numbers
- Backtesting — where these values come from
- Engine internals —
BacktestMetrics/ExtendedMetrics - Glossary