2 Commits (971c0f053f04864217aecbccb82ac15adbdafcbd)

Author SHA1 Message Date
I Luk Kim 971c0f053f feat: Earnings Surprise를 SEC XBRL로 전환 + Insider/FINRA 과거 데이터 확장
1. Earnings Surprise: Alpha Vantage → SEC EDGAR XBRL 전환
   - companyfacts API에서 EarningsPerShareDiluted/Basic 추출
   - QoQ surprise 계산 (현재 EPS - 이전 분기 EPS)
   - 15일 이내 중복 분기 제거 (10-Q 우선)
   - force_refresh 시 기존 데이터 삭제 후 재인덱싱
   - API 키 불필요, 2009년~ 커버리지

2. Insider transactions: days max 1095→3650, older pages 3→10

3. FINRA: 이전 커밋에서 이미 days=3650, limit=10000 적용됨
5 months ago
I Luk Kim e2cd16035a feat: Form 4 내부자 거래 + Earnings Surprise + FINRA 확장
F1: SEC Form 4 내부자 거래 (insider transactions)
- GET /insider/transactions/{symbol} — Form 4 거래 내역 조회
- GET /insider/summary/{symbol} — 3/6/12개월 매수/매도 집계
- SEC EDGAR submissions JSON → Form 4 XML 파싱 → DB 저장
- 자동 인덱싱 (첫 조회 시 SEC에서 페치)
- joint filing, derivative/non-derivative 거래 모두 지원

F2: Earnings Surprise (Alpha Vantage)
- GET /earnings/surprise/{symbol} — 분기별 EPS surprise
- reported EPS vs estimated EPS, beat/miss streak 계산
- ALPHA_VANTAGE_API_KEY 환경변수 필요 (무료 tier: 25 req/day)
- DB 캐싱으로 반복 호출 시 API 절약

F3: FINRA Short Volume 확장
- days 파라미터: max 365 → 3650 (10년)
- limit 파라미터: max 1000 → 10000
- 5년치 백필 완료 반영

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
5 months ago