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 │ │ TOTAL │ │ 77 │ 0.22 │ 54.774 │ 5.48 │ 22:12:00 │ 67 0 10 87.0 │
└───────────┴─────────────┴────────┴──────────────┴─────────────────┴──────────────┴─────────────────┴────────────────────────┘ └───────────┴─────────────┴────────┴──────────────┴─────────────────┴──────────────┴─────────────────┴────────────────────────┘
SUMMARY METRICS SUMMARY METRICS
┏━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━┳━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━┓ ┏━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━┳━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
┃ Metric ┃ Value ┃ ┃ Metric ┃ Value
┡━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━╇━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━┩ ┡━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━╇━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
│ Backtesting from │ 2025-07-01 00:00:00 │ │ Backtesting from │ 2025-07-01 00:00:00
│ Backtesting to │ 2025-08-01 00:00:00 │ │ Backtesting to │ 2025-08-01 00:00:00
│ Trading Mode │ Isolated Futures │ │ Trading Mode │ Isolated Futures
│ Max open trades │ 3 │ │ Max open trades │ 3
│ │ │ │ │
│ Total/Daily Avg Trades │ 77 / 2.48 │ │ Total/Daily Avg Trades │ 77 / 2.48
│ Starting balance │ 1000 USDT │ │ Starting balance │ 1000 USDT
│ Final balance │ 1054.774 USDT │ │ Final balance │ 1054.669 USDT
│ Absolute profit │ 54.774 USDT │ │ Absolute profit │ 54.669 USDT
│ Total profit % │ 5.48% │ Total profit % │ 5.47%
│ CAGR % │ 87.36% │ CAGR % │ 87.14%
│ Sortino │ 2.48 │ Sortino │ 2.46
│ Sharpe │ 3.75 │ Sharpe │ 3.73
│ Calmar │ 40.99 │ Calmar │ 40.81
│ SQN │ 0.69 │ │ SQN │ 0.69
│ Profit factor │ 1.29 │ │ Profit factor │ 1.29
│ Expectancy (Ratio) │ 0.71 (0.04) │ │ Expectancy (Ratio) │ 0.71 (0.04)
│ Avg. daily profit │ 1.767 USDT │ │ Avg. daily profit │ 1.764 USDT
│ Avg. stake amount │ 345.016 USDT │ │ Avg. stake amount │ 345.251 USDT
│ Total trade volume │ 53316.954 USDT │ Total trade volume │ 53352.96 USDT
│ │ │ │ │
│ Long / Short trades │ 67 / 10 │ │ Long / Short trades │ 67 / 10
│ Long / Short profit % │ 8.94% / -3.47% │ Long / Short profit % │ 8.93% / -3.46%
│ Long / Short profit USDT │ 89.425 / -34.651 │ Long / Short profit USDT │ 89.262 / -34.593
│ │ │ │ │
│ Best Pair │ LTC/USDT:USDT 5.62% │ │ Best Pair │ LTC/USDT:USDT 5.62%
│ Worst Pair │ ADA/USDT:USDT -5.21% │ │ Worst Pair │ ADA/USDT:USDT -5.21%
│ Best trade │ ETC/USDT:USDT 2.00% │ │ Best trade │ ETC/USDT:USDT 2.00%
│ Worst trade │ ADA/USDT:USDT -10.17% │ │ Worst trade │ ADA/USDT:USDT -10.17%
│ Best day │ 26.91 USDT │ │ Best day │ 26.931 USDT
│ Worst day │ -47.741 USDT │ │ Worst day │ -47.741 USDT
│ Days win/draw/lose │ 20 / 6 / 5 │ │ 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 Winners │ 0d 00:35 / 5d 18:15 / 0d 15:49
│ Min/Max/Avg. Duration Losers │ 0d 10:40 / 17d 08:00 / 2d 17:00 │ │ Min/Max/Avg. Duration Losers │ 0d 10:40 / 17d 08:00 / 2d 17:00
│ Max Consecutive Wins / Loss │ 36 / 3 │ │ Max Consecutive Wins / Loss │ 36 / 3
│ Rejected Entry signals │ 258 │ │ Rejected Entry signals │ 258
│ Entry/Exit Timeouts │ 0 / 0 │ │ Entry/Exit Timeouts │ 0 / 0
│ │ │ │ │
│ Min balance │ 1003.168 USDT │ Min/Max balance realized │ 1003.168 USDT / 1149.577 USDT
│ Max balance 1149.421 USDT Min/Max balance unrealized │ 1000 USDT / 1149.577 USDT │
│ Max % of account underwater │ 8.23% │ Min/Max balance dates │ 2025-07-01 00:05:00 / 2025-07-22 15:15:00
Absolute drawdown │ 94.647 USDT (8.23%) Max % of account underwater │ 8.26%
Drawdown duration │ 9 days 08:50:00 Absolute drawdown │ 94.908 USDT (8.26%)
Profit at drawdown start │ 149.421 USDT Drawdown duration │ 9 days 08:50:00
│ Profit at drawdown end 54.774 USDT │ │ Profit at drawdown start149.577 USDT
Drawdown start │ 2025-07-22 15:10:00 Profit at drawdown end │ 54.669 USDT
│ Drawdown end │ 2025-08-01 00:00:00 │ Drawdown start │ 2025-07-22 15:10:00
Market change30.51% 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 Backtested 2025-07-01 00:00:00 -> 2025-08-01 00:00:00 | Max open trades : 3
STRATEGY SUMMARY 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. It contains key metrics about the performance of your strategy on backtesting data.
``` ```
┏━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━┳━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━┓ ┏━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━┳━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
┃ Metric ┃ Value ┃ ┃ Metric ┃ Value
┡━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━╇━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━┩ ┡━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━╇━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
│ Backtesting from │ 2025-07-01 00:00:00 │ │ Backtesting from │ 2025-07-01 00:00:00
│ Backtesting to │ 2025-08-01 00:00:00 │ │ Backtesting to │ 2025-08-01 00:00:00
│ Trading Mode │ Isolated Futures │ │ Trading Mode │ Isolated Futures
│ Max open trades │ 3 │ │ Max open trades │ 3
│ │ │ │ │
│ Total/Daily Avg Trades │ 72 / 2.32 │ Total/Daily Avg Trades │ 77 / 2.48
│ Starting balance │ 1000 USDT │ │ Starting balance │ 1000 USDT
│ Final balance │ 1106.734 USDT │ Final balance │ 1054.669 USDT
│ Absolute profit │ 106.734 USDT │ Absolute profit │ 54.669 USDT
│ Total profit % │ 10.67% │ Total profit % │ 5.47%
│ CAGR % │ 230.04% │ CAGR % │ 87.14%
│ Sortino │ 4.99 │ Sortino │ 2.46
│ Sharpe │ 8.00 │ Sharpe │ 3.73
│ Calmar │ 77.76 │ Calmar │ 40.81
│ SQN │ 1.52 │ SQN │ 0.69
│ Profit factor │ 1.79 │ Profit factor │ 1.29
│ Expectancy (Ratio) │ 1.48 (0.07) │ Expectancy (Ratio) │ 0.71 (0.04)
│ Avg. daily profit │ 3.443 USDT │ Avg. daily profit │ 1.764 USDT
│ Avg. stake amount │ 363.133 USDT │ Avg. stake amount │ 345.251 USDT
│ Total trade volume │ 52466.174 USDT │ Total trade volume │ 53352.96 USDT
│ │ │ │ │
Best Pair │ LTC/USDT:USDT 4.48% Long / Short trades │ 67 / 10
Worst Pair │ ADA/USDT:USDT -1.78% Long / Short profit % │ 8.93% / -3.46%
Best trade │ ETC/USDT:USDT 2.00% Long / Short profit USDT │ 89.262 / -34.593
Worst tradeADA/USDT:USDT -10.17%
│ Best day 23.535 USDT │ Best PairLTC/USDT:USDT 5.62%
│ Worst day -49.813 USDT │ Worst PairADA/USDT:USDT -5.21%
Days win/draw/lose │ 21 / 6 / 4 Best trade │ ETC/USDT:USDT 2.00%
Min/Max/Avg. Duration Winners │ 0d 00:35 / 5d 18:15 / 0d 15:30 Worst trade │ ADA/USDT:USDT -10.17%
Min/Max/Avg. Duration Losers │ 0d 12:00 / 17d 08:00 / 3d 23:28 Best day │ 26.931 USDT
Max Consecutive Wins / Loss │ 58 / 4 Worst day │ -47.741 USDT
Rejected Entry signals │ 254 Days win/draw/lose │ 20 / 6 / 5
Entry/Exit Timeouts │ 0 / 0 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
│ Min balance │ 1003.168 USDT │ Max Consecutive Wins / Loss │ 36 / 3
Max balance │ 1209 USDT Rejected Entry signals │ 258
Max % of account underwater │ 8.46% Entry/Exit Timeouts │ 0 / 0
Absolute drawdown │ 102.266 USDT (8.46%)
Drawdown duration │ 9 days 08:50:00 Min/Max balance realized │ 1003.168 USDT / 1149.577 USDT
Profit at drawdown start 209 USDT Min/Max balance unrealized1000 USDT / 1149.577 USDT
Profit at drawdown end │ 106.734 USDT Min/Max balance dates │ 2025-07-01 00:05:00 / 2025-07-22 15:15:00
Drawdown start │ 2025-07-22 15:10:00 Max % of account underwater │ 8.26%
Drawdown end │ 2025-08-01 00:00:00 Absolute drawdown │ 94.908 USDT (8.26%)
Market change │ 30.51% 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). - `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. - `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. - `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). - `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)`. - `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)`.. - `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. - `Drawdown duration`: Duration of the largest drawdown period.