Run the backtest with --export signals, then freqtrade backtesting-analysis --analysis-groups 0 1 2 5. Group 0 summarises each enter_tag: wl_ratio_pct is the win rate, and exp_ratio is the expected profit per trade in units of the average loss. Groups 1 to 5 sum, median and average profit by tag, exit reason or pair. Their total_profit_pct is a simple sum of per-trade ratios, not account return. Tables sort ascending, so in groups 1 to 4 the worst combination comes first. A hypothetical eight-trade list, labeled as such, works the formulas by hand.
Calculation and worked example. AI-assisted drafting. Educational information; no individual financial advice.
What backtesting-analysis needs before it prints anything
freqtrade backtesting-analysis reads the files a previous backtest exported. According to the official Advanced Backtesting Analysis page (checked 2026-11-13), that backtest must be run with --export signals. This saves the trades plus the signal and exit candles, which show up as _signals.pkl and _exited.pkl next to the result. The analysis works for backtesting only, not for hyperopt. Before re-running, delete old results or pass --cache none, so a cached result isn't analysed by mistake.
freqtrade backtesting -c config.json --strategy MyStrategy --timerange 20260801-20261101 --export signals --cache none
freqtrade backtesting-analysis -c config.json --analysis-groups 0 1 2 5By default it analyses the most recent result. Use --backtest-filename (and --backtest-directory if needed) to point it at an older run.
Where the tags come from
The enter_reason column is your strategy's enter_tag. The exit_reason column is either your exit_tag or one of freqtrade's built-in reasons such as roi, stop_loss, exit_signal, trailing_stop_loss or force_exit. The official advanced-strategy page shows how to set tags in populate_entry_trend and populate_exit_trend, and it lists two pitfalls:
- Its example concatenates tags. A candle where both conditions fire gets one combined tag,
"long_signal_rsi long_signal_bblower ", and the analysis groups it as its own row. It is not split between the two signals. - There is only one
enter_tagcolumn, so the last write wins.enter_tagis cut at 255 characters andexit_reasonat 100.
If your strategy sets no tags, every trade lands in one blank enter_reason group. Groups 0 to 4 then tell you little.
The six groups
From the official list:
| Group | Grouped by | Use it to answer |
|---|---|---|
| 0 | enter_tag (wins/losses summary) | Which entry signal has a positive expectancy? |
| 1 | enter_tag | Which entry signal earns or loses the most in total? |
| 2 | enter_tag + exit_reason | Which entry signal ends in which kind of exit? |
| 3 | pair + enter_tag | Is a tag only working on one pair? |
| 4 | pair + enter_tag + exit_reason | A detailed drill-down (can be very large) |
| 5 | exit_reason | Which exit mechanism costs the most? |
What the columns actually compute
The docs list the groups but not the formulas. We read them from the stable source, freqtrade/data/entryexitanalysis.py, on 2026-11-13. Recheck this after upgrades, because column names and formulas can change.
Group 0 columns:
total_num_buys: number of trades.wins/losses: counts. A trade with exactly 0 profit counts as a loss.profit_abs_wins/profit_abs_loss: sums in stake currency.profit_tot= wins sum − |loss sum|.wl_ratio_pct: despite the name, this is the win rate, wins ÷ trades × 100. It is not a win/loss ratio.avg_win,avg_loss: average absolute profit of winning and losing trades.exp_ratio= (1 + avg_win ÷ |avg_loss|) × win rate − 1. Rearranged, that is the expected profit per trade measured in units of the average loss. Above 0 is positive expectancy, 0 is break-even, below 0 loses.
Groups 1 to 5 columns: num_buys, profit_abs_sum, profit_abs_median, profit_abs_mean, then median_profit_pct, mean_profit_pct and total_profit_pct. Note that total_profit_pct is the sum of per-trade profit ratios × 100. It is not your account return and does not compound. It only matches the backtest report's Tot Profit % in special cases, such as equal stakes that happen to sum to the starting balance.
Sort order. Tables sort in ascending order. Group 0 sorts by trade count. Groups 1 to 4 sort by profit_abs_sum, so the worst combination is printed first. Group 5 sorts alphabetically by exit reason.
A worked example on a hypothetical trade list
The eight trades below are made up to show the arithmetic. They are not a backtest of any strategy or market. Each uses a 100 USDT stake, so profit in USDT equals profit in percent.
rsi_cross: roi +1.50, roi +1.20, stop_loss −3.10, exit_signal +0.40bb_lower: roi +1.00, stop_loss −3.05, stop_loss −3.00, exit_signal −0.25
Running the same aggregation gives this Group 0:
| enter_reason | trades | wins | losses | profit_tot | wl_ratio_pct | avg_win | avg_loss | exp_ratio |
|---|---|---|---|---|---|---|---|---|
| bb_lower | 4 | 1 | 3 | −5.30 | 25.0 | 1.00 | −2.10 | −0.631 |
| rsi_cross | 4 | 3 | 1 | 0.00 | 75.0 | 1.033 | −3.10 | 0.000 |
Check bb_lower by hand: (1 + 1.00 ÷ 2.10) × 0.25 − 1 = 1.476 × 0.25 − 1 = −0.631. For rsi_cross, a 75% win rate gives exactly 0 because the one 3.10 loss cancels the three wins (1.50 + 1.20 + 0.40 = 3.10). A high win rate does not mean a positive edge.
Group 2 prints these rows, worst first: bb_lower/stop_loss (2 trades, −6.05), rsi_cross/stop_loss (1, −3.10), bb_lower/exit_signal (1, −0.25), rsi_cross/exit_signal (1, +0.40), bb_lower/roi (1, +1.00), rsi_cross/roi (2, +2.70). Group 5 gives stop_loss 3 trades −9.15, roi 3 trades +3.70, exit_signal 2 trades +0.15.
How to read it: both tags lose about 3 per stop-loss exit, but bb_lower reaches its stop twice as often and has the weaker roi side. In a real run, that would point you at the bb_lower entry filter first, not at the stop distance. With one to two trades per cell, though, every number here is too small a sample to decide anything. Treat thin cells as questions, not results.
Useful filters
--enter-reason-list/--exit-reason-listrestrict the output to chosen tags.--indicator-list rsi macdadds indicator values at entry and exit, with(entry)and(exit)suffixes. Add--entry-onlyor--exit-onlyto show just one side.--timerangefilters the output trades by date (start inclusive, end exclusive, per the docs). This lets you split one backtest into periods.--rejected-signalslists entry signals that did not become trades.--analysis-to-csvwritesgroup_0.csvand the other tables to files instead of the terminal.
One more detail from the source: the analysis loops over pair_whitelist in your config. With a dynamic pairlist, check that the pairs you traded are in that list, or their trades may be left out.
For the bigger picture, set these tables beside the backtest summary and our bot evaluation guide. If stop_loss dominates group 5, compare it with the protections on/off comparison and the --timeframe-detail before/after, since both can change which trades happen and how their exits are simulated.
Sources & method
What this article adds
A column-by-column decoding of backtesting-analysis groups that the official page lists but does not define, read from the stable source: wl_ratio_pct is a win rate, exp_ratio is expectancy in units of average loss, zero-profit trades count as losses, total_profit_pct is a simple sum of ratios, and tables sort ascending. A labeled hypothetical eight-trade list recomputed with the same formulas shows Group 0, 2 and 5 rows and a hand check (−0.631).
How it was prepared
Drafted on 2026-11-13 from the official freqtrade stable docs (advanced backtesting, strategy advanced, backtesting) and the stable source file entryexitanalysis.py (stable branch head 4cf0351, committed 2026-10-30). The worked tables come from a hypothetical trade list, recomputed with a short pandas script that copies the source's aggregation formulas (saved in the batch evidence). Freqtrade was not executed, and no strategy result is reported.
- Freqtrade docs (stable): Advanced backtesting analysis Checked 2026-11-13
- Freqtrade docs (stable): Strategy advanced (enter tag, exit tag) Checked 2026-11-13
- Freqtrade docs (stable): Backtesting (exit reasons, report tables) Checked 2026-11-13
- Freqtrade source (stable): entryexitanalysis.py Checked 2026-11-13
Advanced backtesting page: --export signals requirement, backtesting only (not hyperopt), --cache none advice, the group 0–5 definitions, --backtest-filename/--backtest-directory, reason-list filters, --indicator-list with entry/exit suffixes and --entry-only/--exit-only, --timerange filtering (start inclusive, end exclusive), --rejected-signals and --analysis-to-csv. Strategy advanced: setting enter_tag/exit_tag, concatenated tags, last-write-wins, 255/100 character limits, and exit tags used as exit reasons. Backtesting page: built-in exit reasons. Source: column formulas, sort order and the pair_whitelist loop.
For corrections, contact the publisher. Editorial policy · Affiliate disclosure