Basics
mode: spot
timeframe: 5m
interface version: 3
Settings
stoploss: -0.1
Indicators
Bollinger_Bands
RSI
talib
Concepts
mean_reversion
15 related strategies (⧉ identical code, ≈ similar name)
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 | import talib from freqtrade.strategy import IStrategy from pandas import DataFrame class BollingerBandStrategy(IStrategy): """ Bollinger Band Strategy Entry: When price crosses below the lower Bollinger Band (oversold) Exit: When price crosses above the middle Bollinger Band (mean reversion) """ INTERFACE_VERSION = 3 # Bollinger Bands parameters bb_period = 20 bb_dev = 2.0 # Stoploss stoploss = -0.10 # Trailing stop trailing_stop = False # Optimal timeframe timeframe = '5m' # Can short can_short = False def populate_indicators(self, dataframe: DataFrame, metadata: dict) -> DataFrame: """ Add technical indicators to the dataframe. """ # Calculate Bollinger Bands dataframe['bb_lower'], dataframe['bb_middle'], dataframe['bb_upper'] = talib.BBANDS( dataframe['close'], timeperiod=self.bb_period, nbdevup=self.bb_dev, nbdevdn=self.bb_dev ) # Optional: RSI for confirmation dataframe['rsi'] = talib.RSI(dataframe['close'], timeperiod=14) return dataframe def populate_entry_trend(self, dataframe: DataFrame, metadata: dict) -> DataFrame: """ Populate BUY signal for the given dataframe. Buy when price crosses below lower Bollinger Band AND RSI is oversold. """ dataframe.loc[ ( (dataframe['close'] < dataframe['bb_lower']) & (dataframe['rsi'] < 30) & # RSI oversold confirmation (dataframe['volume'] > 0) ), 'enter_long'] = 1 return dataframe def populate_exit_trend(self, dataframe: DataFrame, metadata: dict) -> DataFrame: """ Populate SELL signal for the given dataframe. Sell when price crosses above middle Bollinger Band. """ dataframe.loc[ ( (dataframe['close'] > dataframe['bb_middle']) & (dataframe['volume'] > 0) ), 'exit_long'] = 1 return dataframe |
Strategy League — fixed backtest that feeds the ranking
Export report Freqtrade logsRun finished · took 337.5s
pairs 33 pairs
timerange 20210101-20260101
mode spot
timeframe 5m
stake 100 USDT
wallet 1000 USDT
max open trades 10
fee exchange lowest tier
total profit-89.90%
final wallet101 USDT
win rate61.0%
max drawdown-93.57%
market change+451.55%
vs market-541.45%
timeframe5m
profit factor0.87
expectancy ratio-0.051
sharpe-3.489
sortino-3.308
CAGR-36.8%
calmar-1.005
avg MFE+1.40%
avg MAE-2.12%
avg profit/trade-0.11%
avg duration1h 13m
best trade+41.20%
worst trade-10.18%
win/loss streak37 / 51
positive months4/13
consistent (3-mo)18.2%
worst 3-mo-98.98%
trades8493
revision1
likely annual return-89%
range (5th–95th)-94% … -79%
chance of profit0.0%
worst-5% outcome-95%
significance (p)0.9995
risk of ruin0.0%
- profit isn't statistically significant (p=1.00) — hard to tell apart from luck
- only 0% of resampled runs were profitable
- profitable in only 18% of rolling 3-month windows
- did not beat simply holding the market
- very deep drawdown (-94%)
Resampling the trade sequence 2,000× shows the spread of results this edge could plausibly produce — separating a dependable strategy from one that got lucky once.
Loading charts…
Monthly breakdown
| Month | Regime | Trades | Profit % | Avg % | Win | Loss | Win % | DD % | Avg dur |
|---|---|---|---|---|---|---|---|---|---|
| Jan 2022 | bearish trending high vol | 109 | -2.49 | -0.23 | 62 | 47 | 56.9 | -93.57 | 1h 22m |
| Dec 2021 | bearish trending high vol | 247 | -3.64 | -0.15 | 145 | 102 | 58.7 | -92.28 | 1h 15m |
| Nov 2021 | bullish trending high vol | 237 | -2.11 | -0.09 | 142 | 95 | 59.9 | -90.15 | 1h 12m |
| Oct 2021 | bullish trending high vol | 238 | -1.80 | -0.08 | 148 | 90 | 62.2 | -88.61 | 1h 12m |
| Sep 2021 | bearish trending high vol | 380 | -23.14 | -0.61 | 215 | 165 | 56.6 | -87.96 | 1h 13m |
| Aug 2021 | bullish trending high vol | 553 | -0.23 | -0.00 | 338 | 215 | 61.1 | -73.43 | 1h 15m |
| Jul 2021 | bearish trending high vol | 564 | -5.84 | -0.10 | 320 | 244 | 56.7 | -73.34 | 1h 20m |
| Jun 2021 | bearish trending high vol | 663 | -10.31 | -0.16 | 376 | 287 | 56.7 | -71.82 | 1h 20m |
| May 2021 | bearish trending high vol | 1006 | -82.83 | -0.82 | 549 | 457 | 54.6 | -65.13 | 1h 11m |
| Apr 2021 | bearish choppy high vol | 1080 | +8.51 | 0.08 | 701 | 379 | 64.9 | -16.09 | 1h 08m |
| Mar 2021 | bullish choppy high vol | 1088 | +3.96 | 0.04 | 683 | 405 | 62.8 | -10.07 | 1h 15m |
| Feb 2021 | bullish trending high vol | 1138 | +9.09 | 0.08 | 745 | 393 | 65.5 | -18.43 | 1h 07m |
| Jan 2021 | bullish trending high vol | 1190 | +20.91 | 0.18 | 757 | 433 | 63.6 | -7.22 | 1h 12m |
Yearly breakdown
| Year | Trades | Profit % | Avg % | Win | Loss | Win % | DD % | Avg dur |
|---|---|---|---|---|---|---|---|---|
| 2022 | 109 | -2.49 | -0.23 | 62 | 47 | 56.9 | -93.57 | 1h 22m |
| 2021 | 8384 | -87.43 | -0.10 | 5119 | 3265 | 61.1 | -92.28 | 1h 13m |
Trade charts — best 2 and worst 2 performing pairs (full OHLC candles are expensive to render for every pair)
Backtests — over a market period
Backtest this strategy over a chosen crypto-cycle period. These don't affect the League ranking, and need that period's candle data downloaded.
Log in or sign up to run backtests.
| Period | Range | Total % | Win % | Max DD | Trades | |
|---|---|---|---|---|---|---|
| 2020 · DeFi Summer & Pre-Halving Rally | 20200101-20210101 | not run | ||||
| 2021 · Institutional Bull Market | 20210101-20220101 | not run | ||||
| 2022 · Post-Bull Crash & Macro Tightening | 20220101-20230101 | not run | ||||
| 2023–2024 · Recovery & ETF Anticipation | 20230101-20250101 | not run | ||||
| 2025–2026 · Current Cycle | 20250101-20260101 | not run | ||||
Walk forward
Out-of-sample backtest on recent data · 33 pairs · 20260101-20260701.
Backtest trust check
no lookahead patterns · 1 thing(s) worth reviewing before trusting the numbers
| Line | Pattern | Detail | |
|---|---|---|---|
| 6 | review | missing_startup_candles | uses recursive indicators (RSI) but startup_candle_count is not set (default 0). Their value at a bar depends on all bars before it, so freqtrade trims no warmup and the backtest opens with unwarmed values that can't occur live. The longest lookback visible here is RSI(timeperiod=14), so it needs at least that many. Set it to a few times the longest period and confirm with `freqtrade recursive-analysis` |
ran by Ron · took s
Lookahead analysis
freqtrade lookahead-analysis: detects strategies peeking at future candles.