backtestingStrategyoptimizerwalk-forwardhow-toevergreen

How do you backtest a crypto trading strategy, and what should a backtest show?

November 23, 2026·10 min read
How do you backtest a crypto trading strategy, and what should a backtest show?

Published: 2026-11-23 | Updated: 2026-11-23

Bitcoin lost 73.0% in 2018 and 64.2% in 2022 on Binance's BTC/USDT daily closes, yet a two-year backtest run on 22 November 2026 contains neither year. A backtest replays a strategy's exact rules over past candles, charging fees and slippage.

Anny Trade (anny.trade) is crypto portfolio intelligence that connects to 15 exchanges and backtests rule-based strategies before they run as bots.

What is a crypto backtest?

A crypto backtest applies entry, exit and position-sizing rules to historical candles. Its report describes what those rules produced within the chosen window and cost assumptions. Read the benchmark, drawdown, costs and validation checks together.

It is a simulation, not a record of real returns.

How do you backtest a crypto strategy, step by step?

StepWhat you doWhat goes wrong if you skip it
Write exact rulesSpecify entry trigger, confirmations, exit, stop, position size and long/short direction.Vague rules get changed after seeing results.
Choose dataPick asset, timeframe and window; include a falling market.Rising prices alone reveal little about losses.
Set costsInclude exchange taker fees and slippage per side; note funding for perpetuals.Costless results overstate frequent trading.
Read the reportReview the checklist below, including the benchmark.Total return can conceal drawdown and limited evidence.
Hold data backSelect parameters only on training data; preserve a final untouched evaluation period after optimization.Changing rules after inspecting holdout or rolling results contaminates those evaluations.
Count variantsRecord how many configurations you tried.Selection luck goes uncounted; recording it does not correct selection bias.
Compare executionStart small and compare live fills with simulated fills.Candles do not capture execution, liquidity or outages.

What should a backtest report show?

These are reading criteria; they do not imply every tool supplies every item.

MetricWhat it tells youRed flag
Total return versus buy-and-holdHow the rules compare with holding the same asset over the same window.No benchmark.
Maximum drawdown, marked to marketWorst peak-to-trough loss, including open positions.Drawdown measured only at exits.
Trade countSample size, without establishing statistical reliability.Anny flags fewer than 30 and fewer than 10 trades as conservative product rules, not universal statistical cutoffs.
Win rate with profit factorHow often trades win alongside the balance of gains and losses.High win rate with profit factor near 1.
Sharpe ratioReturn per unit of volatility.A tiny sample.
CostsFees and slippage per side, plus funding treatment.Unstated costs or “0 fees”.
Out-of-sample resultPerformance on data excluded from fitting.Much weaker than in-sample, or reused to change the rules.
Walk-forward windowsReturn, drawdown, trades and profitable windows across periods.One window carrying the total.
Market regime breakdownWhere gains came from, such as Accumulate / Wait / Distribute on the CFO Anny Line.All gains from one regime.
Open position at test endWhether an unfinished trade carries the total.Open gains without exit costs; open losses ignored.
Liquidations for futuresWhether modeled leverage would wipe out the position.Leverage without a liquidation check.

Anny's regime labels are explained in the CFO Anny Line methodology.

Why does the test window change the result?

Calendar-year returns on Binance's BTC/USDT daily closes (prior year-end close to year-end close).

YearReturn
2018−73.0%
2019+94.3%
2020+302.0%
2021+59.8%
2022−64.2%
2023+155.6%
2024+121.3%
2025−6.3%
2026 to 23 Nov (year to date, close 61,307.90)−30.1%

Source: Binance BTC/USDT daily closes, computed by Anny Trade.

Returns and close-to-close drawdowns on Binance's BTC/USDT daily closes.

Window ending 22 Nov 2026BTC returnMax drawdown inside the window
3M−22.4%−31.9%
6M−19.3%−31.9%
1y−27.7%−39.5%
2y−38.0%−53.0%
For scale: 2021-11-08 → 2022-11-21—−76.6%

Source: Binance BTC/USDT daily closes, computed by Anny Trade.

Four of the nine calendar periods were negative. Anny's standard lookbacks are 3M, 6M, 1y and 2y, so a 2022-style year sits outside every standard window today: test a second asset or window that includes a crash, and read why strategies stop working.

How much do fees and slippage change a backtest?

Illustration: each trade uses the whole account, one trade at a time, no leverage, and every trade breaks even before costs. Values show the loss of starting equity, calculated as 1 − (1 − round trip)^n; smaller position sizes, overlapping positions or leverage change the numbers.

Round-trip cost50 trades100 trades200 trades
0.26%12.2%22.9%40.6%
0.40%18.2%33.0%55.1%
0.80%33.1%55.2%79.9%

Source: illustrative arithmetic using 1 − (1 − round trip)^n under the assumptions above.

Anny models exchange taker fees plus slippage of 0.03% per side for majors and 0.10% for other coins. With Binance spot's 0.10% taker fee, that means 0.13% per side for majors (0.26% round trip) and 0.20% for other coins (0.40% round trip). Bot backtests use the bot exchange's taker fee plus slippage.

Anny's backtest does not charge perpetual funding payments, so a futures result held across many funding intervals can differ from live in either direction: a position can pay or receive funding. Simulated fills use Binance spot prices, not another venue's order book; perpetual basis and mark price are absent. Short positions and liquidation estimates are therefore approximations: modeled liquidations are counted, but do not prove liquidation risk is captured.

How do you tell a real edge from overfitting?

