QuantLearn
Trading Strategies
Dual Thrust
Range breakout strategy with dynamic thresholds
Historical Backtest Results
Backtesting results demonstrating Dual Thrust strategy performance across different market conditions.

Dual Thrust Trading Positions
Intraday position changes showing long/short signals triggered by upper and lower threshold breaks.

Dynamic Threshold Levels
Daily upper and lower thresholds calculated using previous day's range, showing breakout trigger levels.

Strategy Performance
Cumulative returns comparing Dual Thrust strategy performance against buy-and-hold benchmark.
Opening Range Breakout Theory
Dual Thrust is a classic opening range breakout strategy developed by Michael Chalek, founder of Universal Technical Systems.
The strategy is based on the concept that significant price movements often occur when markets break out of established trading ranges.
Unlike complex rocket science algorithms, Dual Thrust relies on elementary mathematical calculations accessible to any trader.
The strategy establishes upper and lower thresholds based on previous days' high, low, open, and close prices.
When the current price exceeds these thresholds, it signals potential momentum continuation, triggering long or short positions.
The beauty of this strategy lies in its simplicity - it requires no stop-loss mechanisms as positions are reversed when price crosses from one threshold to another.
Mathematical Foundation
1Range Calculation
Daily range is the maximum of yesterday's high minus close or close minus yesterday's low.
2Upper Threshold
Upper breakout threshold where k₁ is typically 0.7. Long positions initiated when price exceeds this level.
3Lower Threshold
Lower breakout threshold where k₂ is typically 0.7. Short positions initiated when price falls below this level.
4Alternative Range Formula
Simple high-low range calculation, often used as alternative to the max formula above.
Core Algorithm Implementation
The Dual Thrust algorithm calculates dynamic thresholds each day and generates signals when price breaks these levels.
Threshold Calculation
def dual_thrust_thresholds(df, k1=0.7, k2=0.7):
"""Calculate Dual Thrust upper and lower thresholds"""
df = df.copy()
# Calculate daily range using max formula
df['range'] = np.maximum(
df['High'].shift(1) - df['Close'].shift(1),
df['Close'].shift(1) - df['Low'].shift(1)
)
# Alternative: simple high-low range
# df['range'] = df['High'].shift(1) - df['Low'].shift(1)
# Calculate thresholds
df['upper_threshold'] = df['Open'] + k1 * df['range']
df['lower_threshold'] = df['Open'] - k2 * df['range']
return dfCalculates dynamic upper and lower thresholds based on previous day's range and current day's opening price.
Signal Generation
def generate_signals(df):
"""Generate Dual Thrust trading signals"""
df = df.copy()
df['position'] = 0
df['signal'] = 0
current_position = 0
for i in range(1, len(df)):
price = df['Close'].iloc[i]
upper = df['upper_threshold'].iloc[i]
lower = df['lower_threshold'].iloc[i]
# Long signal when price breaks upper threshold
if price > upper and current_position <= 0:
df.loc[df.index[i], 'signal'] = 1
current_position = 1
# Short signal when price breaks lower threshold
elif price < lower and current_position >= 0:
df.loc[df.index[i], 'signal'] = -1
current_position = -1
df.loc[df.index[i], 'position'] = current_position
return dfGenerates trading signals when price breaks through upper or lower thresholds, automatically reversing positions.
Intraday Position Management
def intraday_dual_thrust(df, k1=0.7, k2=0.7):
"""Complete intraday Dual Thrust implementation"""
df = dual_thrust_thresholds(df, k1, k2)
df = generate_signals(df)
# Clear all positions at end of trading day
df['date'] = pd.to_datetime(df.index).date
for date in df['date'].unique():
day_mask = df['date'] == date
day_data = df[day_mask]
if len(day_data) > 0:
# Force close at end of day
df.loc[day_data.index[-1], 'position'] = 0
# Calculate returns
df['strategy_returns'] = df['position'].shift(1) * df['Close'].pct_change()
df['cumulative_returns'] = (1 + df['strategy_returns']).cumprod() - 1
return dfComplete implementation including intraday position management and mandatory end-of-day position clearing.
Implementation Steps
- 1Calculate previous day's trading range using high, low, open, and close prices
- 2Determine upper threshold: Today's open + k₁ × Range
- 3Determine lower threshold: Today's open - k₂ × Range
- 4Monitor intraday price movements against calculated thresholds
- 5Enter long position when price breaks above upper threshold
- 6Enter short position when price breaks below lower threshold
- 7Reverse positions when price crosses from one threshold to another
- 8Clear all positions at the end of trading day (mandatory rule)
- 9Recalculate thresholds for next trading day
Key Metrics
Risk Considerations
Practice Implementation
Prerequisites
Mathematical Background
- • Linear regression and OLS estimation
- • Time series analysis (stationarity, unit roots)
- • Hypothesis testing and p-values
- • Basic econometrics (error correction models)
Technical Skills
- • Python programming (pandas, numpy)
- • Statistical libraries (statsmodels)
- • Data visualization (matplotlib)
- • Financial data handling (yfinance)
Complete Implementation
Access the full Python implementation from the original quantitative trading repository:
# Complete pair trading implementation
git clone https://github.com/je-suis-tm/quant-trading.git
cd quant-trading
python "Pair trading backtest.py"
# Modify tickers and parameters for your own analysisLearning Checkpoints
Understand Cointegration
Can you explain why two assets might be cointegrated and what breaks this relationship?
Interpret Statistical Tests
Practice reading ADF test results and understanding when to accept/reject cointegration.
Signal Generation
Implement Z-score calculations and understand threshold selection (±1σ vs ±2σ).
Risk Management
Understand position sizing, monitoring regime changes, and exit strategies.
Recommended Learning Path
Immediate Actions
- Download and run the Python script
- Test with different asset pairs
- Experiment with threshold parameters
Advanced Studies
- Learn Johansen cointegration test
- Study Vector Error Correction Models
- Explore multiple asset pair trading
Important Disclaimer
This strategy involves significant risk. Historical cointegration relationships can break permanently. Always use proper risk management, position sizing, and never risk more than you can afford to lose. Paper trade extensively before using real capital.