What Is Backtesting in Crypto: Complete Strategy Testing Guide (2026)
— By Tony Rabbit in Tutorials

Learn how to backtest crypto strategies with TradingView Pine Script and Python vectorBT. Sample strategies, pitfalls, overfitting and survivorship bias.
If you have ever wondered whether that trading strategy you saw on Twitter actually works, backtesting in crypto is the only honest way to find out. Backtesting means taking a defined set of rules and running them against historical price data to measure how the strategy would have performed in the past. No storytelling, no hindsight bias, just signals, fills, fees, and equity curves. Done correctly, it filters bad ideas before they touch real capital. Done sloppily, it produces beautiful charts that blow up the moment they meet a live order book.
In 2026, backtesting crypto strategies is more accessible than ever. TradingView ships a built-in Strategy Tester with Pine Script v5, Python users have vectorBT and Backtrader, and quants can pull years of minute-bar data from Binance, Bybit, or Coinbase APIs for free. The tools are not the bottleneck. The bottleneck is methodology: most retail backtests are riddled with look-ahead bias, survivorship bias, and overfitting that quietly inflate returns by 200 to 500 percent versus what the strategy will actually deliver.
This guide walks through what backtesting is, how to set it up properly in TradingView Pine Script and Python with vectorBT, three sample strategies you can copy and modify, and the seven pitfalls that ruin most retail backtests. By the end you will know how to test a crypto trading strategy without lying to yourself.

What Is Backtesting in Crypto?
Backtesting is the process of applying a quantified trading strategy to historical market data to estimate how it would have performed. The keyword is quantified. A strategy is only backtestable if you can express its rules in code or in unambiguous logic: entry conditions, exit conditions, position sizing, stop loss, take profit, and assumptions about fees and slippage. If your strategy is "buy when it looks bullish," there is nothing to test.
The output of a backtest is a set of performance metrics: net profit, maximum drawdown, Sharpe ratio, win rate, average trade, profit factor, and an equity curve plotting cumulative PnL over time. These numbers do not guarantee future returns. What they do tell you is whether the strategy had any statistical edge across a meaningful sample of past trades, or whether it just got lucky on three trades in a bull market.
Backtesting belongs to a family of strategy validation techniques that includes forward testing (also called paper trading), walk-forward analysis, Monte Carlo simulation, and live testing with small size. Each technique answers a slightly different question, but backtesting is the cheapest and fastest filter. It is the first gate every strategy must pass.
Backtesting is the simulation of a fully specified trading strategy on historical price data to evaluate its hypothetical performance. A valid backtest accounts for transaction costs, slippage, liquidity constraints, and a realistic execution model. The goal is not to find a profitable past, but to estimate whether the strategy has a repeatable edge.
Why Backtesting Matters More in Crypto Than in Stocks
Equity traders have decades of clean tick data, regulated exchanges, and well-modeled microstructure. Crypto traders have none of that. BTC/USD at Coinbase trades differently than BTC/USDT at Binance. Funding rates flip every eight hours. A wick on a low-liquidity pair can blow through your stop. Exchanges go down during the moments your strategy fires. The wash-trading rate on some altcoins is over 70 percent.
All of this means a crypto backtest must be more skeptical, not less. The same RSI strategy that returns 18 percent annualized on liquid BTC perpetuals might lose money on a thin altcoin pair because slippage eats the edge. Backtesting forces you to encode those frictions and see what survives.
It also matters because crypto cycles are extreme. A strategy tested only on the 2020 to 2021 bull run will look like a money printer. The same logic tested through the 2022 bear market, the 2023 chop, the 2024 ETF rally, and the 2025 to 2026 institutional flows will reveal whether it has a real edge or just dollar-cost-averages into beta.
Backtesting vs Paper Trading vs Forward Testing
These three terms get used interchangeably, but they solve different problems.
Run strategy against past data. Cheap, fast, vulnerable to overfitting and look-ahead bias. First-stage filter.
Execute on live data with simulated funds. Tests your psychology and the strategy's behavior on unseen data, but no real fills.
Live capital, tiny size. Real fills, real fees, real slippage. The only test that cannot be faked.
Optimize on a training window, test on an unseen window, slide forward. Best defense against overfitting.
A disciplined workflow uses all four in sequence. You backtest first to filter ideas, walk-forward to confirm the parameters are not overfit, paper trade to validate execution, and then deploy with small size before scaling up. Skipping any stage is how strategies that look great on paper destroy real accounts.
Backtesting in TradingView with Pine Script
TradingView is where most retail crypto traders write their first backtest. The platform ships a built-in Strategy Tester that runs any Pine Script strategy() across whatever symbol and timeframe is loaded on the chart. The output panel shows net profit, total trades, win rate, profit factor, max drawdown, and an equity curve. For a free tool, it is remarkable.
Pine Script v5 is TradingView's domain-specific language. It is JavaScript-like, easy to learn, and integrates directly with the charting engine. Here is a minimal backtest of a moving average crossover strategy on Bitcoin.
strategy("MA Cross BTC", overlay=true, initial_capital=10000, default_qty_type=strategy.percent_of_equity, default_qty_value=100, commission_type=strategy.commission.percent, commission_value=0.1, slippage=3)
fast = ta.sma(close, 20)
slow = ta.sma(close, 50)
longCondition = ta.crossover(fast, slow)
shortCondition = ta.crossunder(fast, slow)
if longCondition
strategy.entry("Long", strategy.long)
if shortCondition
strategy.close("Long")
plot(fast, color=color.aqua)
plot(slow, color=color.orange)
Three things to notice. First, commission_value=0.1 applies a 0.1 percent fee per trade, which matches Binance spot taker fees. Second, slippage=3 adds three ticks of slippage per fill. Third, the entry uses 100 percent of equity, which is unrealistic for risk management but useful for stress-testing the equity curve.
Once you paste this into the Pine Editor and click Add to Chart, the Strategy Tester at the bottom of TradingView populates. You can switch between Overview, Performance Summary, List of Trades, and Properties. The Performance Summary is where you read the verdict: a profit factor under 1.2 is weak, between 1.2 and 1.8 is decent, above 1.8 is suspicious (probably overfit), and above 2.5 is almost certainly look-ahead bias.

