Guides · the basics

How to backtest a trading strategy for free

By Dhananjay Gambhir · 29 September 2026 · 7 min read

A backtest replays your trading rules over past prices and shows what would have happened: every trade, the profit or loss, and how bad the worst stretch got. Done honestly, it is the cheapest way to find out that an idea doesn’t work before it costs you money. You don’t need to pay for software to do it. You need clear rules, good data, and the discipline not to flatter yourself.

1. Write the rules so a computer could follow them

“Buy the dip” is not a rule. A rule says exactly when you enter, when you exit, where your stop is, and how much you put in. If two people could read it and trade differently, it isn’t ready.

Too vague

Buy Bitcoin when it looks oversold and sell when it bounces.

Testable

On daily candles, buy when the 14-day RSI closes below 30. Sell when it closes above 55, or if the price falls 8% from entry. Use 25% of the account per trade.

2. Choose the market, the candles and the period

Test on the market you would actually trade, on the candle size you would actually use. Then pick a period long enough to include both rising and falling markets: at least two or three years for daily candles. A strategy tested only in a bull run will look brilliant and tell you nothing.

3. Count every cost

This is where most free backtests quietly go wrong. A realistic test includes:

  • Trading fees on every entry and exit.
  • Slippage: the gap between the price you wanted and the price you got.
  • Funding, if you trade perpetual futures: a payment every eight hours for as long as you hold.
  • A realistic fill. A signal from a candle’s close can only be traded at the next candle’s open. Filling at the close that gave the signal is impossible in real life, and it flatters every result.

How much does it matter? In our 90% win rate test, the same rules made +33.6% with those shortcuts and +18.6% without them.

4. Run it: the free options

WayGood forWatch out for
By hand on a chart (bar replay)Learning how a setup behavesSlow, and easy to “see” trades you would never have taken
A spreadsheetSimple daily strategiesFees, funding and stops are fiddly to get right
Python (backtrader, vectorbt)Anything, if you codeYou build the cost model yourself, and mistakes are silent
TradingView Strategy TesterStrategies written in Pine ScriptCheck its fill and cost settings before trusting the numbers
AI BacktesterDescribing a strategy in plain English to Claude or ChatGPTThe free plan covers daily candles on BTC, ETH and SOL, 50 backtests a month

With AI Backtester you connect your AI app once, then just describe the rules. Fees, slippage, funding and next-candle fills are always on:

You, to Claude

Backtest this on Bitcoin daily candles from 2022 to 2026: buy when the 14-day RSI closes below 30, sell when it closes above 55 or the price falls 8% from entry. Use 25% of the account per trade.

5. Read the result honestly

  • Compare it with just holding. A strategy that made +40% while the coin went up +200% lost to doing nothing.
  • Look at the worst drop (max drawdown), not only the final number. Could you have sat through it with real money?
  • Count the trades. Under about 30, the result can easily be luck.
  • Ignore the win rate on its own. What matters is how much the average win makes against how much the average loss costs. A strategy can win 93% of its trades and still barely make money.

6. Make sure it isn’t luck

Tweak a strategy’s settings enough times and one version will always look great on past data. To check you haven’t just fitted the past, keep the last stretch of history aside, tune on the rest, and only then test on the part it has never seen. Trying the same rules on a few other coins helps too. If the result falls apart, the edge wasn’t real.

AI Backtester does this split automatically: every report shows how the strategy did on the part it was tuned on, the part used to pick it, and the part it never saw.

7. Forward test before real money

A backtest only knows the past. Before risking anything, let the strategy run on new prices as they arrive, on paper, for a few weeks. If it behaves the way the backtest said it would, you have something worth considering. If not, you’ve lost nothing but time.

Test your own idea

Describe a strategy to Claude or ChatGPT in plain English and get the honest backtest back. Free to start, no card.

Start free
How to backtest a trading strategy for free — AI Backtester