Skip to content

Fix/market data review items#39

Open
YawarRizwan wants to merge 14 commits intoed-donner:fix/market-data-review-itemsfrom
YawarRizwan:fix/market-data-review-items
Open

Fix/market data review items#39
YawarRizwan wants to merge 14 commits intoed-donner:fix/market-data-review-itemsfrom
YawarRizwan:fix/market-data-review-items

Conversation

@YawarRizwan
Copy link
Copy Markdown

No description provided.

ed-donner and others added 14 commits February 10, 2026 14:28
Interactive dashboard showing all 10 tickers with live GBM-simulated
prices, sparklines, color-coded direction arrows, and an event log
for notable moves. Runs 60 seconds or until Ctrl+C, then prints a
session summary comparing final prices to seeds.

Usage: cd backend && uv run market_data_demo.py

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
- planning/MARKET_DATA_SUMMARY.md: comprehensive summary of everything
  built, tested, and reviewed in the market data backend
- backend/CLAUDE.md: developer guide with key APIs, setup, and usage
- planning/archive/: moved 5 superseded market data planning documents

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Market data demo, summary docs, and backend CLAUDE.md
…935320908

Add Claude Code GitHub Workflow
Detailed implementation guide for the market data subsystem covering
PriceUpdate model, PriceCache, MarketDataSource interface, GBM simulator,
Massive API client, SSE streaming endpoint, lifecycle integration, and tests.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Add market data backend implementation design
Comprehensive review of the market data backend implementation against
PLAN.md and design docs. Documents 9 issues (3 critical, 2 high, 1 medium,
3 minor) including missing open_price field, SSE field name and timestamp
format mismatches, and 33% stream.py test coverage gap.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
All 9 issues from MARKET_DATA_REVIEW.md resolved:

Critical:
- Add open_price to PriceUpdate and PriceCache.update() — session-start
  baseline required by frontend for daily change % calculation
- Rename previous_price → prev_price to match PLAN.md SSE contract
- Convert timestamp in to_dict() to ISO 8601 UTC string

High:
- Move massive imports to lazy (inside start()/_fetch_snapshots) so the
  massive package is only required when MASSIVE_API_KEY is set
- SSE now emits one event per ticker instead of a single batched object
- Add test_stream.py: 11 new tests covering SSE format, open_price,
  ISO timestamp, disconnect, deduplication; stream.py coverage 33% → 91%

Medium:
- Unknown tickers seed at $100 (DEFAULT_SEED_PRICE) not random $50–$300

Minor:
- create_stream_router returns a fresh APIRouter each call
- TSLA_CORR corrected to 0.25 (was 0.3)

Also: move massive to optional dependency in pyproject.toml,
update backend/CLAUDE.md to reflect new PriceUpdate fields.

89 tests pass, 96% coverage, ruff clean.

Co-Authored-By: Claude Sonnet 4.6 <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