3.1 KiB
2026-08-23 — SET price snapshot adapter
Plan status
- SET symbol mapping: complete.
- Daily OHLCV/adjusted-close snapshot contract: complete.
- Yahoo Chart API provider: complete and live-tested.
- Trading-date extraction from provider bars: complete.
- Point-in-time price quality: intentionally blocked; Yahoo history is labelled revised vendor history.
Changed files
backend/app/prices.py— Yahoo Chart API client, SET symbol map, payload normalization, adjusted-close handling, trading dates, raw/snapshot store and quality metadata.backend/scripts/collect_prices.py— one-shot daily price collector.backend/app/__init__.py— price store wiring,/api/v1/prices/health, and backtest gate price-quality check.backend/tests/test_prices.py— mapping, normalized bars, adjusted prices, incomplete-row handling, storage/hash tests.backend/tests/test_api.py— missing/revised price gate tests.frontend/src/App.vue— Backtest gate shows price quality beside vintage count.README.md— price collector and revised-vendor-history boundary.
Live source evidence
Provider: Yahoo Finance Chart API, used as a research plumbing source only.
snapshot_id: prices-yahoo-chart-2024-01-01-2026-08-24-a8b5c7abae7c
source_id: yahoo.chart
period_start: 2024-01-01
period_end: 2026-08-24
symbols: 9 (AOT, AWC, BEM, CPALL, CPN, CRC, MINT, PTT, SET50)
quality: revised_vendor_history
point_in_time: false
The provider returned 645 bars for each exposure symbol and 614 bars for the SET50 index series after incomplete rows were skipped. The snapshot is available to inspect, but it cannot unlock a real backtest because its historical values were retrieved/revised as a current vendor response.
Readiness behavior
With the live price snapshot and one BOT vintage:
GET /api/v1/prices/health
HTTP 200; available=true, quality=revised_vendor_history, point_in_time=false
GET /api/v1/backtest/tourism?min_events=12
HTTP 409; status=blocked, reason=insufficient_vintages
If the vintage threshold were met while prices remained non-point-in-time, the gate would still return reason=price_series_not_point_in_time.
Verification
PYTHONPATH=backend .venv/bin/python -W error -m unittest discover -s backend/tests -v— 38 tests passed.npm run build— passed.npm audit --omit=dev --audit-level=high— 0 vulnerabilities.- Yahoo live fetch — 9 symbols normalized and persisted.
- API price health and readiness gate — passed.
- Served Vue source contains the Backtest gate and price-quality copy.
Independent review
passed: true
security_concerns: []
logic_errors: []
Non-blocking backlog: add explicit revised/non-point-in-time gate coverage and document adjusted-close semantics for downstream calculations.
Risks and exact next action
Yahoo historical data is not a point-in-time price source. Do not interpret the snapshot as a valid historical execution series. Next, evaluate a price source with release/availability timestamps or explicitly maintain a separate research-only revised-history mode.