You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
I Luk Kim f67c534ce3 Harden 8-K item-code classifier against dirty input strings
The _classify_event_type mapping (2.02 → earnings_release, 7.01 →
guidance_update, 1.01 → material_contract, 1.03 → other_material_event,
8.01 → other_material_event, 5.02 → management_change) was already in
place but used naive 'in items' string matching. Upstream extractors
sometimes deliver items as 'Item 2.02' or '2.02 - Results of Operations'
(full-description form), which silently slipped through to event_type
'unknown' and were rejected by all 12 v7.356 PEAD engines.

A reparse using the patched classifier touched 9,779 historical 'unknown'
rows; only 16 actually flipped (the rest are genuinely off-vocab 8-Ks
like 9.01-only, 3.01, 5.07). The fix is therefore small in retroactive
impact, but defends against future ingestion drift.

Changes:
 - libs/parser/rule_parser.py: rewrote _classify_event_type with
   _normalize_item_codes (regex \\b(\\d+\\.\\d+)\\b token extractor) and
   tuple-of-pairs _ITEM_TO_EVENT_TYPE mapping. Earnings_release wins
   priority over management_change when 2.02 + 5.02 co-occur, consistent
   with the strategy's vocabulary intent.
 - tests/unit/test_rule_parser.py: 7 new regression tests covering
   AMD/MNST-style 2.02+9.01, dirty 'Item 2.02' / '2.02 - Results...'
   forms, and negative cases (9.01-only, 2.03, 3.01 remain unknown).

Note: a follow-up vocabulary normalizer is still needed for the
Oracle-fallback path in apps/pipeline/event_parser/main.py:140, which
writes raw oracle_event.event_type values like 'earnings_result',
'shareholder_vote', 'regulation_fd' that don't match the strategy
vocabulary. Flagged for separate ticket.

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
3 months ago
..
backtest Optimize v7 strategy: v7.356 achieves CW 2159% + SQS 90.7 (Pareto improvement over v7.314) 4 months ago
intraday Clean up superseded configs and commit accumulated R&D infrastructure 4 months ago
orb_trader Investigate compound mode: V23 is absolute champion in all modes 4 months ago
paper_trader Paper trader Phase 1 fixes: multi-session isolation, pipeline halt, snapshot refresh unblock 4 months ago
tools Remove momentum breakout sleeve (overfitting, valid -31%) and revert related code 4 months ago
web Investigate compound mode: V23 is absolute champion in all modes 4 months ago
__init__.py feat: implement ACE-F v1 Phase 1 -- Stock Oracle 기반 이벤트 파이프라인 5 months ago
test_config.py feat: PEAD mid-cap strategy + pipeline hardening + README cleanup 5 months ago
test_continuation_snapshot.py Update tests for pipeline, backtest engine, paper trader, and new modules 5 months ago
test_db_models.py feat: implement ACE-F v1 Phase 1 -- Stock Oracle 기반 이벤트 파이프라인 5 months ago
test_enrich_catalyst_persistence_features.py Add ownership/risk-off sleeves, v17-v19 experiments, and web app restructure 4 months ago
test_enrich_earnings_history_features.py Add ownership/risk-off sleeves, v17-v19 experiments, and web app restructure 4 months ago
test_enrich_peer_surprise_features.py Add ownership/risk-off sleeves, v17-v19 experiments, and web app restructure 4 months ago
test_enrich_tier2_features.py Add ownership/risk-off sleeves, v17-v19 experiments, and web app restructure 4 months ago
test_ensemble_overlay_backtest.py Add ownership/risk-off sleeves, v17-v19 experiments, and web app restructure 4 months ago
test_event_features.py feat: PEAD mid-cap strategy + pipeline hardening + README cleanup 5 months ago
test_file_store.py feat: implement ACE-F v1 Phase 1 -- Stock Oracle 기반 이벤트 파이프라인 5 months ago
test_financial_features.py implement Phase 2 gap items: backfill CLI, retry, financial features 5 months ago
test_fred_service.py test: Phase 1/2 체크리스트 재작성 및 Oracle 실연동 통합 테스트 5 months ago
test_ids.py feat: implement ACE-F v1 Phase 1 -- Stock Oracle 기반 이벤트 파이프라인 5 months ago
test_labeler.py Fix label_price_unavailable: preserve future entry_dates as pending 3 months ago
test_llm_cache.py feat: implement Phase 3 -- LLM enrichment, labeler, review queue, dataset export 5 months ago
test_llm_client.py fix: disable Qwen3.5 thinking mode and switch OllamaClient to sync httpx 5 months ago
test_llm_parser_stub.py test: Phase 1/2 체크리스트 재작성 및 Oracle 실연동 통합 테스트 5 months ago
test_logging.py test: Phase 1/2 체크리스트 재작성 및 Oracle 실연동 통합 테스트 5 months ago
test_market_features.py feat: implement ACE-F v1 Phase 1 -- Stock Oracle 기반 이벤트 파이프라인 5 months ago
test_merged_snapshot.py Update tests for pipeline, backtest engine, paper trader, and new modules 5 months ago
test_merger.py feat: implement Phase 3 -- LLM enrichment, labeler, review queue, dataset export 5 months ago
test_oracle_client.py Add paper trader improvements, web GUI updates, and experiment registry cleanup 4 months ago
test_retries.py test: Phase 1/2 체크리스트 재작성 및 Oracle 실연동 통합 테스트 5 months ago
test_review_queue.py feat: implement Phase 3 -- LLM enrichment, labeler, review queue, dataset export 5 months ago
test_rule_parser.py Harden 8-K item-code classifier against dirty input strings 3 months ago
test_schema_validator.py feat: implement ACE-F v1 Phase 1 -- Stock Oracle 기반 이벤트 파이프라인 5 months ago
test_snapshot_export.py Add ownership/risk-off sleeves, v17-v19 experiments, and web app restructure 4 months ago
test_text_normalizer.py Update tests for pipeline, backtest engine, paper trader, and new modules 5 months ago
test_time_utils.py feat: implement ACE-F v1 Phase 1 -- Stock Oracle 기반 이벤트 파이프라인 5 months ago