From d7017ce1e4d792a6bfa53c66dacf7eefe83003e9 Mon Sep 17 00:00:00 2001 From: Matthias Date: Thu, 7 Mar 2019 21:11:14 +0100 Subject: [PATCH] Document backtest-result loading --- docs/backtesting.md | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) diff --git a/docs/backtesting.md b/docs/backtesting.md index f6c9dd4d1..e155dce88 100644 --- a/docs/backtesting.md +++ b/docs/backtesting.md @@ -245,6 +245,26 @@ On the other hand, if you set a too high `minimal_roi` like `"0": 0.55` profit. Hence, keep in mind that your performance is a mix of your strategies, your configuration, and the crypto-currency you have set up. +### Further backtest-result analysis + +To further analyze your backtest results, you can [export the trades](#exporting-trades-to-file). +You can then load the trades to perform further analysis. + +A good way for this is using Jupyter (notebook or lab) - which provides an interactive environment to analyze the data. + +Freqtrade provides an easy to load the backtest results, which is `load_backtest_data` - and takes a path to the backtest-results file. + +``` python +from freqtrade.data.btanalysis import load_backtest_data +df = load_backtest_data("user_data/backtest-result.json") + +# Show value-counts per pair +df.groupby("pair")["sell_reason"].value_counts() + +``` + +This will allow you to drill deeper into your backtest results, and perform analysis which would make the regular backtest-output unreadable. + ## Backtesting multiple strategies To backtest multiple strategies, a list of Strategies can be provided.