Metrics reference
The Metrics module reports the portfolio's performance, risk and return distribution. This page documents every figure exactly as the engine computes it, so you always know what a number means.
How the series is built
Before any metric is computed, VECTOR builds two series from your weighted daily P/L:
- Equity —
initial_capital + cumulative_sum(daily P/L), on the full calendar (weekends are carried flat). Drawdown figures use this series. - Daily returns — the percentage change of equity resampled to business days (Mon–Fri). Resampling avoids diluting volatility with flat weekend days. Sharpe, Sortino, CAGR and volatility use the full business-day series (flat no-trade days kept — idle days are part of time-based, annualised performance, and dropping them would break the √252 annualisation).
- Traded-day returns — the same business-day returns with the flat no-position days removed
(a day the book didn't trade enters as a
0%return). VaR and CVaR use these, so the account tail measures a day you were actually on the market rather than a calendar padded with zeros.
Shared assumptions
- Annualisation: 252 trading days per year.
- Risk-free rate: 2% per year (used by Sharpe and Sortino), applied as
0.02 / 252per day. - VaR / CVaR: historical method, 95% confidence, 1-day horizon.
- Percentages are reported as percentages (a 0.15 return shows as
15.0).
These are fixed, industry-standard conventions aligned with common backtesters.
Capital & profit
| Metric | Definition |
|---|---|
| Initial capital | The starting equity you set. |
| Final equity | Last value of the equity curve. |
| Net profit | final_equity − initial_capital (account currency). |
| Profit % | (final_equity / initial_capital − 1) × 100. |
Return
CAGR — Compound Annual Growth Rate, the smoothed annual rate that would take you from initial to final equity:
years = business_days / 252
CAGR = (final_equity / initial_capital) ^ (1 / years) − 1
CAGR is one of the four hero KPIs. It assumes positive initial and final equity; otherwise it reads 0.
Risk-adjusted ratios
These reward return per unit of risk. Higher is better for all four.
| Metric | Formula | Reads as |
|---|---|---|
| Sharpe | mean(excess) / std(excess) × √252 | Return per unit of total volatility. |
| Sortino | mean(excess) / downside_dev × √252 | Return per unit of downside volatility only. |
| Calmar | CAGR% / |Max Drawdown %| | Return per unit of worst drawdown. |
| K-Ratio | slope / std_error of a linear fit of cumulative P/L vs. trading-day index | Steadiness of the trend. |
Where excess = daily_return − 0.02/252, and downside_dev = √(mean(min(excess, 0)²)) — i.e. Sortino
only penalises days below the risk-free line, so a strategy isn't punished for big up days.
K-Ratio, in words
The K-Ratio fits a straight line through the cumulative P/L and divides its slope by the dispersion of the residuals. A higher K-Ratio means steadier, more linear growth; a low or negative one means a choppy or declining curve. The fit runs over trading days only (P/L = 0 idle days are excluded), so the portfolio K-Ratio is measured on the same basis as the per-strategy one and the two reconcile.
Drawdown
Drawdown is the decline from the running peak of equity, computed on the full calendar-day curve.
| Metric | Definition |
|---|---|
| Max Drawdown ($) | min(equity − running_max) — the deepest peak-to-trough drop in currency. |
| Max Drawdown (%) | the same trough as a percentage of the peak; always ≤ 0. A hero KPI. |
| Max DD duration | longest unbroken stretch (in days) spent below a prior peak. |
| Avg DD duration | average length of all underwater stretches. |
Volatility & tail risk
| Metric | Definition | Meaning |
|---|---|---|
| Annual volatility | std(daily_returns) × √252 × 100, on the full business-day series | Dispersion of daily returns, annualised. |
| VaR 95% | magnitude of the 5th-percentile traded-day return | Loss not exceeded on 95% of the days you trade. |
| CVaR 95% | mean of the worst 5% of traded-day returns | Average loss on the worst 5% of traded days (beyond VaR). |
VaR and CVaR are historical: they read straight off your actual return distribution rather than
assuming a bell curve, so fat tails are respected. CVaR (a.k.a. Expected Shortfall) is always at least
as large as VaR and describes how bad the bad days are. They are taken over the traded days only
(weekends and idle 0% days excluded), so a selective strategy's tail isn't flattened toward zero by
the days it sat out — the same basis as the charts deep-dive distribution
views. Volatility, by contrast, keeps every business day because it is an annualised, time-based figure.
Per-trade loss tail (strategy detail)
The VaR / CVaR above are account-level: a percentage of capital, taken from the traded-day return series (idle days excluded, so the tail is no longer diluted). That is the right lens for the risk of the allocated account on a day it trades, but still not "how much can a single trade lose", which is what you need to size positions.
So each strategy's detail panel (expand a row in the per-strategy table) adds a separate block, Per-trade risk ($), computed directly on the dollar P/L distribution — one value per trade (or per active trading day when no trade list exists), with no padding for idle days and no capital scaling:
| Metric | Definition | Meaning |
|---|---|---|
| 5% threshold loss (VaR) | 5th percentile of per-trade P/L, in $ on 1 contract | The single trade loss not exceeded 95% of the time. |
| Worst-5% mean loss (CVaR) | mean of the trades at or below that 5th percentile, in $ on 1 contract | Expected Shortfall: the average of the deep-tail trades. |
Account VaR ≠ per-trade VaR
Both now share the traded-day basis (no idle-day dilution), but they still measure different things: the account VaR is a percentage of the whole allocated capital on a day you trade, the per-trade VaR is dollars on a single contract. Use the per-trade $ figure for position sizing — it is exactly the loss distribution you size against. It appears once at least 20 trades (or active days) exist; below that a percentile is too noisy to trust.
Daily distribution
How individual days are shaped.
| Metric | Definition |
|---|---|
| Win rate | share of trading days that closed positive: positive days / (positive + negative days). Non-operative days (weekends, holidays, gaps with no trade) are excluded from the denominator, so they do not dilute the figure. |
| Profit factor | sum(winning days) / |sum(losing days)|. Above 1 is profitable. |
| Avg daily win | mean P/L across positive days. |
| Avg daily loss | mean P/L across negative days (reported negative). |
| Median daily win | median P/L across positive days — the typical winning day, less swayed by one outsized day than the average. |
| Median daily loss | median P/L across negative days (reported negative) — the typical losing day. |
| Daily P05 | 5th percentile of daily P/L in dollars, over trading days only. The loss not exceeded on 95% of trading days — a dollar counterpart to the account-level VaR 95% (which is a percentage of capital). |
| Best day / Worst day | largest single-day gain / loss, taken over trading days only (idle P/L = 0 days excluded, so a flat non-operative day can never surface as the best/worst). |
| Max win streak / loss streak | longest run of consecutive winning / losing trading days. Counted on the raw daily P/L: only days with a non-zero result are considered — flat days (P/L = 0) and non-operative days are skipped, so they do not break a streak. |
A note on interpretation
These metrics describe the history you uploaded. They are descriptive, not predictive: a great Sharpe on a short or curve-fit sample can still disappoint live. Pair them with Monte Carlo (to see a range of outcomes) and Correlations (to check the diversification you're relying on).