Trading research

Backtest Metrics Calculator

Sharpe, Sortino, max drawdown, Calmar and recovery time from a return series.

Runs entirely in your browser · Nothing is sent or stored · No signup

One value per period, separated by commas, spaces or new lines. Nothing leaves your browser.

Assumptions

Annualisation assumes independent periods. Autocorrelated returns overstate Sharpe.

%/yr
Educational tool. It performs arithmetic on numbers you supply. It is not financial advice, evaluates no strategy, and makes no recommendation. Past performance — real or simulated — does not indicate future results.

Sharpe ratio (annualised)

4.62

30 periods · 0.12 years

Return

Total return11.9%
CAGR157.2%
Best period2.4%
Worst period-2.3%

Risk

Annualised volatility20.1%
Sortino7.75
Max drawdown-2.3%
Calmar68.36
Longest underwater run5 periods
Time underwater61%

Trade profile

Win rate67%
Average win1.1%
Average loss-1.1%
Profit factor2.02

Educational tool

This calculates statistics from numbers you provide. It is not financial advice, it evaluates no strategy, and it makes no recommendation. Past performance does not indicate future results.

Reading the output#

Sharpe is the headline and the most misused. It assumes returns are roughly normal; strategies with occasional large losses look better on Sharpe than they deserve.

Sortino penalises only downside deviation, which is usually closer to what you care about.

Max drawdown is what people actually abandon strategies during. A strategy with a 40% drawdown and an excellent Sharpe is one most people would not hold through.

Time to recovery is the number nobody reports and everybody feels. Two years underwater ends most conviction regardless of the eventual outcome.

The annualisation assumption#

Annualisation multiplies by the square root of the number of periods per year. That assumes returns are independent across periods. For strategies with autocorrelated returns — trend following especially — annualised Sharpe is overstated. Set the periods per year to match your data.

Related reading

AlgoStrategy

Why Most Backtests Lie

Backtests fail in a consistent direction — optimistic. Here are the five structural reasons, with a detection method for each. Educational research only.

IntermediateDifficulty: Intermediate2 min readPython · Polars
Trading Systems

Algorithmic Trading Backtest Lab

A backtesting framework with transaction costs, slippage, walk-forward analysis and survivorship-bias handling — designed to stop a strategy looking better than it is. Educational research only.

AdvancedDifficulty: Advanced~24h buildPython · Polars · DuckDB
Code
Market research

Does RSI Actually Work?

Testing the classic RSI(14) mean-reversion rule across 20 years and 500 instruments, with costs included and multiple-testing accounted for.

IntermediateDifficulty: IntermediatePython · Polars · DuckDB
NotebookDataset