Skip to content

Review/market data - #143

Open
aratabekov wants to merge 16 commits into
ed-donner:mainfrom
aratabekov:review/market-data
Open

Review/market data#143
aratabekov wants to merge 16 commits into
ed-donner:mainfrom
aratabekov:review/market-data

Conversation

@aratabekov

Copy link
Copy Markdown

No description provided.

aratabekov and others added 16 commits August 7, 2026 19:07
…11668379

Add Claude Code GitHub Workflow
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>

# Conflicts:
#	.claude/settings.json
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Write MARKET_DATA_DESIGN.md: the implementation-ready blueprint for the
market data subsystem, consolidating MARKET_INTERFACE.md, MARKET_SIMULATOR.md,
and MASSIVE_API.md into one build guide with complete code.

Covers the unified MarketDataSource interface, the GBM simulator (with
synthetic history), the Massive REST source, the price cache, the background
feed writer, source selection, FastAPI lifespan wiring, and the SSE +
history consumer endpoints. Fills gaps left by the reference docs: a config
module, historical bars on the interface, the SSE endpoint written out in
full, cache warm-up, resilience table, tests, and dependencies.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01CXG3RRjBPyYWeh2Sz4o6Qe
…gn-rabg1i

Add market data backend implementation design document
…erface

Implements the full market data subsystem per planning/archive/MARKET_DATA_DESIGN.md:
- MarketDataSource ABC with SimulatedSource (correlated GBM engine, synthetic
  history) and MassiveSource (Polygon.io/Massive REST client, snapshot +
  aggregate bars) implementations
- In-memory PriceCache and MarketFeed background writer, decoupled from
  SSE/portfolio consumer cadence
- FastAPI wiring (main.py) with GET /api/stream/prices, GET /api/history/{ticker},
  GET /api/health, backed by a minimal lazy-init SQLite layer (watchlist/positions)
- Full pytest suite (simulator determinism/correlation/history, Massive response
  parsing/error handling via mocked transport, feed/cache behavior, source
  selection, DB reads, HTTP routes) - all deterministic, no network or API key
  required

Archives the detailed design docs to planning/archive/ and adds
planning/MARKET_DATA_SUMMARY.md as the quick-reference for the portfolio/chat/
frontend agents building on top of this.

Closes #6

Co-authored-by: aratabekov <9768974+aratabekov@users.noreply.github.com>
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Pin Claude Code action to claude-opus-4-8 model
Comprehensive review of the market data subsystem: all 32 backend tests
pass. Documents two confirmed robustness bugs (feed loop dies on DB error;
config crashes on empty numeric env vars), plus input-hardening and
test-coverage recommendations.

Also commits backend/uv.lock (generated during test setup) for reproducible
dependency installs, per the plan's uv guidance.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
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.

2 participants