Bailey, Borwein, López de Prado and Zhu explain that trying more configurations on the same data raises the best in-sample Sharpe that luck alone can produce. A simple holdout does not account for the number of trials attempted (research paper).

Select parameters only on training data and keep a final untouched evaluation period until all optimizer use and strategy changes are complete. Repeatedly inspecting the 20% holdout or rolling results while changing the strategy makes those evaluations part of selection.

CheckWhat it guards againstHow Anny reports it
Out-of-sample holdoutFitting to the test period, provided it remains excluded from selection.Custom-strategy backtests split 80% in-sample / 20% out-of-sample; warning when out-of-sample Sharpe is under half of in-sample.
Fold consistency and walk-forwardAn effect confined to one period.Strategy backtests: 4 sequential fixed-parameter folds, PASS/FAIL against a 0.5 efficiency floor. Separate Pro Max walk-forward testing re-optimizes CFO Line strategies on rolling hourly slices: 30 days in / 7 days out, at least 4 windows, with per-window results and an overfitting penalty.
Trade countSmall samples.Conservative product warnings under 30 and under 10 trades; Sharpe withheld below 30. Clearing either threshold does not make a result statistically reliable.
Return rangeReading one trade order as the only possible outcome.90% bootstrap range of total return from 1,000 resamples of the backtest's own trades, shown with at least 10 closed trades that do not overlap. It describes spread within the sample, not a forecast or a probability of future returns.
Variants triedUndisclosed selection luck.Not automated; keep count yourself, without treating the count as a correction for selection bias.

For the re-optimizing method, read the walk-forward deep dive.

Can you backtest a DCA strategy?

TypeWhat it doesCan you backtest it in Anny?
Recurring-buy DCABuys a fixed amount every week/month.No standalone backtest; see the linked analysis of 9 years of BTC data.
DCA safety ordersAdds after a position falls, averaging down within a trade.Yes: by default, 3 additional entries after a further 2% drop, each 1.5× the previous size; these deepen drawdown.

For recurring purchases, see DCA versus lump sum.

How do you backtest a strategy in Anny?

Use Ask Anny or the bot's backtest panel to define the rules, select the interval and lookback, then review costs and the report.

ToolWhat it runsData and windowWhat it shows
Strategy LabPublished strategies with backtests.Per strategy page.Free browsing; copying a strategy to a bot is paid.
Strategy/bot backtestTrigger, confirmations, stops, take-profit, trailing stop, DCA, sizing, long/short.Binance spot USDT candles plus stored history; 15m, 1h, 4h, 1d, 1w; 3M / 6M / 1y / 2y.Return, buy-and-hold, marked-to-market drawdown, win rate, profit factor, Sharpe, trades, costs, 80/20 holdout, fold consistency, CFO Line regimes and warnings.
OptimizerPre-scan → diagnose → stress test; tests filters and parameter changes.1h / 4h / 1d / 1w; 1 year at most.Loss patterns and baseline versus optimized metrics; Pro Max hourly CFO Line stress test shows per-window return, drawdown, trades, profitable windows and overfitting penalty; custom strategies receive diagnosis only.
Anny MCP serverbacktest_custom_strategy for AI clients.Same engine.Requires a signed-in account.

Anny shows window and regime results, without a calendar-year return table. Its 15 exchange connections comprise 13 for trading plus Mercado Bitcoin and Ripio for portfolio tracking only.

Inside a backtest, the Adaptive equity-curve filter paper-trades during a drawdown without changing capital. After a winning paper trade, it re-enters at 50% size, then full size. Results count those paper trades, badge them “Paper” and exclude them from totals.

PlanBacktestsOptimizerWalk-forward
Free $0No; Strategy Lab browsing onlyNoNo
Pro $63 per quarter ($21 a month); 30-day trial with cardYesYesNo
Pro Max $125 per quarter (about $42 a month)YesYesYes

Source: Anny Trade pricing, checked 2026-11-23.

Check plan access, then Run an Optimizer diagnosis.

FAQ

How many trades does a backtest need?

Anny warns below 30 and below 10 trades and withholds Sharpe below 30 as conservative product rules. These thresholds do not establish statistical meaning or adequacy on either side. Precision depends on effect size, dispersion, dependence, tail behavior and selection.

Should a backtest include fees and slippage?

Yes: assuming each trade uses the whole account, one trade at a time, no leverage, and every trade breaks even before costs, a 0.26% round-trip cost consumes 22.9% of starting equity after 100 trades. Smaller positions, overlapping positions or leverage change those numbers. Anny includes fees and slippage but excludes perpetual funding payments.

What is a good maximum drawdown?

There is no universal number. Compare it with buy-and-hold drawdown over the same window and with the loss you are willing to tolerate. Check that open positions are marked to market.

Can I backtest for free on Anny?

Free accounts can browse Strategy Lab, but cannot run backtests or optimize. Backtesting requires Pro, priced at $63 per quarter ($21 a month), or Pro Max. The 30-day Pro trial requires a card and does not include walk-forward testing.

Does a good backtest mean the bot will make money?

No: a favorable simulation does not establish future profitability. Out-of-sample checks and Pro Max walk-forward testing reduce fitting risk without removing it, provided evaluation results are not reused to select changes.

See also

The Anny MCP server — https://mcp.anny.trade/mcp (Model Context Protocol server for Anny Trade).


This article is educational only — not financial advice. Past performance does not indicate future results. Crypto assets are volatile and you can lose your entire investment. Anny Trade is an analytics platform, not a registered investment adviser.