docs: update backtesting docs with new output

This commit is contained in:
Matthias
2025-11-16 10:27:34 +01:00
parent 1ede186484
commit c66adf2bf1
+109 -101
View File
@@ -211,58 +211,59 @@ A backtesting result will look like that:
│ TOTAL │ │ 77 │ 0.22 │ 54.774 │ 5.48 │ 22:12:00 │ 67 0 10 87.0 │
└───────────┴─────────────┴────────┴──────────────┴─────────────────┴──────────────┴─────────────────┴────────────────────────┘
SUMMARY METRICS
┏━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━┳━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━┓
┃ Metric ┃ Value ┃
┡━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━╇━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━┩
│ Backtesting from │ 2025-07-01 00:00:00 │
│ Backtesting to │ 2025-08-01 00:00:00 │
│ Trading Mode │ Isolated Futures │
│ Max open trades │ 3 │
│ │ │
│ Total/Daily Avg Trades │ 77 / 2.48 │
│ Starting balance │ 1000 USDT │
│ Final balance │ 1054.774 USDT │
│ Absolute profit │ 54.774 USDT │
│ Total profit % │ 5.48%
│ CAGR % │ 87.36%
│ Sortino │ 2.48
│ Sharpe │ 3.75
│ Calmar │ 40.99
│ SQN │ 0.69 │
│ Profit factor │ 1.29 │
│ Expectancy (Ratio) │ 0.71 (0.04) │
│ Avg. daily profit │ 1.767 USDT │
│ Avg. stake amount │ 345.016 USDT │
│ Total trade volume │ 53316.954 USDT
│ │ │
│ Long / Short trades │ 67 / 10 │
│ Long / Short profit % │ 8.94% / -3.47%
│ Long / Short profit USDT │ 89.425 / -34.651
│ │ │
│ Best Pair │ LTC/USDT:USDT 5.62% │
│ Worst Pair │ ADA/USDT:USDT -5.21% │
│ Best trade │ ETC/USDT:USDT 2.00% │
│ Worst trade │ ADA/USDT:USDT -10.17% │
│ Best day │ 26.91 USDT │
│ Worst day │ -47.741 USDT │
│ Days win/draw/lose │ 20 / 6 / 5 │
│ Min/Max/Avg. Duration Winners │ 0d 00:35 / 5d 18:15 / 0d 15:49 │
│ Min/Max/Avg. Duration Losers │ 0d 10:40 / 17d 08:00 / 2d 17:00 │
│ Max Consecutive Wins / Loss │ 36 / 3 │
│ Rejected Entry signals │ 258 │
│ Entry/Exit Timeouts │ 0 / 0 │
│ │ │
│ Min balance │ 1003.168 USDT
│ Max balance 1149.421 USDT
│ Max % of account underwater │ 8.23%
Absolute drawdown │ 94.647 USDT (8.23%)
Drawdown duration │ 9 days 08:50:00
Profit at drawdown start │ 149.421 USDT
│ Profit at drawdown end 54.774 USDT │
Drawdown start │ 2025-07-22 15:10:00
│ Drawdown end │ 2025-08-01 00:00:00
Market change30.51%
└───────────────────────────────┴─────────────────────────────────┘
┏━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━┳━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
┃ Metric ┃ Value
┡━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━╇━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
│ Backtesting from │ 2025-07-01 00:00:00
│ Backtesting to │ 2025-08-01 00:00:00
│ Trading Mode │ Isolated Futures
│ Max open trades │ 3
│ │
│ Total/Daily Avg Trades │ 77 / 2.48
│ Starting balance │ 1000 USDT
│ Final balance │ 1054.669 USDT
│ Absolute profit │ 54.669 USDT
│ Total profit % │ 5.47%
│ CAGR % │ 87.14%
│ Sortino │ 2.46
│ Sharpe │ 3.73
│ Calmar │ 40.81
│ SQN │ 0.69
│ Profit factor │ 1.29
│ Expectancy (Ratio) │ 0.71 (0.04)
│ Avg. daily profit │ 1.764 USDT
│ Avg. stake amount │ 345.251 USDT
│ Total trade volume │ 53352.96 USDT
│ │
│ Long / Short trades │ 67 / 10
│ Long / Short profit % │ 8.93% / -3.46%
│ Long / Short profit USDT │ 89.262 / -34.593
│ │
│ Best Pair │ LTC/USDT:USDT 5.62%
│ Worst Pair │ ADA/USDT:USDT -5.21%
│ Best trade │ ETC/USDT:USDT 2.00%
│ Worst trade │ ADA/USDT:USDT -10.17%
│ Best day │ 26.931 USDT
│ Worst day │ -47.741 USDT
│ Days win/draw/lose │ 20 / 6 / 5
│ Min/Max/Avg. Duration Winners │ 0d 00:35 / 5d 18:15 / 0d 15:49
│ Min/Max/Avg. Duration Losers │ 0d 10:40 / 17d 08:00 / 2d 17:00
│ Max Consecutive Wins / Loss │ 36 / 3
│ Rejected Entry signals │ 258
│ Entry/Exit Timeouts │ 0 / 0
│ │
│ Min/Max balance realized │ 1003.168 USDT / 1149.577 USDT
Min/Max balance unrealized │ 1000 USDT / 1149.577 USDT │
│ Min/Max balance dates │ 2025-07-01 00:05:00 / 2025-07-22 15:15:00
Max % of account underwater │ 8.26%
Absolute drawdown │ 94.908 USDT (8.26%)
Drawdown duration │ 9 days 08:50:00
│ Profit at drawdown start149.577 USDT
Profit at drawdown end │ 54.669 USDT
│ Drawdown start │ 2025-07-22 15:10:00
Drawdown end 2025-08-01 00:00:00
│ Market change │ 30.51% │
└───────────────────────────────┴───────────────────────────────────────────┘
Backtested 2025-07-01 00:00:00 -> 2025-08-01 00:00:00 | Max open trades : 3
STRATEGY SUMMARY
@@ -329,54 +330,59 @@ The last element of the backtest report is the summary metrics table.
It contains key metrics about the performance of your strategy on backtesting data.
```
┏━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━┳━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━┓
┃ Metric ┃ Value ┃
┡━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━╇━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━┩
│ Backtesting from │ 2025-07-01 00:00:00 │
│ Backtesting to │ 2025-08-01 00:00:00 │
│ Trading Mode │ Isolated Futures │
│ Max open trades │ 3 │
│ │ │
│ Total/Daily Avg Trades │ 72 / 2.32
│ Starting balance │ 1000 USDT │
│ Final balance │ 1106.734 USDT
│ Absolute profit │ 106.734 USDT
│ Total profit % │ 10.67%
│ CAGR % │ 230.04%
│ Sortino │ 4.99
│ Sharpe │ 8.00
│ Calmar │ 77.76
│ SQN │ 1.52
│ Profit factor │ 1.79
│ Expectancy (Ratio) │ 1.48 (0.07)
│ Avg. daily profit │ 3.443 USDT
│ Avg. stake amount │ 363.133 USDT
│ Total trade volume │ 52466.174 USDT
│ │ │
Best Pair │ LTC/USDT:USDT 4.48%
Worst Pair │ ADA/USDT:USDT -1.78%
Best trade │ ETC/USDT:USDT 2.00%
Worst tradeADA/USDT:USDT -10.17%
│ Best day 23.535 USDT
│ Worst day -49.813 USDT
Days win/draw/lose │ 21 / 6 / 4
Min/Max/Avg. Duration Winners │ 0d 00:35 / 5d 18:15 / 0d 15:30
Min/Max/Avg. Duration Losers │ 0d 12:00 / 17d 08:00 / 3d 23:28
Max Consecutive Wins / Loss │ 58 / 4
Rejected Entry signals │ 254
Entry/Exit Timeouts │ 0 / 0
│ Min balance │ 1003.168 USDT
Max balance │ 1209 USDT
Max % of account underwater │ 8.46%
Absolute drawdown │ 102.266 USDT (8.46%)
Drawdown duration │ 9 days 08:50:00
Profit at drawdown start 209 USDT
Profit at drawdown end │ 106.734 USDT
Drawdown start │ 2025-07-22 15:10:00
Drawdown end │ 2025-08-01 00:00:00
Market change │ 30.51%
└───────────────────────────────┴─────────────────────────────────┘
┏━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━┳━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
┃ Metric ┃ Value
┡━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━╇━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
│ Backtesting from │ 2025-07-01 00:00:00
│ Backtesting to │ 2025-08-01 00:00:00
│ Trading Mode │ Isolated Futures
│ Max open trades │ 3
│ │
│ Total/Daily Avg Trades │ 77 / 2.48
│ Starting balance │ 1000 USDT
│ Final balance │ 1054.669 USDT
│ Absolute profit │ 54.669 USDT
│ Total profit % │ 5.47%
│ CAGR % │ 87.14%
│ Sortino │ 2.46
│ Sharpe │ 3.73
│ Calmar │ 40.81
│ SQN │ 0.69
│ Profit factor │ 1.29
│ Expectancy (Ratio) │ 0.71 (0.04)
│ Avg. daily profit │ 1.764 USDT
│ Avg. stake amount │ 345.251 USDT
│ Total trade volume │ 53352.96 USDT
│ │
Long / Short trades │ 67 / 10
Long / Short profit % │ 8.93% / -3.46%
Long / Short profit USDT │ 89.262 / -34.593
│ Best PairLTC/USDT:USDT 5.62%
│ Worst PairADA/USDT:USDT -5.21%
Best trade │ ETC/USDT:USDT 2.00%
Worst trade │ ADA/USDT:USDT -10.17%
Best day │ 26.931 USDT
Worst day │ -47.741 USDT
Days win/draw/lose │ 20 / 6 / 5
Min/Max/Avg. Duration Winners │ 0d 00:35 / 5d 18:15 / 0d 15:49
Min/Max/Avg. Duration Losers │ 0d 10:40 / 17d 08:00 / 2d 17:00
│ Max Consecutive Wins / Loss │ 36 / 3
Rejected Entry signals │ 258
Entry/Exit Timeouts │ 0 / 0
Min/Max balance realized │ 1003.168 USDT / 1149.577 USDT
Min/Max balance unrealized1000 USDT / 1149.577 USDT
Min/Max balance dates │ 2025-07-01 00:05:00 / 2025-07-22 15:15:00
Max % of account underwater │ 8.26%
Absolute drawdown │ 94.908 USDT (8.26%)
Drawdown duration │ 9 days 08:50:00
│ Profit at drawdown start │ 149.577 USDT │
│ Profit at drawdown end │ 54.669 USDT │
│ Drawdown start │ 2025-07-22 15:10:00 │
│ Drawdown end │ 2025-08-01 00:00:00 │
│ Market change │ 30.51% │
└───────────────────────────────┴───────────────────────────────────────────┘
```
- `Backtesting from` / `Backtesting to`: Backtesting range (usually defined with the `--timerange` option).
@@ -409,7 +415,9 @@ It contains key metrics about the performance of your strategy on backtesting da
- `Max Consecutive Wins / Loss`: Maximum consecutive wins/losses in a row.
- `Rejected Entry signals`: Trade entry signals that could not be acted upon due to `max_open_trades` being reached.
- `Entry/Exit Timeouts`: Entry/exit orders which did not fill (only applicable if custom pricing is used).
- `Min balance` / `Max balance`: Lowest and Highest Wallet balance during the backtest period.
- `Min/Max balance realized`: Lowest and Highest Wallet balance during the backtest period based on closed trades trades.
- `Min/Max balance unrealized`: Lowest and Highest Wallet balance during the backtest period - including capital tied in open trades.
- `Min/Max balance dates`: Dates when the minimum and maximum balance occurred.
- `Max % of account underwater`: Maximum percentage your account has decreased from the top since the simulation started. Calculated as the maximum of `(Max Balance - Current Balance) / (Max Balance)`.
- `Absolute drawdown`: Maximum absolute drawdown experienced, including percentage relative to the account calculated as `(Absolute Drawdown) / (DrawdownHigh + startingBalance)`..
- `Drawdown duration`: Duration of the largest drawdown period.