Skip to main content

BBRSIOptim2020Strategy - In-Depth Strategy Analysis

Strategy Number: #430 (430th of 465 strategies)
Strategy Type: Extreme Oversold Bounce Strategy
Timeframe: 5 minutes (5m)


I. Strategy Overview

BBRSIOptim2020Strategy is an aggressive strategy focused on capturing extreme oversold conditions. Unlike typical Bollinger Band strategies, this strategy uses a 3-standard deviation Bollinger Band lower band as its entry signal, only building positions when price experiences statistically extreme declines, aiming to profit from significant rebound moves.

Core Characteristics

FeatureDescription
Entry Conditions1 core buy signal (extreme oversold)
Exit Conditions1 basic sell signal + Tiered ROI take-profit + Trailing stop
Protection MechanismWide stop loss (-33.1%) + Trailing stop
Timeframe5m (primary timeframe)
Dependenciestalib, qtpylib, numpy, pandas

II. Strategy Configuration Analysis

2.1 Basic Risk Parameters

# ROI exit table
minimal_roi = {
"0": 0.336, # Exit at 33.6% profit immediately
"40": 0.072, # After 40 minutes, reduce target to 7.2%
"218": 0.021, # After 218 minutes, reduce target to 2.1%
"459": 0 # After 459 minutes, break-even exit
}

# Stop loss setting
stoploss = -0.331 # 33.1% stop loss (extremely wide)

# Trailing stop
trailing_stop = True

Design Rationale:

  • Extremely high ROI targets (initial target 33.6%), reflecting the strategy's pursuit of extreme bounce returns
  • Extremely wide stop loss (33.1%), giving price substantial room to fluctuate
  • Uses tiered ROI to gradually lower targets, balancing returns with risk

2.2 Order Type Configuration

order_types = {
'buy': 'limit', # Limit order for buying
'sell': 'limit', # Limit order for selling
'stoploss': 'market', # Market order for stop loss
'stoploss_on_exchange': False
}

order_time_in_force = {
'buy': 'gtc', # Good Till Cancelled
'sell': 'gtc'
}

III. Entry Conditions Detailed

3.1 Core Entry Logic

The strategy uses an extreme oversold condition as its entry signal:

def populate_entry_trend(self, dataframe: DataFrame, metadata: dict) -> DataFrame:
dataframe.loc[
(
(dataframe['close'] < dataframe['bb_lowerband_3sd'])
),
'buy'] = 1
return dataframe

Entry Condition:

Condition #IndicatorThresholdLogic Description
Condition #1Bollinger Band (3SD)close < bb_lowerband_3sdClose price breaks below 3 standard deviation lower band

Design Intent:

  • 3 standard deviation Bollinger Band lower band represents a statistically extreme anomaly (outside approximately 99.7% confidence interval)
  • Entry signals only trigger when price experiences extreme crashes
  • Aiming to profit from strong rebounds after extreme oversold conditions

3.2 Technical Indicator Parameters

Bollinger Band Configuration:

  • Period: 20
  • Standard Deviation Multiplier: 3 (extreme threshold)
  • Price Type: Typical Price ((High + Low + Close) / 3)

Note: Although RSI is calculated in the code, it is not used as a filter condition in the entry logic.


IV. Exit Logic Detailed

4.1 Sell Signal Logic

def populate_exit_trend(self, dataframe: DataFrame, metadata: dict) -> DataFrame:
dataframe.loc[
(
(dataframe['close'] > dataframe['bb_middleband_1sd'])
),
'sell'] = 1
return dataframe

Exit Condition:

Condition #IndicatorThresholdLogic Description
Condition #1Bollinger Band (1SD)close > bb_middleband_1sdClose price above 1 standard deviation middle band

Exit Mechanism Summary:

Exit TypeTrigger ConditionDescription
Signal ExitPrice > 1SD middle bandTechnical signal exit
ROI Take ProfitProfit target reachedTiered target exit
Trailing StopPrice retracementLock in existing profits
Fixed Stop Loss33.1% lossRisk control protection (extremely wide)

4.2 Tiered ROI Take-Profit Table

Holding TimeProfit TargetDescription
0-40 minutes33.6%Extremely high profit target
40-218 minutes7.2%Moderately lower expectations
218-459 minutes2.1%Preserve small profit exit
459+ minutes0%Break-even exit

Design Features:

  • Initial target of 33.6% far exceeds typical strategies
  • Longer time span (maximum 459 minutes, approximately 7.6 hours)
  • Gradually lowers targets to adapt to different market conditions

V. Technical Indicator System

5.1 Core Indicators

Indicator CategorySpecific IndicatorPurpose
Trend IndicatorBollinger Bands (20 period, 1 standard deviation)Exit reference
Trend IndicatorBollinger Bands (20 period, 3 standard deviations)Entry signal
Momentum IndicatorRSI (default 14 period)Calculated but not used

5.2 Indicator Calculation Logic

def populate_indicators(self, dataframe: DataFrame, metadata: dict) -> DataFrame:
# RSI calculation (not used)
dataframe['rsi'] = ta.RSI(dataframe)

# 1 standard deviation Bollinger Band (for exit)
bollinger_1sd = qtpylib.bollinger_bands(
qtpylib.typical_price(dataframe), window=20, stds=1
)
dataframe['bb_middleband_1sd'] = bollinger_1sd['mid']

# 3 standard deviation Bollinger Band (for entry)
bollinger_3sd = qtpylib.bollinger_bands(
qtpylib.typical_price(dataframe), window=20, stds=3
)
dataframe['bb_lowerband_3sd'] = bollinger_3sd['lower']

return dataframe

