Implements MomentumIndicator (samples QQQ direction) and
MomentumStrategy (buys TQQQ on up, SQQQ on down, exits at
+1% target or 1hr timeout). Wired into Bot via index.ts.
Also fixes vitest config to exclude dist/ from test discovery.
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
Bot validates strategy capital allocations, waits for market open,
runs all strategies concurrently, and passes signals to the executor.
The main loop in index.ts now delegates to Bot.runDay().
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
The Executor receives strategy signals and calculates dollar amounts
from capital allocations. Currently logs intended trades rather than
placing real orders.
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
Introduce the typed interfaces that form the foundation of the
strategy framework: Indicator<T> for market analysis and Strategy
with Signal types for trading decisions.
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
- Move API keys from hardcoded values to .env via dotenv
- Extract business logic into src/trading.ts with dependency injection
- Add typed AlpacaClient interface, replace `any` on Alpaca class
- Add Vitest test suites for trading logic and Alpaca wrapper (14 tests)
- Set up ESLint with @typescript-eslint for linting
- Fix getAsset to pass symbol string directly to SDK
- Fix typo (alpacha -> alpaca), remove unused ws/node-fetch deps
- Update .gitignore for node_modules and .env
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>