Revamp strategy: switch live deployment to QQQ hourly trend, fix repl…#5
Merged
Merged
Conversation
…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>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
…ay and data bugs
Why the live BTC bot made no valuable trades (see docs/strategy_revamp_2026-07.md):
Changes: