Add doc-page to index
This commit is contained in:
parent
f92997d378
commit
7f60364f63
@ -1,6 +1,6 @@
|
|||||||
# Advanced Backtesting Analysis
|
# Advanced Backtesting Analysis
|
||||||
|
|
||||||
## Analyse the buy/entry and sell/exit tags
|
## Analyze the buy/entry and sell/exit tags
|
||||||
|
|
||||||
It can be helpful to understand how a strategy behaves according to the buy/entry tags used to
|
It can be helpful to understand how a strategy behaves according to the buy/entry tags used to
|
||||||
mark up different buy conditions. You might want to see more complex statistics about each buy and
|
mark up different buy conditions. You might want to see more complex statistics about each buy and
|
||||||
@ -20,11 +20,11 @@ so add the following option to your config file:
|
|||||||
We then need to run backtesting and include the `--export` option to enable the exporting of
|
We then need to run backtesting and include the `--export` option to enable the exporting of
|
||||||
trades:
|
trades:
|
||||||
|
|
||||||
```bash
|
``` bash
|
||||||
freqtrade backtesting -c <config.json> --timeframe <tf> --strategy <strategy_name> --timerange=<timerange> --export=trades
|
freqtrade backtesting -c <config.json> --timeframe <tf> --strategy <strategy_name> --timerange=<timerange> --export=trades
|
||||||
```
|
```
|
||||||
|
|
||||||
To analyse the buy tags, we need to use the `buy_reasons.py` script from
|
To analyze the buy tags, we need to use the `buy_reasons.py` script from
|
||||||
[froggleston's repo](https://github.com/froggleston/freqtrade-buyreasons). Follow the instructions
|
[froggleston's repo](https://github.com/froggleston/freqtrade-buyreasons). Follow the instructions
|
||||||
in their README to copy the script into your `freqtrade/scripts/` folder.
|
in their README to copy the script into your `freqtrade/scripts/` folder.
|
||||||
|
|
||||||
@ -39,9 +39,9 @@ backtesting with the `--cache none` option to make sure no cached results are us
|
|||||||
If all goes well, you should now see a `backtest-result-{timestamp}_signals.pkl` file in the
|
If all goes well, you should now see a `backtest-result-{timestamp}_signals.pkl` file in the
|
||||||
`user_data/backtest_results` folder.
|
`user_data/backtest_results` folder.
|
||||||
|
|
||||||
Now run the buy_reasons.py script, supplying a few options:
|
Now run the `buy_reasons.py` script, supplying a few options:
|
||||||
|
|
||||||
```bash
|
``` bash
|
||||||
python3 scripts/buy_reasons.py -c <config.json> -s <strategy_name> -t <timerange> -g0,1,2,3,4
|
python3 scripts/buy_reasons.py -c <config.json> -s <strategy_name> -t <timerange> -g0,1,2,3,4
|
||||||
```
|
```
|
||||||
|
|
||||||
@ -76,5 +76,5 @@ python3 scripts/buy_reasons.py -c <config.json> -s <strategy_name> -t <timerange
|
|||||||
```
|
```
|
||||||
|
|
||||||
The indicators have to be present in your strategy's main DataFrame (either for your main
|
The indicators have to be present in your strategy's main DataFrame (either for your main
|
||||||
timeframe or for informatives) otherwise they will simply be ignored in the script
|
timeframe or for informative timeframes) otherwise they will simply be ignored in the script
|
||||||
output.
|
output.
|
||||||
|
@ -1077,8 +1077,8 @@ class Backtesting:
|
|||||||
})
|
})
|
||||||
self.all_results[self.strategy.get_strategy_name()] = results
|
self.all_results[self.strategy.get_strategy_name()] = results
|
||||||
|
|
||||||
if self.backtest_signal_candle_export_enable and \
|
if (self.backtest_signal_candle_export_enable and
|
||||||
self.dataprovider.runmode == RunMode.BACKTEST:
|
self.dataprovider.runmode == RunMode.BACKTEST):
|
||||||
self._generate_trade_signal_candles(preprocessed_tmp, results)
|
self._generate_trade_signal_candles(preprocessed_tmp, results)
|
||||||
|
|
||||||
return min_date, max_date
|
return min_date, max_date
|
||||||
@ -1163,8 +1163,8 @@ class Backtesting:
|
|||||||
if self.config.get('export', 'none') == 'trades':
|
if self.config.get('export', 'none') == 'trades':
|
||||||
store_backtest_stats(self.config['exportfilename'], self.results)
|
store_backtest_stats(self.config['exportfilename'], self.results)
|
||||||
|
|
||||||
if self.backtest_signal_candle_export_enable and \
|
if (self.backtest_signal_candle_export_enable and
|
||||||
self.dataprovider.runmode == RunMode.BACKTEST:
|
self.dataprovider.runmode == RunMode.BACKTEST):
|
||||||
store_backtest_signal_candles(self.config['exportfilename'], self.processed_dfs)
|
store_backtest_signal_candles(self.config['exportfilename'], self.processed_dfs)
|
||||||
|
|
||||||
# Results may be mixed up now. Sort them so they follow --strategy-list order.
|
# Results may be mixed up now. Sort them so they follow --strategy-list order.
|
||||||
|
@ -29,6 +29,7 @@ nav:
|
|||||||
- Data Analysis:
|
- Data Analysis:
|
||||||
- Jupyter Notebooks: data-analysis.md
|
- Jupyter Notebooks: data-analysis.md
|
||||||
- Strategy analysis: strategy_analysis_example.md
|
- Strategy analysis: strategy_analysis_example.md
|
||||||
|
- Backtest analysis: advanced-backtesting.md
|
||||||
- Advanced Topics:
|
- Advanced Topics:
|
||||||
- Advanced Post-installation Tasks: advanced-setup.md
|
- Advanced Post-installation Tasks: advanced-setup.md
|
||||||
- Edge Positioning: edge.md
|
- Edge Positioning: edge.md
|
||||||
|
Loading…
Reference in New Issue
Block a user