mark_strat_opt Strategy Deep Analysis
Strategy Number: #463 (463rd out of 465 strategies)
Strategy Type: Oversold Rebound + Multi-Indicator Extreme Value Confirmation
Timeframe: 1 minute (1m)
I. Strategy Overview
mark_strat_opt is a short-term strategy focused on capturing extreme oversold conditions. Its core philosophy is "be greedy when others are fearful" — entering when price falls below the lower Bollinger Band by 4 standard deviations and multiple momentum indicators simultaneously reach extreme oversold levels, then waiting for mean reversion.
Core Characteristics
| Feature | Description |
|---|---|
| Buy Conditions | 5 independent indicator conditions, all must be satisfied (AND logic) |
| Sell Conditions | 4-condition combination + trailing stop |
| Protection Mechanisms | Tiered ROI take-profit + trailing stop dual protection |
| Timeframe | 1-minute level, high-frequency trading |
| Dependencies | talib, qtpylib, numpy, pandas |
II. Strategy Configuration Analysis
2.1 Base Risk Parameters
# ROI Exit Table
minimal_roi = {
"0": 0.06965, # 6.965% profit immediately after entry
"8": 0.01125, # Drops to 1.125% after 8 minutes
"19": 0.00498, # Drops to 0.498% after 19 minutes
"34": 0 # Break-even exit after 34 minutes
}
# Stop Loss Setting
stoploss = -0.20206 # 20.2% fixed stop loss
Design Rationale:
- ROI uses rapid decay模式, from 7% quickly dropping to break-even, suitable for ultra-short-term trading
- Wide stop loss (-20%), allowing sufficient price fluctuation space
- Break-even exit after 34 minutes to avoid prolonged position holding
2.2 Trailing Stop Configuration
trailing_stop = True
trailing_only_offset_is_reached = False
trailing_stop_positive = 0.07573 # Trailing activates after 7.57% profit
trailing_stop_positive_offset = 0.09805 # Trailing offset 9.8%
Design Rationale:
- Trailing stop activates after profit exceeds 7.5%
- Trailing offset 9.8%, locking in most profits
- No activation threshold, immediate trailing
2.3 Order Type Configuration
order_types = {
'buy': 'limit',
'sell': 'limit',
'stoploss': 'market',
'stoploss_on_exchange': False
}
III. Buy Conditions Detailed Analysis
3.1 Buy Signal (Single Condition Group, 5 Indicators)
Strategy uses full indicator confirmation mode, all conditions must be satisfied simultaneously:
dataframe.loc[
(
(dataframe['adx'] > 49) & # Condition 1: ADX > 49
(dataframe['fastd'] < 30) & # Condition 2: FastD < 30
(dataframe['mfi'] < 23) & # Condition 3: MFI < 23
(dataframe['rsi'] < 34) & # Condition 4: RSI < 34
(dataframe['close'] < dataframe['bb_lowerband4']) # Condition 5: Close price below BB lower band (4 std dev)
),
'buy'] = 1
3.2 Condition Interpretation
| Condition # | Indicator | Threshold | Market Meaning |
|---|---|---|---|
| #1 | ADX | > 49 | Extremely high trend strength (extreme market conditions) |
| #2 | FastD | < 30 | Stochastic indicator oversold |
| #3 | MFI | < 23 | Money flow极度枯竭 |
| #4 | RSI | < 34 | Relative strength oversold |
| #5 | Close Price | < BB Lower Band 4σ | Price extremely deviated from mean |
Buy Logic Summary:
- This is an extreme oversold capture strategy
- Requires extremely high trend strength (ADX > 49) to ensure sufficient volatility
- Simultaneously requires multiple momentum indicators in oversold territory
- Price must fall below Bollinger Band lower band by 4 standard deviations, an extremely rare extreme condition
- Five-fold condition simultaneous satisfaction, signals are rare but extremely high quality
IV. Sell Logic Detailed Analysis
4.1 Sell Signal (4-Condition Combination)
dataframe.loc[
(
(dataframe['adx'] < 95) & # Condition 1: ADX < 95
(dataframe['fastd'] > 70) & # Condition 2: FastD > 70
(dataframe['rsi'] > 94) & # Condition 3: RSI > 94
(qtpylib.crossed_above(dataframe['sar'], dataframe['close'])) # Condition 4: SAR crosses above close
),
'sell'] = 1
| Condition # | Indicator | Threshold | Market Meaning |
|---|---|---|---|
| #1 | ADX | < 95 | Trend strength limit (almost always satisfied) |
| #2 | FastD | > 70 | Stochastic indicator overbought |
| #3 | RSI | > 94 | Relative strength极度超买 |
| #4 | SAR | Crosses above close | Parabolic SAR bearish reversal signal |
Sell Logic Summary:
- Requires multiple indicators simultaneously entering extreme overbought territory
- SAR crossing above close price as trend reversal confirmation
- Signal trigger means price has rebounded significantly
4.2 ROI Tiered Take-Profit
| Time (minutes) | Target Return | Description |
|---|---|---|
| 0 | 6.965% | Immediate take-profit threshold after entry |
| 8 | 1.125% | Lower requirement after 8 minutes |
| 19 | 0.498% | Further reduced after 19 minutes |
| 34 | 0% | Break-even exit after 34 minutes |
4.3 Trailing Stop Mechanism
- Activation threshold: 7.57% profit
- Trailing offset: 9.8%
- When price continues rising, trailing stop locks in profits
V. Technical Indicator System
5.1 Core Indicators
| Indicator Category | Specific Indicator | Usage |
|---|---|---|
| Trend Strength | ADX | Judge whether trend is strong enough |
| Momentum Indicator | RSI | Relative strength oversold/overbought judgment |
| Money Flow | MFI | Money inflow/outflow intensity |
| Stochastic Indicator | FastD (Stochastic Fast) | Fast stochastic indicator |
| Volatility Channel | Bollinger Bands (4σ) | Price extreme deviation judgment |
| Trend Reversal | SAR (Parabolic SAR) | Trend reversal signal |
| Trend Indicator | MACD | Auxiliary trend judgment |
5.2 Indicator Calculation Code
# Trend strength indicators
dataframe['adx'] = ta.ADX(dataframe)
dataframe['sar'] = ta.SAR(dataframe)
# Momentum indicators
dataframe['rsi'] = ta.RSI(dataframe)
dataframe['mfi'] = ta.MFI(dataframe)
# Stochastic indicator
stoch_fast = ta.STOCHF(dataframe)
dataframe['fastd'] = stoch_fast['fastd']
# Bollinger Bands (4 standard deviations)
bollinger4 = qtpylib.bollinger_bands(
qtpylib.typical_price(dataframe), window=20, stds=4
)
dataframe['bb_lowerband4'] = bollinger4['lower']
# MACD
macd = ta.MACD(dataframe)
dataframe['macd'] = macd['macd']
dataframe['macdsignal'] = macd['macdsignal']
VI. Risk Management Features
6.1 Extreme Value Multiple Confirmation
Strategy requires 5 conditions to be satisfied simultaneously before entry:
- ADX > 49: Ensure sufficient trend strength
- FastD < 30, RSI < 34, MFI < 23: Multiple oversold confirmation
- Close price below Bollinger Band lower band 4 standard deviations: Price extreme deviation
6.2 Rapid Take-Profit Mechanism
- ROI rapidly decays from 7% to break-even
- Forced break-even exit after 34 minutes
- Trailing stop locks in significant profits
6.3 Wide Stop Loss Space
- Fixed stop loss -20.2%, providing sufficient room for maneuver
- Avoid being stopped out by normal fluctuations
VII. Strategy Advantages and Limitations
✅ Advantages
- Extremely high signal quality: 5-fold condition simultaneous satisfaction greatly reduces false signals
- Captures extreme market conditions: Bollinger Band 4 standard deviations is an extremely rare oversold situation
- Rapid take-profit mechanism: ROI rapid decay + trailing stop dual protection
- Clear logic: Buy and sell conditions are explicit, strong interpretability
⚠️ Limitations
- Rare signals: Extreme oversold market conditions don't occur often, limited trading opportunities
- High-frequency requirements: 1-minute level requires stable API connection and low latency
- Slippage risk: Liquidity may be insufficient during extreme market conditions
- Overfitting risk: Precise parameter thresholds may be historical data fitting results
VIII. Applicable Scenario Recommendations
| Market Environment | Recommended Configuration | Description |
|---|---|---|
| Severe volatility | Keep original parameters | Extreme conditions are exactly the strategy's strength |
| Oscillating decline | Can appropriately relax RSI threshold | Increase trading frequency |
| Stable market | Not recommended | Signals extremely rare, low capital utilization |
| Rapid rally | Not applicable | Strategy focuses on oversold rebound |
IX. Applicable Market Environment Detailed Analysis
mark_strat_opt is an extreme oversold capture strategy. Based on its code architecture, it is most suitable for high volatility, trend-obvious markets, and performs poorly in stable oscillating markets.
9.1 Strategy Core Logic
- Extreme value capture: Wait for price to fall below Bollinger Band lower band by 4 standard deviations
- Multiple confirmation: 5 indicators simultaneously oversold, reducing false signals
- Rapid profit taking: ROI rapid decay, timely profit realization
9.2 Performance in Different Market Environments
| Market Type | Performance Rating | Reason Analysis |
|---|---|---|
| 📈 Sharp decline followed by rebound | ⭐⭐⭐⭐⭐ | Exactly the strategy's designed best scenario |
| 🔄 High volatility oscillation | ⭐⭐⭐☆☆ | May have some extreme oversold opportunities |
| 📉 One-sided bear market | ⭐⭐☆☆☆ | Continuous decline may trigger stop loss |
| ⚡️ Stable market | ⭐☆☆☆☆ | Signals extremely rare, capital idle |
9.3 Key Configuration Recommendations
| Configuration Item | Recommended Value | Description |
|---|---|---|
| Timeframe | 1m (native) | Not recommended to modify |
| Trading pairs | High volatility varieties | Such as BTC, ETH, etc. |
| Capital allocation | 10-20% | Signals rare, avoid capital idle |
X. Important Reminder: The Cost of Complexity
10.1 Learning Cost
Strategy logic is relatively simple, but requires understanding:
- Meaning of Bollinger Band extreme deviation
- Coordination relationship of multiple momentum indicators
- Working principle of trailing stop
10.2 Hardware Requirements
| Number of Trading Pairs | Minimum Memory | Recommended Memory |
|---|---|---|
| 1-5 pairs | 4GB | 8GB |
| 6-20 pairs | 8GB | 16GB |
| 20+ pairs | 16GB | 32GB |
10.3 Differences Between Backtest and Live Trading
- Slippage may be significant during extreme market conditions
- 1-minute level is sensitive to API latency
- Live trading signals may be fewer than backtest
10.4 Manual Trader Recommendations
- Can use this strategy as "extreme oversold alert"
- Manually confirm whether to enter when signals trigger
- Note liquidity risk during extreme market conditions
XI. Summary
mark_strat_opt is a short-term strategy focused on extreme oversold market conditions. Its core value lies in:
- Signal quality priority: 5-fold condition confirmation, better to miss than make mistakes
- Extreme market expert: Bollinger Band 4 standard deviations is an extremely rare trading opportunity
- Rapid take-profit protection: ROI rapid decay + trailing stop dual profit locking
For quantitative traders, this is a low-frequency high-quality strategy, suitable as a "sniper" role in the portfolio, capturing rebound opportunities during extreme market panic.