# Phase 5 Implementation Plan

## 목표
attention overlay 레이어를 구현하여 backtester와 live pipeline에 연결한다.

## 작업 순서
### Step 1. registry tables 구축
- youtube_channel_registry
- company_aliases 보강
- wiki_page_map
- theme_topic_map

### Step 2. raw adapters 구현
- yahoo_rss_adapter
- youtube_overlay_adapter
- wikimedia_adapter
- google_trends_adapter (feature flagged)

### Step 3. normalization pipeline 구현
- headline normalization
- video normalization
- pageview normalization
- trend timeseries normalization
- entity resolution jobs

### Step 4. overlay feature builder 구현
- per-source feature calculators
- missing data handling
- source confidence computation
- overlay_feature_record 생성

### Step 5. overlay scorer 구현
- weighted scoring
- confidence adjustment
- band assignment
- recommendation flags 생성

### Step 6. backtester integration
- overlay on/off config
- tie-breaker mode
- weighted rank mode
- hold extension mode
- add-on eligibility mode

### Step 7. live pipeline integration
- nightly overlay jobs
- candidate rerank job
- degraded mode handling
- source freshness checks

## 구현 우선순위
1. Yahoo RSS
2. Wikimedia
3. YouTube whitelist
4. FINRA overlay join
5. Google Trends experimental

## 완료 조건
- overlay feature record가 후보 종목에 대해 안정적으로 생성된다.
- backtester에서 overlay on/off ablation이 가능하다.
- source failure가 전체 파이프라인 실패로 이어지지 않는다.

## non-goals
- high-frequency social trading
- full video transcript NLP pipeline
- real-time intraday social scraping
