4 Commits (27de44c8d80900afc28efe8c77519d71f9bb574d)

Author SHA1 Message Date
I Luk Kim 27de44c8d8 Fix label_price_unavailable: preserve future entry_dates as pending
Pre-market label_generator runs request future-dated price windows from
Stock Oracle, which correctly returns 404 because the data does not yet
exist. The labeler was swallowing this as label_status='unavailable' with
entry_date=None. Snapshot export then filtered these rows out, so live
PEAD trading silently lost candidates whose entry_dates fell on
later trading days (e.g., post-market 8-K filings late Friday → Monday
open entry). This explains today's missed RKLB/SNDK/AKAM/MNST/AMD/MRNA
even though their 8-Ks parsed correctly.

Changes:
 - libs/labeler/label_generator.py: in 404/empty-bars path, when
   entry_date >= today, preserve entry_date and mark label_status='pending'.
   New log event label_price_pending_future_window distinguishes from real
   data-unavailable failures (past dates still log label_price_unavailable).
 - libs/export/snapshot_export.py: include 'pending' in the
   label_status filter so today's not-yet-labeled events flow into the
   live snapshot.
 - apps/pipeline/label_generator/main.py: regeneration logic also
   retries existing 'unavailable' rows whose entry_date is null or future
   to recover events already mis-labeled in the DB.
 - tests/unit/test_labeler.py: regression test reproducing the
   RKLB/SNDK/AKAM failure mode and asserting label_status='pending' with
   entry_date preserved.

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
3 months ago
I Luk Kim 57d38ecfe0 Add earnings surprise feature pipeline and snapshot export improvements
Adds earnings surprise extraction to parser/features/labeler pipeline,
improves filing fetcher robustness, and extends snapshot export with
new field support.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
5 months ago
I Luk Kim 2395a0c0c3 feat: PEAD mid-cap strategy + pipeline hardening + README cleanup
- Implement PEAD 7% Long+Short strategy with mid-cap universe expansion
- Add Stock Oracle screener/company clients, text sentiment features
- Enhance backtest engine: short-side execution, walk-forward CV, MFE/MAE analysis
- Harden pipeline: sequential Oracle API calls, scoring recalibration (event_quality 65%)
- Add experiment configs for 60+ strategy variants and journal tracking
- Add review/analysis CLI tools
- Remove obsolete dev/phase0-4 design documents and analysis scripts
- Clean README to reflect only implemented features (remove unbuilt adapters/engines)

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
5 months ago
I Luk Kim bbe0e31150 feat: implement Phase 3 -- LLM enrichment, labeler, review queue, dataset export
- libs/llm/: OllamaClient (httpx async, retry), LLMCacheStore (SHA-256 DB cache),
  prompt registry (event_classifier_v1), LLMParser (cache→prompt→validate→repair)
- libs/parser/merger.py: rule+LLM canonical merge with provenance tracking,
  conflict detection (both confident + disagree), should_queue_for_review()
- libs/db/models.py: LLMCallCache, ReviewItem, EventLabel 3개 ORM 모델 추가
- libs/db/migrations/versions/0002_phase3_tables.py: Phase 3 Alembic migration
- libs/labeler/: filing_time_bucket→reaction_date, 1D/3D/5D fwd return, MFE/MAE
- libs/review/queue.py: create(dedup)/resolve/list ReviewItem
- libs/export/snapshot_export.py: temporal split + Parquet + manifest.json
- apps/: label_generator, dataset_export, review CLI, gold set evaluator
- 42개 신규 테스트 추가 (unit 32 + integration 4 + replay 1) — 152/152 통과
- libs/common/config.py: OLLAMA_URL/MODEL/TIMEOUT 설정 추가
- libs/common/logging.py: bugfix — add_logger_name incompatible with PrintLoggerFactory

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
5 months ago