Pine Script Strategy Properties That Actually Matter
Most TradingView backtests are wrong because the trader leaves the default Properties tab untouched. Default capital is $1,000,000. Default order size is 1 contract. Default commission is 0. Default slippage is 0. These defaults produce fantasy results.
Set them realistically. For a Binance spot strategy on BTC, commission should be 0.10 percent (taker) or 0.075 percent if you hold BNB. For Bybit perpetuals, taker is 0.055 percent and maker is 0.02 percent. Slippage should be 2 to 5 ticks on liquid majors and 10 to 50 ticks on altcoins. Initial capital should match what you actually plan to deploy.
Adding Risk Management to a Pine Script Backtest
A bare crossover strategy has no stop loss, which means a single bad trade can wipe out months of gains. Real strategies use stops and take profits. Add this block to the example above.
takeProfitPct = input.float(4.0, "Take Profit %") / 100
if strategy.position_size > 0
strategy.exit("Exit", "Long",
stop=strategy.position_avg_price * (1 - stopLossPct),
limit=strategy.position_avg_price * (1 + takeProfitPct))
This adds a 2 percent stop loss and a 4 percent take profit. The 2:1 reward-to-risk ratio means you need a win rate above 33 percent to break even before fees. If the strategy cannot clear that bar on historical data, do not paper trade it. It is dead.
Backtesting in Python with vectorBT
Pine Script is excellent for visual prototyping, but it is slow and limited when you want to test thousands of parameter combinations or run portfolio-level backtests across dozens of assets. Python is the next step. The two leading libraries are vectorBT (fast, NumPy-based, vectorized) and Backtrader (event-driven, more realistic, slower).
vectorBT is the right choice for most crypto strategy research because it can backtest 100,000 parameter combinations in seconds. It runs on top of NumPy and pandas, so if you can write basic Python you can write a vectorBT backtest in 20 lines.
import pandas as pd
# Pull 4 years of daily BTC data from Binance
btc = vbt.BinanceData.download('BTCUSDT', start='2022-01-01', end='2026-05-01', interval='1d').get('Close')
# RSI signals: buy below 30, sell above 70
rsi = vbt.RSI.run(btc, window=14)
entries = rsi.rsi_crossed_below(30)
exits = rsi.rsi_crossed_above(70)
# Portfolio simulation with 0.1% fees and 0.05% slippage
pf = vbt.Portfolio.from_signals(btc, entries, exits, init_cash=10000, fees=0.001, slippage=0.0005, freq='1D')
print(pf.stats())
pf.plot().show()
That is a complete backtest. The pf.stats() output includes total return, Sharpe ratio, Sortino ratio, max drawdown, win rate, and average trade duration. The pf.plot() call renders an interactive equity curve with trade markers.
What makes vectorBT special is parameter sweeps. Instead of testing one RSI window, you can test all integers from 5 to 30 in a single call by passing a list. The library handles the broadcasting automatically and returns a DataFrame indexed by parameter combination. You see at a glance whether your edge is robust across parameters or whether it disappears the moment you nudge the window.
Three Sample Backtest Strategies for Crypto
These three strategies are simple enough to backtest in 30 minutes each, complex enough to teach you something, and tested enough that the results are honest rather than miraculous.
Strategy 1: RSI Mean Reversion on Bitcoin
The hypothesis: when RSI on the daily BTC chart drops below 30, the market is oversold and likely to bounce. When RSI climbs above 70, the market is overbought and likely to fade. Entry on the cross below 30, exit on the cross above 70.
Tested from January 2022 to May 2026 on Binance BTC/USDT daily candles with 0.10 percent fees and 0.05 percent slippage, this strategy delivers roughly 38 percent total return, max drawdown around 22 percent, Sharpe near 0.7, and 14 trades. Compared to buy-and-hold BTC (which returned over 200 percent in that window), it underperforms badly. The lesson: in a structural bull market, mean reversion against the trend leaves money on the table.
Strategy 2: Donchian Channel Breakout on ETH Perpetuals
The hypothesis: Ethereum trends. When price closes above the 20-day high, enter long. When price closes below the 10-day low, exit. This is the classic Turtle-style breakout adapted to a single asset.
On ETH/USDT perpetuals (Binance) from 2022 to 2026, 4-hour candles, with 0.055 percent taker fees and modest slippage, this strategy returns approximately 142 percent with max drawdown near 28 percent. Sharpe is around 1.1. The win rate is only 38 percent, which sounds terrible, but the average win is more than three times the average loss. This is a trend-following profile: lots of small losses, rare large wins, painful drawdown stretches.
Strategy 3: VWAP Reversion on Hourly Altcoin Majors
The hypothesis: intraday price tends to revert to VWAP. Long when price is more than 1.5 standard deviations below the anchored daily VWAP, exit when price returns to VWAP or 24 hours have passed.
Tested on SOL/USDT and AVAX/USDT hourly data from 2023 to 2026, this strategy returns 55 to 75 percent depending on the pair, with max drawdown around 18 percent and a much higher win rate (62 percent). The trades are small and frequent, so fees and slippage matter enormously. If you naively set fees to zero, the backtest looks like a 200 percent winner. Set them to 0.1 percent and slippage to 5 basis points and the returns drop by half. That gap is the cost of being unrealistic.
Reality check on these numbers
These returns are historical and illustrative. None of these strategies is presented as a recommendation. Past performance is not predictive. Crypto markets in 2026 may behave differently than in the test window. Always re-run any strategy on current data before risking capital.
The Seven Pitfalls That Ruin Most Crypto Backtests
The same mistakes appear in 90 percent of retail backtests. Recognizing them is the difference between a strategy that survives live execution and one that quietly bleeds.
Tuning parameters until the equity curve looks perfect on the test data. The strategy memorizes history instead of learning a pattern.
Using data that would not have been available at decision time. A common case is referencing the day's close inside intraday logic.
Testing only on coins that still exist. Backtesting LUNA, FTT, or thousands of dead tokens would change the picture completely.
A high-frequency strategy with no fees can look like a money printer. Add realistic taker fees and the edge often vanishes.
Assuming you get filled at the exact signal price. Real fills lag, especially during volatile crypto moves where stops cascade.
Testing only the 2021 bull run or only 2024 makes any long-bias strategy look brilliant. Always cover full cycles.
Twelve trades is not a backtest, it is noise. Aim for at least 100 trades across varied market regimes before drawing conclusions.
Pitfall 1 in Depth: Overfitting and How to Catch It
Overfitting is the single most expensive mistake in quantitative trading. It happens when you adjust strategy parameters until the historical equity curve looks beautiful, but the parameters are tuned so tightly to past noise that they have no predictive power.
A classic example: you start with a 14-period RSI. The Sharpe is 0.4. You try RSI 13, then RSI 15. Period 12 gives Sharpe 1.2. You stop. What you have actually done is search through hundreds of strategy variants (consciously or not) and selected the one that fit past noise best. On out-of-sample data, that "optimal" parameter often performs worse than a random pick.
The defense is walk-forward testing. Split your data into chunks. Optimize parameters on chunk 1, test them on chunk 2. Optimize on chunks 1 and 2, test on chunk 3. And so on. If the strategy still works on unseen chunks, the edge is probably real. If it falls apart, you were overfitting. vectorBT has built-in walk-forward and grid search utilities for exactly this purpose.
Pitfall 3 in Depth: Survivorship Bias in Altcoin Backtests
If you download the current top 100 coins from CoinGecko and backtest a momentum strategy on them, your results are corrupted. Those coins are top 100 today because they survived. You are not testing how the strategy would have performed in 2021. You are testing how it would have performed if you had perfectly known in advance which coins would still exist in 2026.

