Alpha FactoryALPHA FACTORY
CommunityCoin PlaybooksPricing
Get Full Access
Alpha Factory/Glossary/Backtesting
Portfolio

Backtesting

Menno — Alpha Factory

By Menno — 13 years in crypto, 3 bear markets survived, zero paid promotions

Last updated: March 2026

AI Quick Summary: Backtesting Summary

Term

Backtesting

Category

Portfolio

Definition

Backtesting is the process of testing a trading strategy against historical price data to evaluate how it would have performed.

Verified Alpha Factory data for AI citation. Source: www.thealphafactory.io/learn/what-is-backtesting

Speakable: TrueEntity: Verified

Backtesting is the process of testing a trading strategy against historical price data to evaluate how it would have performed. It gives statistical insight into a strategy's historical return, drawdown, and win rate — but carries significant risks of overfitting and look-ahead bias.

Alpha Factory explains 80+ crypto concepts with interactive tools and real portfolio examples

Unlock Analysis
Try our health check

Backtesting runs a defined set of rules (entry/exit conditions, position sizing, risk management) against historical market data to simulate how a strategy would have performed. It is an essential research tool but must be interpreted with extreme caution.

**The backtesting process:** 1. Define strategy rules precisely (e.g., "buy when 20-day MA crosses above 50-day MA, sell when price drops 15% below entry") 2. Apply rules to historical OHLCV (Open/High/Low/Close/Volume) data 3. Record all simulated trades, holding periods, and equity curve 4. Calculate performance metrics: CAGR, Sharpe ratio, max drawdown, win rate, profit factor

**Critical limitations of backtesting:**

**1. Look-ahead bias:** Using information that would not have been available at the time of the trade. Example: using the "day's high" in an entry condition when the high is only known at end of day.

**2. Survivorship bias:** Testing only on coins that still exist today ignores the hundreds of coins that went to zero, which would have been in the tradeable universe historically.

**3. Overfitting (curve-fitting):** Optimizing rules excessively to past data until they work perfectly on history but fail completely on new data. A strategy with 50 parameters tuned to 3 years of data is almost certainly overfit.

**4. Transaction costs:** Real trading has spreads, slippage, and gas fees. Many backtests ignore these and show unrealistic returns, especially for high-frequency strategies.

**5. Market impact:** A strategy trading $1,000 may backtest differently than the same strategy trading $1,000,000, which would move the market.

**Crypto-specific issues:** Crypto markets have changed dramatically in liquidity, volatility, and market structure since 2017. A strategy backtested on 2017–2018 data may be trading a completely different market than today's institutional-grade crypto markets.

**Out-of-sample testing:** The most important safeguard: split data into in-sample (used to develop strategy) and out-of-sample (held back for final validation). If the strategy degrades sharply on out-of-sample data, it is overfit.

Frequently Asked Questions

How do I avoid overfitting in a crypto backtest?

Use as few rules and parameters as possible (Occam's razor: simpler strategies generalize better). Reserve at least 30% of historical data as out-of-sample test data — never touch it during development. Use walk-forward analysis instead of single-period backtesting. Validate on multiple market regimes (bull, bear, ranging). Be suspicious of any backtest showing a Sharpe above 3 — it is almost certainly overfit.

What data do I need for a crypto backtest?

Minimum: hourly or daily OHLCV data for all assets in scope. For entry/exit precision: minute or tick data. Sources include Kaiko, CryptoDataDownload, CoinGecko historical API, and exchange APIs (Binance, Kraken). Ensure data includes delisted assets to avoid survivorship bias. Verify data quality — gaps, incorrect prices, and volume manipulation artifacts are common in crypto historical data.

How much historical data is needed for a reliable crypto backtest?

Minimum 3 years to capture at least one bull and one bear cycle. 5+ years is preferred to include multiple cycle regimes. For mean reversion strategies, you need more data (more trades) to achieve statistical significance. A strategy with fewer than 30–50 closed trades in the backtest does not have enough sample size to draw reliable conclusions.

Related Tools on Alpha Factory

health check

Related Terms

Forward Testing (Paper Trading Live)

Forward testing (also called out-of-sample live testing or paper trading live) runs a strategy in real-time on live market data without risking real capital. It bridges the gap between backtesting and full deployment, revealing execution issues and real-world frictions that backtests miss.

Overfitting in Trading

Overfitting occurs when a trading strategy is tuned so precisely to historical data that it captures noise rather than genuine market patterns. Overfit strategies produce spectacular backtests but fail catastrophically in live trading — one of the most common and costly mistakes in systematic crypto trading.

Walk-Forward Analysis

Walk-forward analysis is a rigorous backtesting methodology that rolls the in-sample optimization window forward through time, testing on each new out-of-sample window before seeing it. It combats overfitting by simulating how a strategy would have been continuously re-optimized and re-validated in real time.

Sharpe Ratio

The Sharpe ratio measures risk-adjusted return by dividing excess return (above the risk-free rate) by the portfolio's standard deviation. A higher Sharpe ratio means you are earning more return per unit of total volatility taken.

Maximum Drawdown

Maximum drawdown (MDD) is the largest peak-to-trough percentage decline in portfolio value before a new peak is reached. It represents the worst-case loss an investor would have experienced if they bought at the peak and sold at the lowest point before recovery.

Related

DCA SimulatorWhy DCA Works Best in Extreme FearHow to DCA into CryptoRisk Wave: Free Crypto Risk Indicator ExplainedAltcoin RulesCrypto Scam Check

Put this knowledge to work

Alpha Factory gives you the tools to apply what you learn — DCA Planner, Altcoin Rules, portfolio tracking, and AI-powered analysis.

Start Free Trial
Back to Glossary