// guide
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.
7 min read
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:
- Market. Spot, or perpetual futures with leverage and funding? Which coins, which timeframe?
- Entry. The exact condition, with numbers: "the 50-period SMA crosses above the 200-period SMA", not "the trend turns up".
- Exit. A take-profit, a stop-loss, an opposite signal, a time limit — or several of them.
- Size. How much of the account goes into one trade.
If you are not sure the idea is precise enough, read what backtesting is first, or describe it in plain words to ChatGPT or Claude and let the assistant turn it into rules — this guide shows how.
Run the backtest in six steps
- Create a free account. Sign up — no card, no download. Everything runs on the server.
- 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.
- 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.
- 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.
- 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.
- 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.
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 |
- Binance spot
- Fee to enter (taker)0.1% per side at the standard tier, at the time of writing
- Slippage to start with0.02–0.05%; more on small coins
- Also charged—
- Binance USDT-M perpetuals
- Fee to enter (taker)0.05% per side at the standard tier (0.02% for maker orders), at the time of writing
- Slippage to start with0.02–0.05%; more on small coins
- Also chargedFunding 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: 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 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. |
- Total return
- Value+529.12%
- What it saysThe strategy made money…
- Buy and hold
- Value+859.56%
- What it says…but simply holding BTC made more: the cross lost 330 percentage points to it.
- Max drawdown
- Value57.11%
- What it saysAt the worst point the account was more than half below its peak.
- Trades
- Value6
- What it saysSix trades in six years — too few to call the result a statistic.
- Win rate · profit factor
- Value66.67% · 4.95
- What it saysExcellent-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.
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. |
- Fees left at 0
- Why it misleadsEvery trade looks free; frequent strategies look brilliant.
- FixSet Fees % and Slippage % before the first run.
- One coin, one period
- Why it misleadsOne bull market can carry any long strategy.
- FixTest many coins and several start dates.
- Only today’s coins
- Why it misleadsSurvivorship bias: the coins that died are missing.
- FixUse a universe taken as of a past date.
- A dozen trades
- Why it misleadsWin rate and profit factor are noise on small samples.
- FixPrefer rules and periods that produce dozens or hundreds of trades.
- Tuning until it looks perfect
- Why it misleadsOverfitting: the parameters fit the past, not the market.
- FixKeep a later period untouched and judge the strategy there.
- Futures without funding
- Why it misleadsA long position in a hot market can pay more in funding than in fees.
- FixLeave "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
Test your own idea
Create a free account, start from a template or from your own rules, and read your first report.
More guides
- What is backtesting?How a backtest works, which numbers matter and the traps that make results look too good.
- TradingView backtesting vs JanoriumWhat each tool does well, where it falls short, and which one to pick for crypto strategies.
- Build a strategy with ChatGPT or ClaudeDescribe a trading idea in plain words and let an AI assistant write the strategy config.
- Backtest metrics explainedSharpe, drawdown, profit factor, win rate and the rest — what they mean and what counts as good.