Skip to content

Revamp strategy: switch live deployment to QQQ hourly trend, fix repl…#5

Merged
utkarshp845 merged 1 commit into
masterfrom
claude/alpaca-bot-strategy-revamp-feecee
Jul 12, 2026
Merged

Revamp strategy: switch live deployment to QQQ hourly trend, fix repl…#5
utkarshp845 merged 1 commit into
masterfrom
claude/alpaca-bot-strategy-revamp-feecee

Conversation

@utkarshp845

Copy link
Copy Markdown
Owner

…ay and data bugs

Why the live BTC bot made no valuable trades (see docs/strategy_revamp_2026-07.md):

  • The 5m filter stack fired 2 trades in 120 days of real bars, both losses
  • $45 positions cannot clear Alpaca crypto's ~0.6% round-trip friction
  • BTC fell 46% over the replay year and Alpaca cannot short crypto

Changes:

  • config/live_spy.env + paper_spy.env: QQQ hourly trend-following, ~90% notional fractional sizing, daily-EMA regime gate, wide trails, multi-day holds. Replay 2023-08..2026-07: +37% on $150, PF 1.76, max DD 6.7%, positive every calendar year, robust to 3x slippage
  • config/live_btc.env + paper_btc.env: defensive uptrend-only trend config (0 trades in the 2025-26 bear replay, mildly positive in the 2024-25 bull)
  • bot/trade_controls.py: replay now resets the consecutive-loss streak on ET day rollover like the live store; previously every backtest locked out entries permanently after the streak limit, invalidating prior research
  • bot/broker_alpaca.py: get_recent_bars lookback now scales with timeframe and session hours; the fixed 7-day window could never warm up hourly/daily regime indicators
  • bot/profile.py: profile env files now win over market defaults so configs can set SYMBOL/overnight behavior
  • docker-compose, deploy script, GitHub workflow: default market btc -> spy (BTC services remain as trade-btc/paper-btc/research-btc)
  • tests: updated profile contract expectations, added regression tests for the loss-streak reset and profile precedence (66 passed)

…ay and data bugs

Why the live BTC bot made no valuable trades (see docs/strategy_revamp_2026-07.md):
- The 5m filter stack fired 2 trades in 120 days of real bars, both losses
- $45 positions cannot clear Alpaca crypto's ~0.6% round-trip friction
- BTC fell 46% over the replay year and Alpaca cannot short crypto

Changes:
- config/live_spy.env + paper_spy.env: QQQ hourly trend-following, ~90%
  notional fractional sizing, daily-EMA regime gate, wide trails, multi-day
  holds. Replay 2023-08..2026-07: +37% on $150, PF 1.76, max DD 6.7%,
  positive every calendar year, robust to 3x slippage
- config/live_btc.env + paper_btc.env: defensive uptrend-only trend config
  (0 trades in the 2025-26 bear replay, mildly positive in the 2024-25 bull)
- bot/trade_controls.py: replay now resets the consecutive-loss streak on ET
  day rollover like the live store; previously every backtest locked out
  entries permanently after the streak limit, invalidating prior research
- bot/broker_alpaca.py: get_recent_bars lookback now scales with timeframe
  and session hours; the fixed 7-day window could never warm up hourly/daily
  regime indicators
- bot/profile.py: profile env files now win over market defaults so configs
  can set SYMBOL/overnight behavior
- docker-compose, deploy script, GitHub workflow: default market btc -> spy
  (BTC services remain as trade-btc/paper-btc/research-btc)
- tests: updated profile contract expectations, added regression tests for
  the loss-streak reset and profile precedence (66 passed)

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
@utkarshp845
utkarshp845 merged commit 619f43c into master Jul 12, 2026
2 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant