Skip to content

Add short selling support#2

Merged
chand1012 merged 1 commit into
mainfrom
shorts
Jan 30, 2026
Merged

Add short selling support#2
chand1012 merged 1 commit into
mainfrom
shorts

Conversation

@chand1012

Copy link
Copy Markdown
Owner

Summary

  • Short selling capability: Bot now scans for both long and short setups every cycle
  • Short strategy: Price < 200 SMA (downtrend), 0-5% below 50 SMA (rally to resistance), stop 2% above 50 SMA
  • Market regime position sizing: Full size when trading with the trend, 50% when trading against
    • Bull market (SPY > 200 SMA): Longs full size, shorts 50%
    • Bear market (SPY < 200 SMA): Shorts full size, longs 50%
  • Side-aware exit strategies: EMA exit and trailing stop now work correctly for both long and short positions

Test plan

  • Verify bot starts without errors
  • Test in paper trading mode during market hours
  • Confirm short setups are detected when stocks meet criteria (price < 200 SMA, near 50 SMA resistance)
  • Verify EMA exit triggers correctly for shorts (closes when price > EMA)
  • Verify trailing stop activates correctly for profitable shorts

🤖 Generated with Claude Code

- analyze_stock() now scans for both long and short setups
- Short strategy: Price < 200 SMA, 0-5% below 50 SMA (rally to resistance)
- Position sizing by market regime: full size with trend, 50% against trend
- Exit strategies (EMA, trailing stop) work for both directions
- Updated documentation to reflect new capabilities

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
@chand1012
chand1012 merged commit 7d03936 into main Jan 30, 2026
1 check passed
@chand1012
chand1012 deleted the shorts branch January 30, 2026 22:27
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