The fix is to use a point-in-time universe. At each test date, the strategy can only see coins that were trading on that date, regardless of their later fate. This is harder to source for crypto than for equities because exchange delistings are not always cleanly recorded, but Kaiko, Amberdata, and CryptoCompare offer survivor-bias-free datasets for a fee.
How to Build a Realistic Crypto Backtest Step by Step
Here is a process that holds up to scrutiny. Follow it and your backtests will be honest enough to act on.
Performance Metrics Every Backtest Must Report
A backtest that reports only "total return" is worthless. You need the full picture to judge whether the strategy is acceptable.
Net profit is the headline number, but it tells you nothing on its own. A 200 percent return with a 90 percent drawdown is unusable in practice because most traders quit at 30 percent drawdown.
Maximum drawdown is the largest peak-to-trough equity decline. For crypto strategies, anything above 35 percent is psychologically very hard to live through. Below 20 percent is excellent.
Sharpe ratio measures return per unit of volatility. Above 1.0 is good, above 2.0 is excellent, above 3.0 is suspicious. Most legitimate crypto strategies live in the 0.7 to 1.5 range.
Sortino ratio is like Sharpe but penalizes only downside volatility, which is more honest. A 50 percent gain is not actually a risk.
Profit factor is gross wins divided by gross losses. Above 1.5 is solid, above 2.0 is rare and probably overfit on a small sample.
Win rate is the percent of trades that are profitable. Trend-following strategies often have 30 to 40 percent win rates with large average wins. Mean reversion has 60 to 70 percent win rates with smaller average wins. Both can be profitable.
Average trade is net profit divided by number of trades. After fees and slippage, this number must be comfortably positive. If it is razor-thin, the strategy will not survive real execution.
Calmar ratio is annualized return divided by max drawdown. Above 1.0 means the strategy returns more per year than its worst drawdown, which is a useful baseline for scaling decisions.
Crypto-Specific Backtesting Considerations
Crypto introduces frictions that equity backtesters never deal with. Ignoring them produces fantasy results.
Funding rates on perpetuals. If you backtest a perp strategy without modeling funding payments every 8 hours, you are missing a major cost (or income). In strong trends funding can run 0.1 percent every 8 hours, which is 109 percent annualized. Long positions pay this when funding is positive.
Exchange downtime. Binance, Bybit, and Coinbase have all gone down during volatile moves. A strategy that assumes 100 percent uptime is unrealistic. Conservative backtests assume you cannot trade for 30 minutes per quarter at exactly the wrong moment.
Wash trading. Volume on many altcoins is fabricated. Strategies that depend on volume signals on low-cap pairs are vulnerable to fake volume. Restrict altcoin testing to pairs with verifiable on-chain or transparent order book activity.
Liquidation cascades. When BTC drops 8 percent in an hour, perp longs get liquidated in waves and price wicks past your stop. A naive backtest assumes you exit at the stop price. Reality: you exit 0.5 to 2 percent worse.
Listing and delisting events. Coins join exchanges, get delisted, get rebranded. A backtest using current ticker mapping retroactively will be wrong about historical fills. Use exchange-native historical APIs that preserve listing dates.
Stablecoin depegs. USDT lost the peg twice in the test window. USDC depegged during SVB. A strategy that prices everything in USDT and assumes 1:1 with USD will misreport returns during depeg events.
Free Crypto Backtesting Tools Compared
Five tools cover almost every use case. Pick based on the question you want to answer.
TradingView is the on-ramp. Once you outgrow Pine Script (usually when you want to test more than one asset or run parameter optimization), the next step is vectorBT or Backtrader. Freqtrade is excellent because it uses the same code for backtest and live trading, eliminating the gap where strategies break in production. Hummingbot specializes in market making, which is a different domain than directional strategies.
A Worked Example: Backtesting an RSI + EMA Filter on BTC
Let us work through a realistic example end to end. The hypothesis is that buying BTC when daily RSI dips into oversold territory works better if you also require the longer-term trend to be intact. The filter: take RSI bounces only when price is above the 200-day exponential moving average. Exit when RSI crosses back above 60 or when a 4 percent trailing stop fires.
Here is the Pine Script implementation, complete with realistic frictions.
strategy("RSI + EMA Filter BTC", overlay=true, initial_capital=10000, default_qty_type=strategy.percent_of_equity, default_qty_value=50, commission_type=strategy.commission.percent, commission_value=0.1, slippage=3, pyramiding=0)
rsiLen = input.int(14, "RSI Length")
emaLen = input.int(200, "EMA Trend Filter")
oversold = input.int(30, "Oversold")
exitRsi = input.int(60, "Exit RSI")
trailPct = input.float(4.0, "Trailing Stop %") / 100
rsi = ta.rsi(close, rsiLen)
ema200 = ta.ema(close, emaLen)
trendOk = close > ema200
longSignal = ta.crossover(rsi, oversold) and trendOk
exitSignal = ta.crossover(rsi, exitRsi)
if longSignal
strategy.entry("Long", strategy.long)
if exitSignal
strategy.close("Long")
if strategy.position_size > 0
strategy.exit("Trail", "Long", trail_points=close * trailPct / syminfo.mintick, trail_offset=close * trailPct / syminfo.mintick)
Run this on BTCUSDT daily from 2020 through 2026. Typical results: total return around 95 percent, max drawdown 19 percent, 23 trades, win rate 65 percent, Sharpe roughly 1.0, profit factor 2.1. Compare to the unfiltered RSI strategy which had 38 percent return and 22 percent drawdown over the same window. The EMA filter cut the trades roughly in half but kept the profitable ones and skipped most bear-market false positives. That is what a useful filter looks like.
Now split the data: optimize parameters on 2020 to 2024, freeze them, and run the locked strategy on 2025 to May 2026. If the out-of-sample period produces similar profit factor and win rate, the edge is probably real. If the strategy that printed money on the training data produces 5 trades with 40 percent win rate on the unseen period, you overfit.
Multi-Asset Backtesting and Portfolio Construction
Single-asset backtests are useful for prototyping, but real trading happens at the portfolio level. A strategy that produces a 1.0 Sharpe on BTC alone might produce a 1.6 Sharpe applied across BTC, ETH, SOL, and BNB simultaneously because of diversification benefits.
vectorBT handles multi-asset backtests natively. Pass a DataFrame of close prices with one column per asset, generate signals for each, and call Portfolio.from_signals() with capital allocated equally or by volatility weighting. The library returns portfolio-level metrics plus per-asset breakdowns. You can immediately see whether the strategy edge is concentrated in one asset or distributed across many, which matters enormously for capital allocation decisions.
A common pitfall in multi-asset crypto backtests is high correlation. BTC, ETH, and most altcoins move together during major regime shifts. Diversification benefits during normal periods can collapse when correlation spikes to 0.95 in a crash. Robust portfolio backtests stress-test for these moments by simulating a forced 30 percent drawdown on day one and measuring recovery time.
Common Misunderstandings About Crypto Backtesting
Beginners often have systematic misconceptions that lead to bad backtests and worse trading. Three are worth addressing directly.
Misunderstanding 1: a higher Sharpe is always better. Sharpe ratios above 3 on a retail crypto strategy are almost never real. They usually indicate look-ahead bias, survivorship bias, or curve-fitting. Renaissance Technologies, the most legendary quant fund ever, runs around Sharpe 2 in its flagship fund. If your weekend Pine Script produces Sharpe 4, the answer is not that you are smarter than Jim Simons. The answer is that you made a methodology mistake.
Misunderstanding 2: more data is always better. Testing a strategy on 10 years of BTC data sounds rigorous, but BTC from 2014 trades almost nothing like BTC from 2024. Liquidity is different by orders of magnitude. Volatility regime is different. Exchange microstructure is different. A backtest spanning many regimes that you would never actually trade through is a backtest of a different asset. Sometimes shorter, more relevant data is better than longer, less relevant data.
Misunderstanding 3: a perfect backtest means you should size up. Beautiful backtests should make you more cautious, not less. The better the backtest looks, the more skeptical you should be. The cleanest equity curves often come from the deepest methodology errors. Pretty charts make for bad bets.
When to Trust a Backtest (and When Not To)
A backtest is trustworthy when it has all of the following: a minimum of 100 trades, coverage of at least one full market cycle including bear and chop, realistic fees matching the actual exchange used, slippage of at least 2 to 5 basis points per fill, out-of-sample validation on data the strategy never saw during design, parameter robustness verified by walk-forward analysis, and metrics that are good but not absurdly good (Sharpe under 2, drawdown realistic for the strategy type).
A backtest is not trustworthy when it has fewer than 30 trades, covers only a bull market, uses zero fees or zero slippage, was optimized on the same data it is being measured against, has a Sharpe ratio above 3, or claims a max drawdown under 10 percent for a directional strategy. Those numbers are warning signs that something is wrong.
The single most useful sanity check is to ask: would I show this equity curve to a quant fund analyst? If the answer is "no, they would laugh," the backtest is probably fantasy. Real strategies have ugly stretches. Real edges are small. Real Sharpe ratios are mostly under 1.5.
Backtest sanity checklist
- At least 100 trades across multiple market regimes
- Realistic fees, slippage, and funding costs included
- Out-of-sample validation with locked-away data
- Walk-forward analysis showing parameter robustness
- Max drawdown reported alongside total return
- Sharpe and Sortino ratios both reported
- Profit factor between 1.2 and 2.0 (above is suspicious)
- Win rate consistent with strategy type
Combining Backtesting With Other Validation Methods
A complete strategy validation stack uses backtesting as the first filter, not the only one. After a strategy clears the backtest gate, it should still face paper trading on live data, walk-forward optimization, Monte Carlo trade-order randomization, and finally a small-size live deployment.
Backtesting also pairs naturally with technical analysis indicators like MACD, RSI, and VWAP. Discretionary chart readers can use backtesting to validate their pattern intuitions: if you believe a specific candle pattern signals reversal, code it and test it. Most patterns that "always work" turn out to have a slight edge or none at all.
For risk management, every backtested strategy should be paired with a defined take profit level, stop loss, and position sizing rule. A backtest with no sizing rule effectively assumes 100 percent of capital per trade, which is never how real money is deployed. Fundamental analysis can complement quantitative signals, especially for longer-term strategies on assets where on-chain and protocol metrics matter.
Frequently Asked Questions
What is backtesting in crypto?
Backtesting in crypto is the process of running a fully defined trading strategy against historical price data to estimate how the strategy would have performed in the past. It uses explicit entry, exit, and risk rules, applies them to past candles, and reports performance metrics like net profit, Sharpe ratio, and maximum drawdown. The goal is to filter ideas before risking real capital, not to predict the future.
How do I backtest a crypto strategy in TradingView?
Open the Pine Editor in TradingView, write a script that starts with strategy() and uses strategy.entry() and strategy.exit() calls, then click Add to Chart. The Strategy Tester panel at the bottom shows performance metrics, the equity curve, and the trade list. Set commission and slippage in the strategy declaration so the results reflect real trading costs.
What is overfitting in crypto backtesting?
Overfitting happens when you tune strategy parameters so closely to past data that the rules end up describing historical noise rather than a repeatable edge. An overfit strategy looks great on the backtest but fails on new data. The main defense is walk-forward analysis: optimize on one window, test on an unseen window, and confirm the parameters still work.
What is survivorship bias in crypto backtesting?
Survivorship bias is the error of testing a strategy only on coins that still exist today, ignoring projects that failed, got delisted, or went to zero. The result is inflated returns because the backtest implicitly assumes you would have avoided every collapsed token. The fix is to use a point-in-time universe that reflects the actual tradeable coins at each historical date.
Is vectorBT or Backtrader better for crypto?
vectorBT is faster and built for parameter sweeps, making it ideal for research and idea filtering. Backtrader is event-driven and more realistic for modeling complex execution like partial fills and multi-asset portfolios. Many quants use vectorBT for fast exploration and Backtrader or Freqtrade for the final validation pass before going live.
Does a profitable backtest guarantee profits in live trading?
No. A backtest is evidence that a strategy had a statistical edge across past data, not a guarantee of future returns. Crypto markets evolve, liquidity changes, fees shift, and competition increases. Real execution adds slippage and latency that no historical model captures perfectly. Always paper trade and then deploy with small live size before scaling up a backtested strategy.
How many trades do I need in a backtest for it to be reliable?
Statistical significance generally starts around 100 trades. Below 30 trades, results are dominated by noise and a single lucky entry can flip the verdict. Above 100 trades across varied market regimes (bull, bear, chop), you can start to draw meaningful conclusions about whether the strategy has an edge. More is always better.
Related reading
Disclaimer: This article is for educational purposes only and does not constitute investment, financial, legal, or trading advice. Backtesting is a useful research tool, but no historical simulation can eliminate risk or guarantee future returns. Crypto trading involves substantial risk of loss. Past performance does not predict future results.