15 Commits

Author SHA1 Message Date
534ded59e8 docs(signal-v2): amend spread formula to absolute (q90-q10) for Chronos-bolt zero-shot reality
Phase 0 spec §6.1 originally specified relative spread (q90-q10)/median < 0.6.
Phase 3b smoke (005930: median=-0.59%, q90-q10=15.3%) revealed Chronos-bolt
zero-shot median frequently sits near zero, causing relative spread to explode
(15.3/0.0059 ≈ 25) and reject every signal. Absolute spread (0.153 < 0.6)
preserves the threshold semantic and keeps Phase 7 IC validation tractable.

Phase 4 spec §4.2 + Phase 0 §6.1 both amended with cross-reference.
chronos_predictor.py conf calculation unchanged — monotonic mapping there
is independent of hard-gate semantics.
2026-05-17 13:10:50 +09:00
9e9eed2162 docs(signal-v2): Phase 4 signal generator spec
매수/매도 룰 (Phase 0 spec §6.1-§6.3) + confidence_webai 공식
(chronos*0.5 + minute*0.3 + screener*0.2) + SignalDedup 24h. 6 env
외부화 (STOP_LOSS/TAKE_PROFIT/SPREAD/BID_RATIO/CONFIDENCE/MIN_MOMENTUM).
state.signals = Phase 0 spec §5.2 schema. 10 new tests.

brainstorming 6 decisions: scope=A(생성만) / trigger=A(매 cycle) /
minute_score=A(linear 5-level) / thresholds=A+(6 env) / state=A(spec §5.2) /
test=A(9 unit + 1 integration).

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
2026-05-17 12:40:24 +09:00
6eb4ab1204 docs(signal-v2): Phase 3b Chronos-2 + minute momentum spec
KIS daily OHLCV fetch (kis_client.get_daily_ohlcv, FHKST03010100) +
ChronosPredictor (HuggingFace amazon/chronos-2 zero-shot, env-configurable
model, always-loaded) + minute momentum classifier (5-level rule:
strong_up/weak_up/neutral/weak_down/strong_down) + post-close cycle
trigger (16:00 KST). 12 new tests (33 → 45 total).

brainstorming 7 decisions: daily=B(KIS REST) / freq=A(post-close 1x) /
model=A(env CHRONOS_MODEL) / momentum=A(5-level rule) / state=B(median+
q10+q90+conf+as_of) / test=A(mock+pure) / scope=integrated.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
2026-05-16 17:37:17 +09:00
1813db761f docs(signal-v2): Phase 3a KIS data collection spec
KIS REST client (minute OHLCV + asking price polling, V1 token
read-only share) + KIS WebSocket client (approval_key + portfolio
asking_price realtime subscribe) + PollState extension + scheduler
NXT windows (20:00-23:30 / 04:30-07:00). 13 new tests.

brainstorming 6 decisions: scope=B(3a/3b split) / data=B(REST minute +
WS asking) / auth=A(V1 token share) / subscribe=A(portfolio WS +
screener REST) / NXT=C(scheduler extend) / test=A(respx + WS mock).

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
2026-05-16 04:50:16 +09:00
b9dabd07e0 docs(signal-v2): Phase 2 web-ai pull worker spec
stock pull worker + asyncio scheduler + rate limit SQLite + FastAPI
app (:8001). 16 tests planned. brainstorming 6 decisions:
batch=A(separate FastAPI :8001) / scope=A(3 items) / scheduler=B(asyncio
cron) / http=B(httpx + custom retry + memory cache) / rate-limit=A(SQLite
WAL) / test=B(pytest-asyncio + httpx mock).

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
2026-05-16 03:14:45 +09:00
42e9c8df27 docs(signal-v1): web-ai V1 → signal_v1/ rename spec
atomic refactor (single commit) of web-ai root V1 assets into
signal_v1/ subdirectory. V2 (signal_v2/) Phase 2 will be added
alongside in subsequent slice. Pattern mirrors stock-lab → stock
graduation.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
2026-05-16 00:19:00 +09:00
094366a162 docs(signal-v2): Phase 1 stock WebAI API spec
3 endpoints + X-WebAI-Key auth + nginx rate limit + 15 tests.
brainstorming 7 decisions: scope=B / auth=A(static key) / portfolio=B(pnl_pct) /
news-sentiment=A(daily dump) / endpoint=1(/api/webai prefix) / rate=B(nginx) /
test=B(pytest schema).

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
2026-05-15 08:24:37 +09:00
ed7e927dc1 docs(stock): rename stock-lab → stock graduation spec
lab 네이밍 정책 (feedback_lab_naming.md) 에 따라 정식 서비스 graduation.
디렉토리/컨테이너/환경변수 갱신, API URL/Python import/DB 파일명은 그대로.

