Auto-discovered strategy
Symbol: DOGE | Exchange: Binance | Role: momentum
Click a year to view chart
| Year | Return | Win Rate | Trades | Max DD | Sharpe |
|---|---|---|---|---|---|
| 2020 | +29.9% | 50.0% | 6 | 3.3% | 1.41 |
| 2021 | -5.6% | 33.3% | 3 | 7.5% | -1.11 |
| 2022 | -9.3% | 0.0% | 4 | 9.0% | -2.89 |
| 2023 | -11.9% | 16.7% | 6 | 15.1% | -1.43 |
| 2024 | +17.3% | 75.0% | 8 | 2.8% | 1.95 |
| 2025 | +9.6% | 57.1% | 7 | 5.1% | 0.75 |
| Window | Train Period | Val Period | Val Return | Val | Test Period | Test Return | Status |
|---|---|---|---|---|---|---|---|
| WF-1 | 2024-01→2025-06 | 2025-07→2025-12 | +1.6% | OK | 2026-01→ongoing | +0.0% | PASS |
Not yet reviewed. Run: ./review_strategy.sh doge_friday_weekend_trend
"""
DOGE Friday Weekend Trend Strategy
===================================
Day-of-week pattern strategy for DOGEUSDT.
Theory: In uptrending markets, Friday afternoon momentum tends to continue
through the lower-liquidity weekend as retail traders pile in. DOGE as a
meme coin sees amplified weekend effects due to its retail-heavy base.
Entry Logic:
- Friday only (any bar on Friday)
- Uptrend filter: EMA20 > EMA50 (stay flat in bear markets)
- Price above EMA20
- Not overextended: within 15% of EMA20
- Green bar with >0.5% gain
- Breaking 10-bar high (momentum confirmation)
- Volume at or above 20-bar average
Exit Logic:
- Monday (any bar) to capture weekend move
- OR 2 consecutive red bars (momentum reversal)
- 5% stop loss for risk management
Role: momentum (can lose bounded amounts in bear markets)
Train Performance (2024 - 2025H1):
- 2024: +17.3% | 8 trades | 75% WR | Sharpe 1.95 | Max DD 2.8%
- 2025 (H1): +6.9% | 2 trades | 50% WR | Sharpe 0.58 | Max DD 5.0%
- Total: +24.2% | Both periods profitable
"""
import sys
sys.path.insert(0, '/root/trade_rules')
from lib import ema
def init_strategy():
return {
'name': 'doge_friday_weekend_trend',
'role': 'momentum', # Can lose bounded in bear markets
'warmup': 100,
'subscriptions': [
{'symbol': 'DOGEUSDT', 'exchange': 'binance', 'timeframe': '4h'},
],
'parameters': {}
}
def process_time_step(ctx):
key = ('DOGEUSDT', 'binance')
bars = ctx['bars'][key]
i = ctx['i']
positions = ctx['positions']
actions = []
bar = bars[i]
# Pre-compute indicators
closes = [b.close for b in bars[:i+1]]
highs = [b.high for b in bars[:i+1]]
volumes = [b.volume for b in bars[:i+1]]
ema20 = ema(closes, 20)
ema50 = ema(closes, 50)
if key not in positions:
# ===== ENTRY CONDITIONS =====
# Friday only (weekday 4)
dow = bar.timestamp.weekday()
if dow != 4:
return []
# Trend filter: EMA20 > EMA50 (uptrend)
if ema20[i] is None or ema50[i] is None:
return []
if ema20[i] < ema50[i]:
return []
# Price above EMA20
if bar.close < ema20[i]:
return []
# Not overextended (within 15% of EMA20)
if bar.close > ema20[i] * 1.15:
return []
# Green bar with decent gain (>0.5%)
bar_pct = (bar.close - bar.open) / bar.open * 100
if bar_pct < 0.5:
return []
# Breaking 10-bar high
high_10 = max(highs[i-10:i])
if bar.close < high_10:
return []
# Volume at or above 20-bar average
vol_avg = sum(volumes[i-20:i]) / 20
if bar.volume < vol_avg:
return []
actions.append({
'action': 'open_long',
'symbol': 'DOGEUSDT',
'exchange': 'binance',
'size': 1.0,
'stop_loss_pct': 5.0,
})
else:
# ===== EXIT CONDITIONS =====
# Exit on Monday (any Monday bar)
dow = bar.timestamp.weekday()
if dow == 0:
actions.append({
'action': 'close_long',
'symbol': 'DOGEUSDT',
'exchange': 'binance',
})
# Also exit on 2 consecutive red bars (momentum reversal)
elif i >= 2:
red_now = bar.close < bar.open
red_prev = bars[i-1].close < bars[i-1].open
if red_now and red_prev:
actions.append({
'action': 'close_long',
'symbol': 'DOGEUSDT',
'exchange': 'binance',
})
return actions
# For direct testing
if __name__ == '__main__':
from strategy import backtest_strategy
results, profitable, _ = backtest_strategy(init_strategy, process_time_step, verbose=True)