Make documentation discoverable / linked

This commit is contained in:
Matthias
2023-06-16 06:44:55 +02:00
parent b3ef024e9e
commit 2cd9043c51
2 changed files with 20 additions and 19 deletions

View File

@@ -1,4 +1,5 @@
# Lookahead analysis
This page explains how to validate your strategy in terms of look ahead bias.
Checking look ahead bias is the bane of any strategy since it is sometimes very easy to introduce backtest bias -
@@ -11,19 +12,18 @@ Lookahead-analysis requires historic data to be available.
To learn how to get data for the pairs and exchange you're interested in,
head over to the [Data Downloading](data-download.md) section of the documentation.
This command is built upon backtesting
since it internally chains backtests and pokes at the strategy to provoke it to show look ahead bias.
This command is built upon backtesting since it internally chains backtests and pokes at the strategy to provoke it to show look ahead bias.
This is done by not looking at the strategy itself - but at the results it returned.
The results are things like changed indicator-values and moved entries/exits compared to the full backtest.
The results are things like changed indicator-values and moved entries/exits compared to the full backtest.
You can use commands of [Backtesting](backtesting.md).
It also supports the lookahead-analysis of freqai strategies.
- --cache is forced to "none"
- --max_open_trades is forced to be at least equal to the number of pairs
- --dry_run_wallet is forced to be basically infinite
- `--cache` is forced to "none".
- `--max-open-trades` is forced to be at least equal to the number of pairs.
- `--dry-run-wallet` is forced to be basically infinite.
## Backtesting command reference
## Lookahead-analysis command reference
```
usage: freqtrade lookahead-analysis [-h] [-v] [-V]
@@ -45,13 +45,14 @@ optional arguments:
Use this filename to save your lookahead-analysis-results to a csv file
```
### Summary
#### Summary
Checks a given strategy for look ahead bias via lookahead-analysis
Look ahead bias means that the backtest uses data from future candles thereby not making it viable beyond backtesting
and producing false hopes for the one backtesting.
#### Introduction:
### Introduction
Many strategies - without the programmer knowing - have fallen prey to look ahead bias.
Any backtest will populate the full dataframe including all time stamps at the beginning.
@@ -61,9 +62,10 @@ but not realistic.
This command is made to try to verify the validity in the form of the aforementioned look ahead bias.
#### How does the command work?
### How does the command work?
It will start with a backtest of all pairs to generate a baseline for indicators and entries/exits.
After the backtest ran, it will look if the minimum-trade-amount is met
After the backtest ran, it will look if the `minimum-trade-amount` is met
and if not cancel the lookahead-analysis for this strategy.
After setting the baseline it will then do additional runs for every entry and exit separately.
@@ -71,13 +73,11 @@ When a verification-backtest is done, it will compare the indicators as the sign
and report the bias.
After all signals have been verified or falsified a result-table will be generated for the user to see.
#### Caveats:
- The lookahead-analysis can only verify / falsify the trades it calculated through.
If there was a strategy with signals that were not triggered in the lookahead-analysis
then it will not have it verified that entry/exit signal either.
### Caveats
- `lookahead-analysis` can only verify / falsify the trades it calculated through.
If there was a strategy with signals that were not triggered during the lookahead-analysis, then it will not have it verified that entry/exit signal either.
This could then lead to a false-negative (the strategy will then be reported as non-biased).
- lookahead-analysis has access to everything that backtesting has too.
- `lookahead-analysis` has access to everything that backtesting has too.
Please don't provoke any configs like enabling position stacking.
If you decide to do so,
then make doubly sure that you won't ever run out of max_open_trades
amount and neither leftover money in your wallet.
If you decide to do so, then make doubly sure that you won't ever run out of `max_open_trades` amount and neither leftover money in your wallet.

View File

@@ -22,6 +22,7 @@ nav:
- Web Hook: webhook-config.md
- Data Downloading: data-download.md
- Backtesting: backtesting.md
- Lookahead analysis: lookahead-analysis.md
- Hyperopt: hyperopt.md
- FreqAI:
- Introduction: freqai.md