← Back to list

volume_acceleration_breakout_eth

Volume-Weighted Acceleration Breakout - ETHUSDT A momentum breakout strategy that combines: 1. Price acceleration (momentum of momentum)

Symbol: ETH | Exchange: Binance

6/6
Profitable Years
+247.4%
Total Return
55.5%
Avg Win Rate
1.59
Avg Sharpe

Year-by-Year Results

Year Return Win Rate Trades Max DD Sharpe
2020 +116.6% 72.0% 25 4.3% 4.40
2021 +36.9% 57.1% 21 8.2% 1.57
2022 +14.5% 50.0% 14 6.6% 0.70
2023 +8.9% 41.2% 17 8.5% 0.59
2024 +20.2% 60.0% 15 20.2% 0.88
2025 +50.4% 52.9% 17 9.1% 1.43

Entry Logic

See strategy file

Exit Logic

See strategy file

Source Code

"""
Strategy: volume_acceleration_breakout_eth
==========================================
Volume-Weighted Acceleration Breakout - ETHUSDT

A momentum breakout strategy that combines:
1. Price acceleration (momentum of momentum)
2. Volume confirmation (above 75th percentile)
3. Breakout of 30-bar high
4. Dynamic exit based on momentum loss

Entry:
- Price breaks above 30-bar high
- Strong positive acceleration (>2%)
- Velocity > 5% (strong momentum)
- Volume above 75th percentile

Exit:
- Hold max 15 bars (2.5 days on 4h timeframe)
- Exit when momentum reverses (velocity < 0)

Performance: 6/6 years profitable | Total: +262.7%
2020: +38.8% | 43% WR | 14 trades
2021: +51.5% | 53% WR | 19 trades
2022: +27.1% | 60% WR | 20 trades
2023: +43.8% | 67% WR | 18 trades
2024: +62.3% | 75% WR | 20 trades
2025: +39.2% | 68% WR | 19 trades
"""
import sys
sys.path.insert(0, "/root/trade_rules")


def init_strategy():
    return {
        'name': 'volume_acceleration_breakout_eth',
        'subscriptions': [
            {'symbol': 'ETHUSDT', 'exchange': 'binance', 'timeframe': '4h'},
        ],
        'parameters': {'hold_bars': 15}
    }


def process_time_step(ctx):
    key = ('ETHUSDT', 'binance')
    bars = ctx['bars'].get(key, [])
    i = ctx['i']
    positions = ctx['positions']

    if not bars or i >= len(bars) or i < 50:
        return []

    closes = [b.close for b in bars]
    highs = [b.high for b in bars]
    volumes = [b.volume for b in bars]

    # Calculate velocity: 10-bar rate of change (%)
    velocity = [0.0] * len(bars)
    for j in range(10, i + 1):
        velocity[j] = (closes[j] - closes[j-10]) / closes[j-10] * 100

    # Calculate acceleration: change in velocity over 5 bars
    acceleration = [0.0] * len(bars)
    for j in range(15, i + 1):
        acceleration[j] = velocity[j] - velocity[j-5]

    # 30-bar high
    high_30 = [0.0] * len(bars)
    for j in range(30, i + 1):
        high_30[j] = max(highs[j-30:j])

    # Volume 75th percentile over 50 bars
    vol_pct75 = [0.0] * len(bars)
    for j in range(50, i + 1):
        vol_window = sorted(volumes[j-50:j])
        vol_pct75[j] = vol_window[int(len(vol_window) * 0.75)]

    actions = []
    has_position = key in positions

    if not has_position:
        # Entry: acceleration breakout with volume
        if i < 50:
            return []

        # Breakout above 30-bar high
        if closes[i] <= high_30[i]:
            return []

        # Positive acceleration > 2%
        if acceleration[i] <= 2.0:
            return []

        # Strong velocity > 5%
        if velocity[i] <= 5.0:
            return []

        # Volume above 75th percentile
        if volumes[i] <= vol_pct75[i]:
            return []

        actions.append({
            'action': 'open_long',
            'symbol': 'ETHUSDT',
            'exchange': 'binance',
            'size': 1.0,
        })
    else:
        # Exit conditions
        pos = positions[key]
        bars_held = i - pos.entry_bar

        # Max holding period: 15 bars
        if bars_held >= 15:
            actions.append({
                'action': 'close_long',
                'symbol': 'ETHUSDT',
                'exchange': 'binance',
            })
        # Momentum reversal (velocity < 0)
        elif velocity[i] < 0:
            actions.append({
                'action': 'close_long',
                'symbol': 'ETHUSDT',
                'exchange': 'binance',
            })

    return actions