Key Parameter Notes:

  • Entry Threshold: 3 standard deviation lower band, covering approximately 99.7% of price distribution
  • Exit Reference: 1 standard deviation middle band, relatively loose exit condition
  • RSI: Calculated but not used in trading logic

VI. Risk Management Features

6.1 Extremely Wide Stop Loss Design

stoploss = -0.331  # 33.1% stop loss

Feature Analysis:

  • 33.1% stop loss far exceeds typical strategies (usually 5%-15%)
  • Reflects the aggressive nature of the strategy in pursuing extreme rebounds
  • Gives price substantial room for fluctuation, avoiding being shaken out by normal volatility

Risk Warning:

  • Single trade maximum loss can reach 33.1%
  • Requires strict money management, avoid heavy positions
  • Not suitable for traders with low risk tolerance

6.2 Tiered ROI Design

minimal_roi = {
"0": 0.336, # Initial target 33.6%
"40": 0.072, # After 40 minutes, 7.2%
"218": 0.021, # After 3.6 hours, 2.1%
"459": 0 # After 7.6 hours, break-even
}

Design Logic:

  • Extreme oversold conditions may produce strong rebounds, hence high initial target
  • Gradually lower targets when rebound underperforms expectations
  • Longer duration means lower bounce probability, more conservative targets

6.3 Startup Period Requirement

startup_candle_count: int = 30  # 30 candles needed for warm-up

The strategy requires at least 30 candles to generate valid signals, ensuring indicator calculation stability.


VII. Strategy Advantages and Limitations

✅ Advantages

  1. High Probability Extreme Signals: 3 standard deviation events are rare but have high bounce probability when they occur
  2. Clear Risk-Reward Ratio: 33.1% stop loss vs 33.6% initial target, approximately 1:1 ratio
  3. Simple Logic: Single condition entry, easy to understand and execute
  4. Trailing Stop Protection: Trailing stop enabled to lock in profits

⚠️ Limitations

  1. Extremely Wide Stop Loss: 33.1% stop loss may cause significant single-trade losses
  2. Infrequent Signals: 3 standard deviation events are rare, limited trading opportunities
  3. RSI Not Used: Although RSI is calculated, it's not used in the logic
  4. High Target Difficult to Achieve: 33.6% initial target is challenging to reach in practice
  5. High-Risk Strategy: Not suitable for conservative traders

VIII. Applicable Scenario Recommendations

Market EnvironmentRecommended ConfigurationDescription
Crash followed by reboundDefault configurationOptimal scenario for capturing extreme oversold
High volatility coinsReduced position sizeMore signals may occur with higher volatility
Low volatility marketNot recommendedVery few signals, idle capital
Single-direction downtrendPause strategyExtremely high risk of catching falling knives

IX. Applicable Market Environment Details

BBRSIOptim2020Strategy is an extreme oversold bounce strategy. Based on its code architecture and aggressive parameter configuration, it is best suited for strong rebound moves after crashes, while performance is limited during normal volatility or trending markets.

9.1 Strategy Core Logic

  • Extreme Threshold: Uses 3 standard deviation Bollinger Bands, only entering on statistically extreme events
  • High Target Returns: Initial target of 33.6%, pursuing significant rebounds
  • Wide Stop Loss: Gives extreme volatility substantial room, avoiding being shaken out by normal fluctuations

9.2 Performance in Different Market Environments

Market TypePerformance RatingReason Analysis
📈 Strong Uptrend⭐☆☆☆☆Price won't touch 3SD lower band, no signals
🔄 Oscillating Bounce⭐⭐☆☆☆Normal oscillation won't touch extreme threshold
📉 Crash Bounce⭐⭐⭐⭐⭐Optimal scenario, strong rebound after extreme oversold
⚡️ High Volatility⭐⭐⭐☆☆May touch threshold, but need to filter real from fake signals

9.3 Key Configuration Recommendations

Configuration ItemRecommended ValueDescription
Timeframe5m (default)Short period to capture rebounds
Stop Loss-0.2 ~ -0.33Adjust based on risk tolerance
Per-Trade Position≤5%High-risk strategy requires position control
Startup Candles30Ensure indicator stability

X. Important Note: The Cost of Complexity

10.1 Learning Curve

BBRSIOptim2020Strategy has minimal code and simple logic:

  • Core code is approximately 70 lines
  • Technical indicators are straightforward and clear
  • Single entry condition, easy to understand

10.2 Hardware Requirements

Number of Trading PairsMinimum MemoryRecommended Memory
1-10 pairs2GB4GB
10-50 pairs4GB8GB
50+ pairs8GB16GB

10.3 Backtesting vs Live Trading Differences

Important Notes:

  • Extreme events in backtesting may be more or less frequent than in live trading
  • 33.6% initial target is difficult to achieve in live trading
  • 33.1% stop loss may cause significant psychological pressure in practice
  • During extreme oversold conditions, liquidity may be insufficient, high slippage risk

10.4 Manual Trading Recommendations

If manually executing this strategy:

  1. Use 5-minute chart, set up 3 standard deviation Bollinger Bands
  2. Wait for price to touch 3SD lower band
  3. Enter, set trailing stop
  4. Strict risk control, single position no more than 5% of total capital
  5. Be mentally prepared to withstand 30%+ floating loss

XI. Summary

BBRSIOptim2020Strategy is an aggressive extreme oversold bounce strategy. Its core value lies in:

  1. Extreme Signals: Only enters on 3 standard deviation oversold, rare signals but high potential returns
  2. High Risk High Reward: 33% level stop loss and target, suitable for aggressive traders
  3. Simple Logic: Single condition, easy to understand and execute

For quantitative traders, this is a high-risk high-reward strategy suitable for experienced traders who can withstand significant drawdowns. It is not recommended for beginners to use directly.