Confidence Signal Pipeline V2 Phase 1 작업 시작 전 선행.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
2026-05-15 01:34:45 +09:00
309bedadeb docs(signal-v2): amend Phase 0 — Chronos-2 + Qwen3 14B Q4 채택 (11 보정)
모델 결정 보정:
- 시점 예측: LSTM → Chronos-2 (Amazon, 120M, zero-shot quantile 분포)
- 2차 검증: Claude Haiku 4.5 (API) → Qwen3 14B Q4 (Ollama on web-ai)

영향:
- VRAM: ~9.3GB / 16GB (Chronos-2 1GB + Qwen3 8.3GB, 여유 6GB)
- LLM 비용: 월 ~₩45,000 (오류 추정) → 실제 0 (로컬 Ollama)
- 응답 시간: 5초 → ~13초 (분봉 흐름 OK)
- Phase 3 -1주 (LSTM 학습 인프라 제거), Phase 5 +0주
- 야간 재학습 cron 폐기 (Chronos-2 zero-shot)

Backlog 추가:
- Qwen3 14B 개발자 보조 endpoint (전략 해석 / 코드 자동화)
- Claude API 폴백 (web-ai 장애 시)
- Kimi K2.6 API 옵션 (저비용 외부 대안)

위험 매트릭스:
- Qwen3 한국어 메시지 품질 — Phase 5 A/B 테스트 1주 (vs Claude Haiku)
- VRAM 동거 swap 위험 — 8B 다운그레이드 fallback

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
2026-05-15 01:21:24 +09:00
ebdfcd758b docs(signal-v2): Phase 0 architecture & contract spec
확신의 신호 파이프라인 V2. 4 서비스 분담:
- stock-lab: 가치 발굴 (8 노드 + ATR)
- web-ai (Windows GPU): 시점 분석 (LSTM + KIS 분봉/NXT + 분봉 모멘텀)
- agent-office: Claude 2차 검증 + 이중 텔레그램 (본인 풀 / 아내 간소화)
- web-ui: 캔버스 settings 편집

6 핵심 결정: pull 채널, KIS 직접, Claude context augmentation, 매수+매도,
양쪽 메시지 단일 콜 생성, 시간대별 폴링.

Phase 1-7 분해 (총 10-12주), backlog, 위험 매트릭스, NOT 범위 명시.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
2026-05-15 00:56:01 +09:00
cdfa31b0c1 docs(ai_news): Phase 1 design — articles table reuse (replace Naver scraper)
기존 articles 테이블 재사용 + 종목명 substring 매핑. Naver 차단/중복
인프라 해소, LLM 입력에 summary 포함. weight=0 유지 (검증 전 차단),
news_sentiment.source 컬럼 추가 (Phase 2 비교 baseline).

선행 review (adversarial)에서 가장 강한 비판: "이미 매일 수집 중인
articles 테이블을 무시하고 Naver를 100번 더 긁는 중복" → 해소.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
2026-05-14 01:47:25 +09:00
5e66d96c61 docs(screener): AI news sentiment node design spec
8번째 점수 노드 ai_news 설계. 평일 08:00 KST agent-office cron 으로
시총 상위 100종목 네이버 뉴스 스크래핑 + Claude Haiku 호재/악재 분석,
news_sentiment 일별 저장, 호재/악재 Top 5 텔레그램 알림, 16:30
스크리너 잡이 percentile_rank 로 가중합에 활용.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
2026-05-13 23:09:45 +09:00
fdf5ef6ce8 docs(screener): node canvas mode design spec
n8n 스타일 노드 캔버스 모드 설계 문서. 폼 모드와 토글로 전환,
같은 settings state 공유. 11 노드 + 16 엣지 고정 토폴로지, react-flow
기반 시각화. 백엔드 변경 없음.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
2026-05-13 21:22:57 +09:00
ccf6d4e551 docs(spec): Stock Screener Board MVP 설계 문서
KRX 강세주 발굴 노드 기반 분석 보드의 첫 슬라이스 설계.
pykrx 일봉·수급 캐시 + 위생 게이트 1 + 점수 노드 7
(외국인 누적 매수·거래량 급증·20일 모멘텀·52주 신고가 근접도·
RS Rating·이평선 정배열·VCP-lite) + 가중합 + ATR 포지션 사이징.
평일 16:30 KST agent-office 자동 잡으로 텔레그램 전송.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
2026-05-12 03:33:35 +09:00
6b2fcda2af docs(spec): Lotto Curator Evolution 설계 문서
매주 같은 시간에 큐레이터가 한 번 더 똑똑해지는 컨셉으로
- 회고 컨텍스트(weekly_review + 자동 채점 잡)
- 4계층 위계(코어/보너스/확장/풀, 5~20세트)
- 결정 카드 단일 화면(브리핑 탭 재구성)
- 분석 탭은 자료실로 강등
- 월요일 09:00 큐레이션 + 텔레그램 푸시
2026-05-11 03:19:58 +09:00