# How to backtest a crypto strategy

> Backtest a crypto trading strategy step by step: write the rules, set real fees, run it on Binance spot or futures history since 2020 and read the report.

Guide · Janorium · Published 2026-10-20  
Web page: https://janorium.com/guides/how-to-backtest-a-crypto-strategy

To backtest a crypto strategy, write it as exact entry and exit rules, set realistic fees and slippage, replay it over historical Binance candles and compare the result with simply holding the coin. This guide walks through each step in Janorium — free, in the browser, without code — using a real backtest as the example.

## Step 0: write the idea as rules

A backtest can only test what is written down precisely. Before opening any tool, answer four questions about your idea:

1. **Market.** Spot, or perpetual futures with leverage and funding? Which coins, which timeframe?
2. **Entry.** The exact condition, with numbers: "the 50-period SMA crosses above the 200-period SMA", not "the trend turns up".
3. **Exit.** A take-profit, a stop-loss, an opposite signal, a time limit — or several of them.
4. **Size.** How much of the account goes into one trade.

If you are not sure the idea is precise enough, read [what backtesting is](https://janorium.com/guides/what-is-backtesting) first, or describe it in plain words to ChatGPT or Claude and let the assistant turn it into rules — [this guide](https://janorium.com/guides/build-a-strategy-with-ai) shows how.

## Run the backtest in six steps

1. **Create a free account.** [Sign up](https://janorium.com/register) — no card, no download. Everything runs on the server.
2. **Create the strategy.** Open Strategies → New strategy and pick a template close to your idea, start from a blank strategy, or choose "Write it with AI". The market — spot or futures — belongs to the strategy.
3. **Build the rules.** In the visual editor combine indicators (100+ of them, from RSI and moving averages to market structure, funding and open interest) with AND / OR groups, crosses and look-back windows, then add the exits. Under the hood the strategy is a JSON config, so nothing you write is code.
4. **Set the costs.** Fill in **Fees %** and **Slippage %** in the editor. Both start at 0, and a backtest without costs flatters every strategy — see the next section for realistic values.
5. **Choose what to test on.** Open New backtest, pick the strategy, one or more symbols and timeframes, the period (from 2020-01-01) and the initial capital (10,000 USDT by default). Each symbol × timeframe pair becomes its own backtest. For futures also set the leverage, the margin mode and whether to charge funding.
6. **Run and read the report.** Progress streams live; when a run finishes, its report shows the equity curve, every trade on the price chart, drawdowns, monthly returns and 60+ metrics.

> **Try a dry run first**
>
> The editor can dry-run a strategy and show where its rules fire before you spend a full backtest on it. A rule that never fires, or fires on every bar, is cheaper to catch there.

## Set realistic fees and slippage

Costs are charged on both sides of every trade, so a strategy that trades often pays them many times. As a starting point, use the exchange’s standard rates and add a little slippage:

| Market | Fee to enter (taker) | Slippage to start with | Also charged |
| --- | --- | --- | --- |
| Binance spot | 0.1% per side at the standard tier, at the time of writing | 0.02–0.05%; more on small coins | — |
| Binance USDT-M perpetuals | 0.05% per side at the standard tier (0.02% for maker orders), at the time of writing | 0.02–0.05%; more on small coins | Funding every 8 hours; liquidation if margin runs out |

Check the current rates for your account tier on the exchange’s fee page. When in doubt, round costs up: a strategy whose edge disappears at slightly higher fees had no edge. Janorium’s leaderboard ignores runs without fees for the same reason.

## A real example: the golden cross on BTC

Here is one backtest from the [golden-cross study](https://janorium.com/articles/golden-cross-top-20-crypto-2020-2025): hold BTC on Binance spot while the 50-day SMA is above the 200-day SMA and sell when it drops below, 2020-01-01 → 2026-01-01, 10,000 USDT, 0.05% fee and 0.05% slippage on every fill. The [full report](https://janorium.com/backtests/159) is public.

| Number | Value | What it says |
| --- | --- | --- |
| Total return | +529.12% | The strategy made money… |
| Buy and hold | +859.56% | …but simply holding BTC made more: the cross lost 330 percentage points to it. |
| Max drawdown | 57.11% | At the worst point the account was more than half below its peak. |
| Trades | 6 | Six trades in six years — too few to call the result a statistic. |
| Win rate · profit factor | 66.67% · 4.95 | Excellent-looking, and almost meaningless on six trades. |

This is the typical first backtest: a positive return that looks good until you put it next to buy and hold and count the trades. The next step is to find out whether anything survives a harder test.

## Check that the result survives

- **Compare with buy and hold.** The report shows it next to the return. A strategy that loses to holding has to earn its place some other way — a much smaller drawdown, for example.
- **Test more coins.** Run the same strategy on 10–20 symbols in one go. An edge that shows up on one coin only is usually luck.
- **Include dead coins.** "Take the symbols as of a past date" builds the list from the coins that were large back then, delisted ones included — today’s survivors make every long strategy look better.
- **Shift the start date.** "Test sensitivity to the start date" reruns the strategy from several starts; if the result swings, it was carried by one lucky stretch.
- **Raise the costs.** Double the fees and slippage. A real edge shrinks; a fragile one turns into a loss.
- **Compare runs side by side.** Put up to four runs next to each other with a significance test, and use the Monte Carlo tab to see the range of drawdowns luck alone could produce.

Which numbers to look at, and what counts as good, is the subject of the [guide to backtest metrics](https://janorium.com/guides/backtest-metrics-explained).

## Common mistakes and how to avoid them

| Mistake | Why it misleads | Fix |
| --- | --- | --- |
| Fees left at 0 | Every trade looks free; frequent strategies look brilliant. | Set Fees % and Slippage % before the first run. |
| One coin, one period | One bull market can carry any long strategy. | Test many coins and several start dates. |
| Only today’s coins | Survivorship bias: the coins that died are missing. | Use a universe taken as of a past date. |
| A dozen trades | Win rate and profit factor are noise on small samples. | Prefer rules and periods that produce dozens or hundreds of trades. |
| Tuning until it looks perfect | Overfitting: the parameters fit the past, not the market. | Keep a later period untouched and judge the strategy there. |
| Futures without funding | A long position in a hot market can pay more in funding than in fees. | Leave "Apply funding" on. |

## Frequently asked questions

### Can I backtest a crypto strategy for free?

Yes. Janorium is free: you create an account and run backtests in the browser on Binance spot and USDT-M futures history since 2020, without installing anything or paying for data. There is a daily limit on the number of runs.

### Do I need to know how to code?

No. Strategies are built in a visual editor from indicators and rules and saved as a JSON config. If you prefer, an AI assistant such as ChatGPT or Claude can write the config from a plain-language description.

### How far back does the crypto data go?

Backtests can start on 2020-01-01. One run covers up to 500,000 bars, which is about a year of 1-minute candles or the whole history on 1-hour and larger timeframes.

### Can I backtest futures with leverage and funding?

Yes. USDT-M perpetual futures support long and short, 1–125× leverage, isolated or cross margin, historical funding every 8 hours and liquidation.

### How many trades does a backtest need?

There is no magic number, but a dozen trades is an anecdote. Look for dozens to hundreds of trades across several coins and periods before trusting a win rate or a profit factor.

### Is a profitable backtest a reason to trade the strategy?

No. A backtest shows how rules behaved in the past under the simulation’s assumptions. It is a filter for ideas, not a forecast and not financial advice. Janorium only backtests; it never places orders.

## Sources

- [Binance — fee schedule](https://www.binance.com/en/fee/schedule)
