Commit Graph

4 Commits

Author SHA1 Message Date
Jon
188a1dc8b0 Add granular logging across all source files
Introduce logger infrastructure and add structured logging to every layer:
alpaca.ts (buy/sell/quote/clock), momentum-indicator.ts (evaluate flow),
momentum-strategy.ts (poll loop), index.ts (startup/cycle), and trading.ts
(market timing). Replace raw console.log calls with leveled logger. Update
all tests with appropriate console spies.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-09 17:00:15 -07:00
Jon
075572a01c Remove executor, add buy/sell to Alpaca, move capital allocation to Bot
Replace the Executor logging placeholder with real buy/sell methods on
the Alpaca class that place market orders via createOrder and return the
fill price. Strategies now receive their capital amount directly and
place orders themselves. Bot accepts StrategyAllocation[] to decouple
capital allocation from strategy definition.

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-02-04 11:05:21 -07:00
Jon
e32e30af47 update our alpaca calls to be separate bid and ask 2026-02-03 13:58:42 -07:00
Jon
ecdffab950 Add bot orchestrator, wire up index.ts, remove old runDay
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>
2026-01-30 14:09:30 -07:00