neogenesislab's picture
add data/sections.jsonl
d3deb08 verified
{"doc_id":"master-design","doc_type":"design","version":"v0.1","section_id":"master-design/v11_Ensemble_Master_Design","section_title":"v11 Ensemble — Master Design","section_text":"> **문서 상태:** v0.1 Draft (2026-04-22 작성)\n> **전신:** v6~v10 (전면 폐기 — `archive/design-docs-legacy/` 참조)\n> **목적:** Binance 선물 자동매매에서 **일 평균 0.6~1.0% 누적 수익률**을 달성하는 6-알파 앙상블 아키텍처\n> **검증:** 6명 병렬 전문가 (수학·HFT/MM·Stat Arb·리스크·ML/RL·이벤트알파) 교차 검증 완료\n\n---","alpha_id":null,"kill_switch_layer":null,"references":"[]"}
{"doc_id":"master-design","doc_type":"design","version":"v0.1","section_id":"master-design/v11_Ensemble_Master_Design/1_폐기된_가정과_교훈_v6_v10_실패_원인_/1_1_측정된_실패_실거래_191건_5일간_dashboard_40건_","section_title":"1.1 측정된 실패 (실거래 191건, 5일간 dashboard 40건)","section_text":"- 장부상 승률 37.7%, R/R 2.2 → 수학적으로 +여야 하나 실제 -<illustrative-loss> 드레인\n- ledger 순손익 -$0.16 vs 실제 -<illustrative-loss> → **$9 이상이 장부 무반영 (funding·grid 인벤토리)**\n- MAE/MFE 전 거래 0 기록 → 진단 불능\n- exit 100% `SERVER_SIDE_TP_SL` → 매니지드 exit 경로 미활성 → MAE/MFE 훅 미호출\n- 백테스트 BTC 2년 127,471승 0패 → **fill 로직 버그 또는 lookahead bias**, 생존편향","alpha_id":null,"kill_switch_layer":null,"references":"[]"}
{"doc_id":"master-design","doc_type":"design","version":"v0.1","section_id":"master-design/v11_Ensemble_Master_Design/1_폐기된_가정과_교훈_v6_v10_실패_원인_/1_2_구조적_결함","section_title":"1.2 구조적 결함","section_text":"1. **9 에이전트 × 3 엔진 × 5 게이트** = 디버깅 불가능한 복잡계\n2. **그리드 ping-pong** — 쌍 완성시에만 장부 기록, 편향 인벤토리 영구 누락 (근본 drain 원인)\n3. **백테스트 허구** — 수수료/슬리피지/funding/grid-inventory 미반영\n4. **리스크 거버너 1x 전제** 코드 위에 가변 레버리지 얹음 (구조적 모순)\n5. **증거 없는 전략** — SmartTrend 76건 40.8% WR는 95% CI ±11%p → 통계적 무의미\n\n---","alpha_id":null,"kill_switch_layer":null,"references":"[]"}
{"doc_id":"master-design","doc_type":"design","version":"v0.1","section_id":"master-design/v11_Ensemble_Master_Design/2_v11의_기본_철학","section_title":"2. v11의 기본 철학","section_text":"> **증거 기반 앙상블 · 관측 투명성 · 레버리지는 Kelly 이론 하한에서 시작**\n\n| 원칙 | v10 이전 | v11 |\n|---|---|---|\n| 전략 | 단일 또는 9개 | **6개 저상관 알파 앙상블** |\n| 선정 기준 | 주관 + 판타지 백테스트 | **학술 검증 + shadow 2주 증명** |\n| 레버리지 | 1~10x 적응형 (코드 모순) | **최대 5x (Kelly/3 안전계수)** |\n| 관측 | MAE/MFE=0 | **tick-level MAE/MFE 필수** |\n| 백테스트 | 127k승 0패 허구 | **tick-level + 실수수료/슬리피지/funding** |\n| 계측 | 장부 -$0.16 vs 실제 -<illustrative-loss> | **funding+grid-inventory 삼중 집계** |\n| 리스크 | 5봉 쿨다운 | **7종 킬스위치 + 24h persist halt** |\n\n---","alpha_id":null,"kill_switch_layer":null,"references":"[]"}
{"doc_id":"master-design","doc_type":"design","version":"v0.1","section_id":"master-design/v11_Ensemble_Master_Design/3_6-알파_앙상블_구조","section_title":"3. 6-알파 앙상블 구조","section_text":"```\n[A1] Liquidation Cascade ← primary alpha (일 0.4~0.6%)\n[A2] Mean Reversion (OU) ← 고빈도 스캘핑 (일 0.3~0.8%)\n[A3] Extreme Funding Reverse ← 역포지션 (일 0.2~0.3%)\n[A4] Macro Event Bracket ← CPI/FOMC (이벤트일 0.5~1.2%)\n[A5] Funding+Basis Harvest ← 델타중립 안정축 (일 0.05~0.15%)\n[A6] Alt Market Making ← LINK/SUI/APT (일 0.1~0.3%)\n\n이론 합계: 일 1.55~3.45%\n상관·경합 보정: 일 0.6~1.2% (상위분위 달성)\n```\n\n> **⚠️ 2026-04-24 외부 교차검증 경고 (Phase 0 착수 전 재정의 예정)**\n> 근거: [research/2026-04-24-external-validation.md](research/2026-04-24-external-validation.md)\n> - **A1 (40%)** — Binance `forceOrder` WS 는 2021-04-27부터 **심볼당 1초 1건 truncation** (공식 미수정). 공개 walk-forward 실적 1건 (Curupira, Sharpe 미공개). **외부 Sharpe 벤치마크 부재가 최대 모델 리스크**.\n> - **A2 (25%)** — 순수 OU mean reversion 은 **post-2022 crypto 에서 대부분 사멸** (공개 증거 다수). A1 동조 게이트 + Engle-Granger 코인테그레이션 + regime veto 가 붙은 뒤에만 유지 가능. Phase 0 페이퍼에서 **A1-동조 Sharpe vs A1-독립 Sharpe 분리 계측** 후 재정의.\n> - **A3 (15% 의 일부)** — Binance/BitMEX baseline `0.01%/8h tightly anchored`, 기관 arb 가 극단치 수 분 내 정리. **진입 임계 `|F| > 0.08%` 로 상향** + liquidation cluster + basis 동반 필터 필요.\n> - **A5 (15% 의 일부)** — Ethena 가 2025년 futures 비중 `93% → 11%` 로 자체 축소, aggregated funding 50% 압축. **aggregated 30일 median funding `< 0.007%/8h` 시 A5 가중치 실질 0% capacity guard** 필수.\n>\n> **재정의 게이트**: 위 경고는 Phase 0 페이퍼 모드 2-4주 데이터 수집 후 공식 근거로 A2/A5 가중치 재계산. 외부 증거만으로 지금 재계산하지 않는 이유는 overfit-to-research 방지.","alpha_id":null,"kill_switch_layer":null,"references":"[]"}
{"doc_id":"master-design","doc_type":"design","version":"v0.1","section_id":"master-design/v11_Ensemble_Master_Design/3_6-알파_앙상블_구조/자본_배분_Kelly_3_","section_title":"자본 배분 (Kelly/3)","section_text":"```\n40% → A1 Liquidation Cascade 레버리지 5x (⚠️ 외부 벤치마크 부재)\n25% → A2 Mean Reversion 레버리지 3x (⚠️ A1 동조 조건부 유지)\n15% → A5+A3 Funding/Basis 레버리지 5x (델타중립) (⚠️ capacity/임계 게이트 필수)\n10% → A6 알트 MM 레버리지 2x\n10% → A4 이벤트 탄환 레버리지 3x\n```\n\n통합 실효 레버리지 ≈ **3.5x** (Kelly 상한 6.25x 이내)","alpha_id":null,"kill_switch_layer":null,"references":"[]"}
{"doc_id":"master-design","doc_type":"design","version":"v0.1","section_id":"master-design/v11_Ensemble_Master_Design/3_6-알파_앙상블_구조/알파별_상세_스펙","section_title":"알파별 상세 스펙","section_text":"각 알파는 별도 문서로 관리:\n- [ALPHA_SPECS/A1_liquidation_cascade.md](alpha-specs/A1_liquidation_cascade.md)\n- [ALPHA_SPECS/A2_mean_reversion_ou.md](alpha-specs/A2_mean_reversion_ou.md)\n- [ALPHA_SPECS/A3_extreme_funding.md](alpha-specs/A3_extreme_funding.md)\n- [ALPHA_SPECS/A4_macro_event.md](alpha-specs/A4_macro_event.md)\n- [ALPHA_SPECS/A5_funding_basis_harvest.md](alpha-specs/A5_funding_basis_harvest.md)\n- [ALPHA_SPECS/A6_alt_market_making.md](alpha-specs/A6_alt_market_making.md)\n\n---","alpha_id":null,"kill_switch_layer":null,"references":"[]"}
{"doc_id":"master-design","doc_type":"design","version":"v0.1","section_id":"master-design/v11_Ensemble_Master_Design/4_수학적_기대치와_파산_확률/4_1_기대_수익률_분포","section_title":"4.1 기대 수익률 분포","section_text":"| 기간 | 누적 목표 | 일평균 | Sharpe | MaxDD |\n|---|---|---|---|---|\n| 30일 | +20% | 0.6% | >1.2 | <10% |\n| 90일 | +80% | 0.65% | >1.5 | <15% |\n| 365일 | +500~1000% | 0.6~0.8% | >2.0 | <25% |\n\n**기준점:** Medallion Fund 연 66% (일 0.21%) · Sharpe 2.5~4.0\n**v11 목표:** Medallion의 3~5배 속도 (일 0.6~1.0%)\n**달성 경로:** 6 저상관 알파 × 레버리지 3.5x","alpha_id":null,"kill_switch_layer":null,"references":"[]"}
{"doc_id":"master-design","doc_type":"design","version":"v0.1","section_id":"master-design/v11_Ensemble_Master_Design/4_수학적_기대치와_파산_확률/4_2_파산_확률_VaR_95_σ_daily_4_가정_","section_title":"4.2 파산 확률 (VaR 95%, σ_daily=4% 가정)","section_text":"| 레버리지 | 30일 파산 | 90일 파산 | 365일 파산 |\n|---|---|---|---|\n| 1x | ~0% | ~0% | ~1% |\n| 3x | ~2% | ~6% | ~18% |\n| **5x (v11 상한)** | **~4%** | **~12%** | **~32%** |\n| 10x | 8% | 22% | 65% |\n| 20x | 35% | 70% | 98% |\n| 50x | 99%+ | ~100% | ~100% |\n\n**결론:** \"레버리지 무제한 감수\" 사용자 요청에도 불구하고 **5x를 하드캡**으로 설정 (1년 생존확률 68%). 그 이상은 365일 수익 무의미.\n\n---","alpha_id":null,"kill_switch_layer":null,"references":"[]"}
{"doc_id":"master-design","doc_type":"design","version":"v0.1","section_id":"master-design/v11_Ensemble_Master_Design/5_인프라_요구사항/5_1_데이터_소스_무료_우선_","section_title":"5.1 데이터 소스 (무료 우선)","section_text":"- **실시간 청산**: Binance WS `!forceOrder@arr` (무료, <100ms)\n- **Funding/OI**: Binance `/fapi/v1/premiumIndex`, Coinalyze free (200req/min)\n- **청산 heatmap**: CoinGlass API v4 free tier\n- **매크로 스케줄**: ForexFactory, FRED (무료)\n- **뉴스 센티먼트**: Cryptopanic free\n- **온체인**: CryptoQuant Community (무료)\n- **과거 tick 재생**: tardis-machine (페이퍼 검증용)","alpha_id":null,"kill_switch_layer":null,"references":"[]"}
{"doc_id":"master-design","doc_type":"design","version":"v0.1","section_id":"master-design/v11_Ensemble_Master_Design/5_인프라_요구사항/5_2_네트워크","section_title":"5.2 네트워크","section_text":"- **VM 리전 이전**: 현재 `asia-northeast3-a` → `ap-northeast-1` (Tokyo)\n - RTT 15ms → **3ms**\n - Binance 서버 동일 리전\n - 예상 비용 증가 없음 (GCP e2-medium 동일)","alpha_id":null,"kill_switch_layer":null,"references":"[]"}
{"doc_id":"master-design","doc_type":"design","version":"v0.1","section_id":"master-design/v11_Ensemble_Master_Design/5_인프라_요구사항/5_3_외부_라이브러리","section_title":"5.3 외부 라이브러리","section_text":"- **cryptofeed** (Python): 다중 거래소 WS 통합 (liquidation/funding)\n- **Hummingbot**: 알트 MM 엔진 (bridge로 호출)\n- **nautilus-trader**: tick-level 백테스트 참조 구현\n- **CCXT Pro**: 다중 거래소 WS (Binance + Bybit 확장시)\n\n---","alpha_id":null,"kill_switch_layer":null,"references":"[]"}
{"doc_id":"master-design","doc_type":"design","version":"v0.1","section_id":"master-design/v11_Ensemble_Master_Design/6_리스크_엔지니어링_7-Layer_Kill_Switch_","section_title":"6. 리스크 엔지니어링 (7-Layer Kill Switch)","section_text":"별도 문서: [RISK_KILLSWITCH.md](RISK_KILLSWITCH.md)\n\n핵심:\n1. 틱별 자동 손절 (STOP_MARKET 거래소측)\n2. 일일 MaxDD 5% → **24h persistent halt** (Supabase `halt_until`)\n3. Cross-asset correlation kill (5분봉 동시 -3%)\n4. WS/Exchange fail-closed\n5. Flash crash 시나리오 (-20%/-50%/-99% LUNA급)\n6. MMR 기반 실청산가 재계산 (Binance `/fapi/v1/leverageBracket`)\n7. Clock drift + Rate limit + Stale data guard\n\n---","alpha_id":null,"kill_switch_layer":null,"references":"[]"}
{"doc_id":"master-design","doc_type":"design","version":"v0.1","section_id":"master-design/v11_Ensemble_Master_Design/7_관측_인프라_Observability_/7_1_tick-level_추적","section_title":"7.1 tick-level 추적","section_text":"- MAE/MFE: 매니지드 exit 경로 강제 활성 + 별도 틱 기록 (서버사이드 TP/SL 호출시에도 기록)\n- 모든 거래: entry_price, exit_price, max_adverse_pct, max_favorable_pct, hold_ticks, funding_paid, fee_paid, slippage_bps","alpha_id":null,"kill_switch_layer":null,"references":"[]"}
{"doc_id":"master-design","doc_type":"design","version":"v0.1","section_id":"master-design/v11_Ensemble_Master_Design/7_관측_인프라_Observability_/7_2_삼중_집계","section_title":"7.2 삼중 집계","section_text":"- Realized PnL\n- Unrealized PnL (그리드/MM inventory 포함)\n- Funding PnL (누적)\n- Fee PnL (taker/maker 분리)","alpha_id":null,"kill_switch_layer":null,"references":"[]"}
{"doc_id":"master-design","doc_type":"design","version":"v0.1","section_id":"master-design/v11_Ensemble_Master_Design/7_관측_인프라_Observability_/7_3_대시보드_Supabase_portfolio_public_","section_title":"7.3 대시보드 (Supabase + portfolio/public)","section_text":"- 알파별 PnL/Sharpe/trades\n- 알파 간 상관계수 매트릭스\n- Kill switch 발동 로그\n- shadow vs live 괴리\n\n---","alpha_id":null,"kill_switch_layer":null,"references":"[]"}
{"doc_id":"master-design","doc_type":"design","version":"v0.1","section_id":"master-design/v11_Ensemble_Master_Design/8_실행_로드맵_요약","section_title":"8. 실행 로드맵 요약","section_text":"상세: [ROADMAP.md](ROADMAP.md)\n\n```\nPhase -1 (1주) 지혈 + 관측복구 + Critical 리스크버그 7개 수정\nPhase 0 (1주) 인프라 대수술 (cryptofeed, forceOrder, backtest v2)\nPhase 1 (2주) 알파 개별 shadow 증명 (Sharpe>1.2, p<0.05 통과한 것만)\nPhase 2 (2주) 소액 라이브 $100~$500 (레버리지 3x 시작)\nPhase 3 자본 증액 + 레버리지 단계 상향 (일 0.5% → 0.6% → 0.8%)\n```\n\n---","alpha_id":null,"kill_switch_layer":null,"references":"[]"}
{"doc_id":"master-design","doc_type":"design","version":"v0.1","section_id":"master-design/v11_Ensemble_Master_Design/9_현재_코드_재사용_매핑","section_title":"9. 현재 코드 재사용 매핑","section_text":"상세: [CURRENT_CODE_AUDIT.md](CURRENT_CODE_AUDIT.md)\n\n- **유지**: WS/데이터피드, position-registry, event-risk-gate, news-updater, meta-classifier, supabase-sync\n- **제거**: grid-order-manager, smart-trend-engine, 9 에이전트 중 8개, 모든 `backtest-*.js`\n- **신규**: liquidation-hunter-agent, macro-event-agent, alt-mm-engine, liquidation-stream, mmr-monitor, correlation-killer, backtest v2\n\n---","alpha_id":null,"kill_switch_layer":null,"references":"[\"backtest-*.js\"]"}
{"doc_id":"master-design","doc_type":"design","version":"v0.1","section_id":"master-design/v11_Ensemble_Master_Design/10_승인_체인","section_title":"10. 승인 체인","section_text":"- v11 Master Design 작성자: Claude Code (Opus 4.7 1M)\n- 검증: 6 병렬 전문가 (교차 검증 완료)\n- 최종 승인: 사용자 (2026-04-22 \"설계문서화 + 정리\" 지시)\n- 문서 SSOT: `docs/v11-ensemble/` (본 트리)\n- 레거시 격리: `archive/` (backtest-fantasy, design-docs-legacy, README-legacy)\n\n---","alpha_id":null,"kill_switch_layer":null,"references":"[]"}
{"doc_id":"master-design","doc_type":"design","version":"v0.1","section_id":"master-design/v11_Ensemble_Master_Design/참고_문헌","section_title":"참고 문헌","section_text":"- López de Prado, M. (2018). *Advances in Financial Machine Learning*\n- Bailey & López de Prado (2014). \"The Deflated Sharpe Ratio\", *JPM*\n- Thorp, E. (1969). \"Optimal Gambling Systems for Favorable Games\"\n- Kelly, J. L. (1956). \"A New Interpretation of Information Rate\"\n- Cartea, Jaimungal, Penalva (2015). *Algorithmic and High-Frequency Trading*\n- Chan, E. (2013). *Algorithmic Trading*\n- Avellaneda & Stoikov (2008). \"High-frequency trading in a limit order book\"\n- Liu & Tsyvinski (2021). \"Risks and Returns of Cryptocurrency\", *RFS*","alpha_id":null,"kill_switch_layer":null,"references":"[]"}
{"doc_id":"index","doc_type":"design","version":"v1.0","section_id":"index/v11_Ensemble_문서_인덱스","section_title":"v11 Ensemble · 문서 인덱스","section_text":"> **SSOT:** 본 트리 (`docs/v11-ensemble/`)가 v11 설계의 Single Source of Truth\n> **전신:** v6~v10 문서는 `archive/design-docs-legacy/`로 이동 (참고만)\n> **작성일:** 2026-04-22\n> **승인:** 사용자 \"설계문서화 + 정리\" 지시 (2026-04-22)\n\n---","alpha_id":null,"kill_switch_layer":null,"references":"[]"}
{"doc_id":"index","doc_type":"design","version":"v1.0","section_id":"index/v11_Ensemble_문서_인덱스/_문서_계층","section_title":"📑 문서 계층","section_text":"```\ndocs/v11-ensemble/\n├── INDEX.md ← 본 파일 (진입점)\n├── MASTER_DESIGN.md ← 전체 아키텍처 (필독)\n├── ROADMAP.md ← Phase -1 ~ 3 실행 계획\n├── RISK_KILLSWITCH.md ← 7-Layer 리스크 엔지니어링\n├── CURRENT_CODE_AUDIT.md ← 유지/제거/신규 모듈 매핑\n\n├── alpha-specs/ ← 6개 알파 개별 스펙\n│ ├── A1_liquidation_cascade.md ← ⭐ Primary (일 0.4~0.6%)\n│ ├── A2_mean_reversion_ou.md ← 고빈도 (일 0.3~0.8%)\n│ ├── A3_extreme_funding.md ← 역포지션 (일 0.2~0.3%)\n│ ├── A4_macro_event.md ← CPI/FOMC (이벤트일 0.5~1.2%)\n│ ├── A5_funding_basis_harvest.md ← 델타중립 (일 0.05~0.15%)\n│ └── A6_alt_market_making.md ← MM (일 0.1~0.3%)\n\n├── expert-reports/ ← 6명 병렬 전문가 보고서 원본\n│ ├── 01_math_boundary.md ← 수학적 경계 분석\n│ ├── 02_hft_mm_strategies.md ← HFT/MM 실전 전략\n│ ├── 03_stat_arb.md ← Statistical Arbitrage\n│ ├── 04_risk_survival.md ← 리스크/생존 분석\n│ ├── 05_ml_rl.md ← ML/RL adaptive\n│ └── 06_event_alpha.md ← 이벤트 드리븐 알파\n\n├── research/ ← 외부 교차검증 리서치\n│ └── 2026-04-24-external-validation.md ← Phase 0 착수 전 5축 외부 검증\n\n├── incidents/ ← 장애 / 사건 기록\n│ └── 2026-04-24-01-launch-live-paper-safeguard.md\n\n├── phase-gate--1.md ← Phase -1 게이트 (2026-04-24 closure)\n├── phase-gate-0.md ← Phase 0 스캐폴드 (pre-start, 외부 교차검증 반영)\n├── weekly-review-2026-W17.md ← 주간 리뷰\n└── backtest-v2-engine-decision.md ← Backtest v2 엔진 선택 결정\n```\n\n---","alpha_id":null,"kill_switch_layer":null,"references":"[]"}
{"doc_id":"index","doc_type":"design","version":"v1.0","section_id":"index/v11_Ensemble_문서_인덱스/_읽는_순서/처음_온_경우","section_title":"처음 온 경우","section_text":"1. **[MASTER_DESIGN.md](MASTER_DESIGN.md)** — 핵심 철학과 6-알파 구조 (5분)\n2. **[ROADMAP.md](ROADMAP.md)** — 실행 단계 (Phase -1 ~ 3)\n3. **[alpha-specs/](alpha-specs/)** 중 관심 알파 1~2개","alpha_id":null,"kill_switch_layer":null,"references":"[]"}
{"doc_id":"index","doc_type":"design","version":"v1.0","section_id":"index/v11_Ensemble_문서_인덱스/_읽는_순서/개발자_구현_착수_","section_title":"개발자 (구현 착수)","section_text":"1. [CURRENT_CODE_AUDIT.md](CURRENT_CODE_AUDIT.md) — 어떤 코드 유지/삭제/신규\n2. [RISK_KILLSWITCH.md](RISK_KILLSWITCH.md) — 구현 전 필수 리스크 수정\n3. [alpha-specs/](alpha-specs/) — 담당 알파 스펙","alpha_id":null,"kill_switch_layer":null,"references":"[]"}
{"doc_id":"index","doc_type":"design","version":"v1.0","section_id":"index/v11_Ensemble_문서_인덱스/_읽는_순서/리뷰어","section_title":"리뷰어","section_text":"1. [expert-reports/](expert-reports/) — 6명 전문가 원본 보고서\n2. [MASTER_DESIGN.md](MASTER_DESIGN.md) — 합의 결론\n3. [research/2026-04-24-external-validation.md](research/2026-04-24-external-validation.md) — 외부 공개 근거 교차검증 (Phase 0 직전)\n\n---","alpha_id":null,"kill_switch_layer":null,"references":"[]"}
{"doc_id":"index","doc_type":"design","version":"v1.0","section_id":"index/v11_Ensemble_문서_인덱스/_핵심_합의_사항_6전문가_교차_검증_","section_title":"🔑 핵심 합의 사항 (6전문가 교차 검증)","section_text":"| 주제 | 결론 |\n|---|---|\n| 일 1% 지속 가능성 | ❌ 기관 공개 사례 0건. 단기만 가능 |\n| 현실 목표 | 일 0.6~1.0% (6-알파 앙상블) |\n| 레버리지 상한 | **5x (Kelly/3)** — 무제한 감수 의사 있어도 |\n| 365일 생존확률 (5x) | ~68% |\n| 365일 생존확률 (20x) | 2% |\n| 백테스트 재작성 | 필수 (tick-level + 실수수료/슬리피지/funding) |\n| 페이퍼 검증 | 2주 (알파별) + 30일 통합 |\n| 자본 전제 | $100+ 권장 (현재 $29) |\n\n---","alpha_id":null,"kill_switch_layer":null,"references":"[]"}
{"doc_id":"index","doc_type":"design","version":"v1.0","section_id":"index/v11_Ensemble_문서_인덱스/_폐기된_접근_archive_참조_","section_title":"🚫 폐기된 접근 (archive 참조)","section_text":"- v6 `DESIGN-v7-daily-1pct.md` — 낙관적 백테스트 기반, 실거래 증명 실패\n- v8 SmartTrend 단일 전략 — 통계적 유의성 없음 (76건 40.8% WR)\n- v8.x Grid Engine — 장부 누락 버그 (실제 drain 원인)\n- v9 ROADMAP — 리스크 1x 전제에 가변 레버리지 얹은 구조적 모순\n\n→ 상세: `archive/design-docs-legacy/`\n\n---","alpha_id":null,"kill_switch_layer":null,"references":"[\"DESIGN-v7-daily-1pct.md\"]"}
{"doc_id":"index","doc_type":"design","version":"v1.0","section_id":"index/v11_Ensemble_문서_인덱스/_문서_갱신_규칙","section_title":"📝 문서 갱신 규칙","section_text":"- 본 트리는 v11 **설계 SSOT**. 코드와 불일치시 **문서 우선 수정** 원칙\n- 구현 완료시 해당 스펙 문서 하단에 **구현 노트** 섹션 추가\n- Phase 전환시 `phase-gate-Nx.md` 체크리스트 신규 작성\n- 주간 리뷰: `weekly-review-YYYY-WW.md` (Phase 1 진입 후)\n- 장애: `incidents/YYYY-MM-DD.md`\n\n---","alpha_id":null,"kill_switch_layer":null,"references":"[\"phase-gate-Nx.md\", \"weekly-review-YYYY-WW.md\", \"incidents/YYYY-MM-DD.md\"]"}
{"doc_id":"index","doc_type":"design","version":"v1.0","section_id":"index/v11_Ensemble_문서_인덱스/_관련_SSOT","section_title":"🔗 관련 SSOT","section_text":"- 프로젝트 런타임 상태: `.agent/shared-brain/status.json`\n- 진행중 태스크: `.agent/shared-brain/active-tasks.md`\n- 신·구 문서 매핑: `archive/README-legacy/README.md.pre-v11`\n- 전체 neo-genesis 규칙: `.agent/NEO_MASTER_RULES.md`\n\n---","alpha_id":null,"kill_switch_layer":null,"references":"[\".agent/shared-brain/status.json\", \".agent/shared-brain/active-tasks.md\", \".agent/NEO_MASTER_RULES.md\"]"}
{"doc_id":"index","doc_type":"design","version":"v1.0","section_id":"index/v11_Ensemble_문서_인덱스/다음_액션","section_title":"다음 액션","section_text":"Phase -1 착수시:\n1. `docs/v11-ensemble/phase-gate--1.md` 체크리스트 생성\n2. Task -1.1 (VM 페이퍼 모드 전환) — 사용자 승인 게이트\n3. Task -1.2 (Critical 버그 수정) — PR 단위 진행","alpha_id":null,"kill_switch_layer":null,"references":"[\"docs/v11-ensemble/phase-gate--1.md\"]"}
{"doc_id":"current-code-audit","doc_type":"design","version":"v0.1","section_id":"current-code-audit/v11_현재_코드_재사용_제거_신규_감사","section_title":"v11 현재 코드 재사용/제거/신규 감사","section_text":"> **기준일:** 2026-04-22\n> **감사자:** Claude Code + 6 병렬 전문가 교차 검증\n> **용도:** Phase -1 ~ 2 구현 가이드\n\n---","alpha_id":null,"kill_switch_layer":null,"references":"[]"}
{"doc_id":"current-code-audit","doc_type":"design","version":"v0.1","section_id":"current-code-audit/v11_현재_코드_재사용_제거_신규_감사/_유지_Keep_21개_모듈/Core_Infrastructure","section_title":"Core Infrastructure","section_text":"| 파일 | 용도 | v11 변경 |\n|---|---|---|\n| [src/core/ws-connection-manager.js](../../src/core/ws-connection-manager.js) | Binance WS 연결 | reconnect 로직 강화 |\n| [src/core/ws-data-feed.js](../../src/core/ws-data-feed.js) | OHLCV 데이터 피드 | stale detection 추가 |\n| [src/core/multi-tf-fetcher.js](../../src/core/multi-tf-fetcher.js) | 멀티 타임프레임 | 그대로 유지 |\n| [src/core/position-registry.js](../../src/core/position-registry.js) | 포지션 생명주기 | MAE/MFE 훅 강제 호출 |\n| [src/core/symbol-utils.js](../../src/core/symbol-utils.js) | 심볼 정규화 | 그대로 |\n| [src/core/state-manager.js](../../src/core/state-manager.js) | 상태 관리 | 그대로 |\n| [src/core/state-snapshot.js](../../src/core/state-snapshot.js) | 스냅샷 | 그대로 |","alpha_id":null,"kill_switch_layer":null,"references":"[]"}
{"doc_id":"current-code-audit","doc_type":"design","version":"v0.1","section_id":"current-code-audit/v11_현재_코드_재사용_제거_신규_감사/_유지_Keep_21개_모듈/Monitoring_Risk","section_title":"Monitoring & Risk","section_text":"| 파일 | 용도 | v11 변경 |\n|---|---|---|\n| [src/core/supabase-sync.js](../../src/core/supabase-sync.js) | Supabase 동기화 | funding/fee 분리 집계 추가 |\n| [src/monitoring/health-monitor.js](../../src/monitoring/health-monitor.js) | 헬스체크 | 그대로 |\n| [src/monitoring/logger.js](../../src/monitoring/logger.js) | 로거 | 그대로 |\n| [src/monitoring/notifier.js](../../src/monitoring/notifier.js) | 텔레그램 | kill switch 알림 추가 |\n| [src/monitoring/trade-ledger-collector.js](../../src/monitoring/trade-ledger-collector.js) | 장부 | 수수료/펀딩 정확화 |\n| [src/core/risk-governor.js](../../src/core/risk-governor.js) | 리스크 거버너 | **6개 버그 수정** (RISK_KILLSWITCH.md 참조) |\n| [src/core/risk-feed.js](../../src/core/risk-feed.js) | 리스크 피드 | **fail-closed 버그 수정** |\n| [src/core/risk-policy-engine.js](../../src/core/risk-policy-engine.js) | 리스크 정책 | fail-open → fail-closed |\n| [src/core/rate-limit-governor.js](../../src/core/rate-limit-governor.js) | Rate limit | 감사 + 강화 |","alpha_id":null,"kill_switch_layer":null,"references":"[]"}
{"doc_id":"current-code-audit","doc_type":"design","version":"v0.1","section_id":"current-code-audit/v11_현재_코드_재사용_제거_신규_감사/_유지_Keep_21개_모듈/Alpha_Input_Runtime","section_title":"Alpha Input & Runtime","section_text":"| 파일 | 용도 | v11 변경 |\n|---|---|---|\n| [src/core/event-risk-gate.js](../../src/core/event-risk-gate.js) | 이벤트 게이트 | **A4 매크로이벤트 진입기로 확장** |\n| [src/core/news-snapshot-updater.js](../../src/core/news-snapshot-updater.js) | 뉴스 | A4 데이터 피드 |\n| [src/core/market-context.js](../../src/core/market-context.js) | 시장 컨텍스트 | HMM regime 추가 예정 |\n| [src/core/capital-tier-router.js](../../src/core/capital-tier-router.js) | 자본 배분 | 알파별 배분으로 재설계 |\n| [src/core/runtime-coordinator.js](../../src/core/runtime-coordinator.js) | 런타임 조정 | halt_until 컬럼 연동 |\n| [src/core/runtime-guardrails.js](../../src/core/runtime-guardrails.js) | 가드레일 | 그대로 |\n| [src/core/signal-gate.js](../../src/core/signal-gate.js) | 시그널 게이트 | 알파별 분기 |\n| [src/core/universe-selector.js](../../src/core/universe-selector.js) | 유니버스 | 알파별 대상 |","alpha_id":null,"kill_switch_layer":null,"references":"[]"}
{"doc_id":"current-code-audit","doc_type":"design","version":"v0.1","section_id":"current-code-audit/v11_현재_코드_재사용_제거_신규_감사/_유지_Keep_21개_모듈/에이전트_중_유일하게_유지","section_title":"에이전트 중 유일하게 유지","section_text":"| 파일 | 역할 | v11 변경 |\n|---|---|---|\n| [src/agents/base-agent.js](../../src/agents/base-agent.js) | 베이스 클래스 | 그대로 |\n| [src/agents/mean-revert-agent.js](../../src/agents/mean-revert-agent.js) | **A2 엔진** | OU half-life 동적 추정 추가 |","alpha_id":null,"kill_switch_layer":null,"references":"[]"}
{"doc_id":"current-code-audit","doc_type":"design","version":"v0.1","section_id":"current-code-audit/v11_현재_코드_재사용_제거_신규_감사/_유지_Keep_21개_모듈/ML","section_title":"ML","section_text":"| 파일 | 용도 | v11 변경 |\n|---|---|---|\n| [src/ml/meta-classifier.js](../../src/ml/meta-classifier.js) | 메타분류기 | **veto-only 모드** (진입 추가 금지) |","alpha_id":null,"kill_switch_layer":null,"references":"[]"}
{"doc_id":"current-code-audit","doc_type":"design","version":"v0.1","section_id":"current-code-audit/v11_현재_코드_재사용_제거_신규_감사/_유지_Keep_21개_모듈/Execution","section_title":"Execution","section_text":"| 파일 | 용도 | v11 변경 |\n|---|---|---|\n| [src/execution/futures-executor.js](../../src/execution/futures-executor.js) | 선물 실행 | Layer 1 STOP_MARKET 자동 전송 |\n| [src/execution/execution-planner.js](../../src/execution/execution-planner.js) | 실행 계획 | 그대로 |","alpha_id":null,"kill_switch_layer":null,"references":"[]"}
{"doc_id":"current-code-audit","doc_type":"design","version":"v0.1","section_id":"current-code-audit/v11_현재_코드_재사용_제거_신규_감사/_유지_Keep_21개_모듈/Engines_1개만_유지_재목적화_","section_title":"Engines (1개만 유지 + 재목적화)","section_text":"| 파일 | v11 역할 | 변경 |\n|---|---|---|\n| [src/engines/funding-harvest-manager.js](../../src/engines/funding-harvest-manager.js) | **A5 엔진** | spot 연결 + 델타중립 자동화 |\n\n---","alpha_id":null,"kill_switch_layer":null,"references":"[]"}
{"doc_id":"current-code-audit","doc_type":"design","version":"v0.1","section_id":"current-code-audit/v11_현재_코드_재사용_제거_신규_감사/_제거_아카이브_Remove_13개_모듈/에이전트_8개_폐기_","section_title":"에이전트 (8개 폐기)","section_text":"이유: 통계적 증거 부재 + orchestrator 복잡도 폭발 + 실거래 결과 부진\n\n- [src/agents/breakout-agent.js](../../src/agents/breakout-agent.js)\n- [src/agents/trend-ride-agent.js](../../src/agents/trend-ride-agent.js) — 실거래 WR 36.8%\n- [src/agents/funding-agent.js](../../src/agents/funding-agent.js) — A5로 대체\n- [src/agents/dca-agent.js](../../src/agents/dca-agent.js)\n- [src/agents/momentum-agent.js](../../src/agents/momentum-agent.js) — 실거래 WR 36.7%\n- [src/agents/basis-agent.js](../../src/agents/basis-agent.js) — A5로 대체\n- [src/agents/kimchi-agent.js](../../src/agents/kimchi-agent.js)\n- [src/agents/bear-slap-agent.js](../../src/agents/bear-slap-agent.js)\n- [src/agents/bear-market-agent.js](../../src/agents/bear-market-agent.js)","alpha_id":null,"kill_switch_layer":null,"references":"[]"}
{"doc_id":"current-code-audit","doc_type":"design","version":"v0.1","section_id":"current-code-audit/v11_현재_코드_재사용_제거_신규_감사/_제거_아카이브_Remove_13개_모듈/엔진_2개_폐기_","section_title":"엔진 (2개 폐기)","section_text":"- [src/engines/grid-order-manager.js](../../src/engines/grid-order-manager.js) — **장부 누락 Critical 버그** (실제 drain $9 원인)\n- [src/engines/smart-trend-engine.js](../../src/engines/smart-trend-engine.js) — 76건 40.8% WR 통계적 유의성 없음\n- [src/engines/smart-trend-feedback.js](../../src/engines/smart-trend-feedback.js) — smart-trend 종속","alpha_id":null,"kill_switch_layer":null,"references":"[]"}
{"doc_id":"current-code-audit","doc_type":"design","version":"v0.1","section_id":"current-code-audit/v11_현재_코드_재사용_제거_신규_감사/_제거_아카이브_Remove_13개_모듈/백테스트_전면_폐기_","section_title":"백테스트 (전면 폐기)","section_text":"이유: 127k승 0패 등 판타지 결과\n\n이미 이동 완료:\n- `archive/backtest-fantasy/backtest-2020-2023.json`\n- `archive/backtest-fantasy/backtest-2y-*.json` (5개)\n- `archive/backtest-fantasy/backtest-v75-*.json` (4개)\n- `archive/backtest-fantasy/backtest-hardcore.json`\n- `archive/backtest-fantasy/backtest-optimal.json`\n- `archive/backtest-fantasy/backtest-regimes-results.json`\n- `archive/backtest-fantasy/backtest-results.json`","alpha_id":null,"kill_switch_layer":null,"references":"[\"archive/backtest-fantasy/backtest-2020-2023.json\", \"archive/backtest-fantasy/backtest-2y-*.json\", \"archive/backtest-fantasy/backtest-v75-*.json\", \"archive/backtest-fantasy/backtest-hardcore.json\", \"archive/backtest-fantasy/backtest-optimal.json\", \"archive/backtest-fantasy/backtest-regimes-results.json\", \"archive/backtest-fantasy/backtest-results.json\"]"}
{"doc_id":"current-code-audit","doc_type":"design","version":"v0.1","section_id":"current-code-audit/v11_현재_코드_재사용_제거_신규_감사/_제거_아카이브_Remove_13개_모듈/백테스트_스크립트","section_title":"백테스트 스크립트","section_text":"Phase 0에서 [src/backtest/v2/](../../src/backtest/v2/) 재작성 후 기존 스크립트 아카이브:\n- `src/scripts/backtest-2020-2023.js`\n- `src/scripts/backtest-2y*.js` (5개)\n- `src/scripts/backtest-hardcore.js`\n- `src/scripts/backtest-optimal.js`\n- `src/scripts/backtest-regimes.js`\n- `src/scripts/backtest-real.js`\n- `src/scripts/backtest-v75*.js` (4개)\n- `src/scripts/sim-v7.js`","alpha_id":null,"kill_switch_layer":null,"references":"[\"src/scripts/backtest-2020-2023.js\", \"src/scripts/backtest-2y*.js\", \"src/scripts/backtest-hardcore.js\", \"src/scripts/backtest-optimal.js\", \"src/scripts/backtest-regimes.js\", \"src/scripts/backtest-real.js\", \"src/scripts/backtest-v75*.js\", \"src/scripts/sim-v7.js\"]"}
{"doc_id":"current-code-audit","doc_type":"design","version":"v0.1","section_id":"current-code-audit/v11_현재_코드_재사용_제거_신규_감사/_제거_아카이브_Remove_13개_모듈/기타","section_title":"기타","section_text":"- `src/engines/smart-trend-feedback.js` — smart-trend 종속\n\n---","alpha_id":null,"kill_switch_layer":null,"references":"[\"src/engines/smart-trend-feedback.js\"]"}
{"doc_id":"current-code-audit","doc_type":"design","version":"v0.1","section_id":"current-code-audit/v11_현재_코드_재사용_제거_신규_감사/_신규_구현_New_12개_모듈/Phase_0_1주차_","section_title":"Phase 0 (1주차)","section_text":"| 파일 | 용도 | 근거 |\n|---|---|---|\n| `src/core/liquidation-stream.js` | Binance forceOrder WS + cluster 감지 | A1 필수 데이터 |\n| `src/core/mmr-monitor.js` | Binance leverageBracket 기반 실청산가 | Kill Switch Layer 6 |\n| `src/core/correlation-killer.js` | 심볼간 동시 하락 감지 | Kill Switch Layer 3 |\n| `src/backtest/v2/engine.js` | tick-level + 실수수료/슬리피지/funding | 백테스트 허구 차단 |\n| `src/backtest/v2/fill-simulator.js` | orderbook depth 기반 slippage | 실제 체결 모델링 |\n| `src/backtest/v2/inventory-tracker.js` | grid/MM 미실현 PnL 추적 | 장부 누락 방지 |","alpha_id":null,"kill_switch_layer":null,"references":"[\"src/core/liquidation-stream.js\", \"src/core/mmr-monitor.js\", \"src/core/correlation-killer.js\", \"src/backtest/v2/engine.js\", \"src/backtest/v2/fill-simulator.js\", \"src/backtest/v2/inventory-tracker.js\"]"}
{"doc_id":"current-code-audit","doc_type":"design","version":"v0.1","section_id":"current-code-audit/v11_현재_코드_재사용_제거_신규_감사/_신규_구현_New_12개_모듈/Phase_1_알파별_","section_title":"Phase 1 (알파별)","section_text":"| 파일 | 역할 | 기대 기여 |\n|---|---|---|\n| `src/agents/liquidation-hunter-agent.js` | A1 청산 캐스케이드 역매매 | 일 0.4~0.6% |\n| `src/agents/extreme-funding-agent.js` | A3 극단 펀딩 역포지션 | 일 0.2~0.3% |\n| `src/agents/macro-event-agent.js` | A4 CPI/FOMC 이벤트 | 이벤트일 0.5~1.2% |\n| `src/engines/alt-mm-engine.js` | A6 알트 market making | 일 0.1~0.3% |","alpha_id":null,"kill_switch_layer":null,"references":"[\"src/agents/liquidation-hunter-agent.js\", \"src/agents/extreme-funding-agent.js\", \"src/agents/macro-event-agent.js\", \"src/engines/alt-mm-engine.js\"]"}
{"doc_id":"current-code-audit","doc_type":"design","version":"v0.1","section_id":"current-code-audit/v11_현재_코드_재사용_제거_신규_감사/_신규_구현_New_12개_모듈/Phase_2_통합_","section_title":"Phase 2 (통합)","section_text":"| 파일 | 용도 |\n|---|---|\n| `src/ensemble/alpha-allocator.js` | 6개 알파 자본 배분 오케스트레이터 |\n| `src/ensemble/correlation-monitor.js` | 알파 간 상관계수 실시간 계산 |\n\n---","alpha_id":null,"kill_switch_layer":null,"references":"[\"src/ensemble/alpha-allocator.js\", \"src/ensemble/correlation-monitor.js\"]"}
{"doc_id":"current-code-audit","doc_type":"design","version":"v0.1","section_id":"current-code-audit/v11_현재_코드_재사용_제거_신규_감사/_디렉토리_재조직_Phase_-1_말_","section_title":"🗂️ 디렉토리 재조직 (Phase -1 말)","section_text":"```\nauto-trading/\n├── docs/\n│ └── v11-ensemble/ ← 현 v11 SSOT\n│ ├── MASTER_DESIGN.md\n│ ├── ROADMAP.md\n│ ├── RISK_KILLSWITCH.md\n│ ├── CURRENT_CODE_AUDIT.md (이 파일)\n│ ├── alpha-specs/\n│ │ ├── A1_liquidation_cascade.md\n│ │ ├── A2_mean_reversion_ou.md\n│ │ ├── A3_extreme_funding.md\n│ │ ├── A4_macro_event.md\n│ │ ├── A5_funding_basis_harvest.md\n│ │ └── A6_alt_market_making.md\n│ └── expert-reports/\n│ ├── 01_math_boundary.md\n│ ├── 02_hft_mm_strategies.md\n│ ├── 03_stat_arb.md\n│ ├── 04_risk_survival.md\n│ ├── 05_ml_rl.md\n│ └── 06_event_alpha.md\n\n├── src/\n│ ├── agents/ ← 4개만 남김 (base + A2 meanRevert + A1 liqHunter + A3 extremeFunding)\n│ ├── engines/ ← A5 funding-harvest + A6 alt-mm 만\n│ ├── core/ ← 기존 + liquidation-stream + mmr-monitor + correlation-killer\n│ ├── backtest/\n│ │ └── v2/ ← 신규 tick-level 엔진\n│ ├── ensemble/ ← 신규 알파 allocator\n│ ├── execution/\n│ ├── ml/\n│ └── monitoring/\n\n├── archive/\n│ ├── backtest-fantasy/ ← 12개 판타지 결과 파일 (완료)\n│ ├── design-docs-legacy/ ← v7, v8, v9 문서 (완료)\n│ ├── README-legacy/ ← 이전 README 백업\n│ ├── agents-deprecated/ ← 8개 폐기 에이전트 (Phase -1에서 이동)\n│ ├── engines-deprecated/ ← grid-order-manager, smart-trend (Phase -1)\n│ └── scripts-deprecated/ ← 구 백테스트 스크립트 (Phase 0)\n\n└── test/\n ├── killswitch/ ← 신규 (Layer별 단위테스트)\n ├── alpha-specs/ ← 알파별 shadow 검증 기록\n └── backtest-v2/ ← backtest v2 검증\n```\n\n---","alpha_id":null,"kill_switch_layer":null,"references":"[]"}
{"doc_id":"current-code-audit","doc_type":"design","version":"v0.1","section_id":"current-code-audit/v11_현재_코드_재사용_제거_신규_감사/_코드_라인_수_변화_예상","section_title":"📊 코드 라인 수 변화 예상","section_text":"| 구분 | 현재 | v11 목표 |\n|---|---|---|\n| 총 라인 | ~13,234 | ~8,000 |\n| 에이전트 | 10개 | 4개 (base+3알파) |\n| 엔진 | 4개 | 2개 |\n| 백테스트 스크립트 | 12개 | 1개 (v2) |\n| 테스트 커버리지 | 불명 | 알파별 + 킬스위치별 |\n\n**약 40% 코드 감소** 예상 + 관측/리스크 레이어 강화\n\n---","alpha_id":null,"kill_switch_layer":null,"references":"[]"}
{"doc_id":"current-code-audit","doc_type":"design","version":"v0.1","section_id":"current-code-audit/v11_현재_코드_재사용_제거_신규_감사/_이동시_주의사항/git_히스토리_보존","section_title":"git 히스토리 보존","section_text":"레거시 에이전트/엔진 파일을 `archive/`로 옮길 때:\n```bash\ngit mv src/agents/breakout-agent.js archive/agents-deprecated/\ngit mv src/engines/grid-order-manager.js archive/engines-deprecated/\n```\n→ git blame 보존됨","alpha_id":null,"kill_switch_layer":null,"references":"[]"}
{"doc_id":"current-code-audit","doc_type":"design","version":"v0.1","section_id":"current-code-audit/v11_현재_코드_재사용_제거_신규_감사/_이동시_주의사항/호출_그래프_차단","section_title":"호출 그래프 차단","section_text":"이동 전 반드시:\n1. `grep -r \"require.*breakout-agent\"` 호출처 확인\n2. orchestrator 등에서 import 제거\n3. 빌드/lint 통과 확인\n4. 그 다음 파일 이동","alpha_id":null,"kill_switch_layer":null,"references":"[]"}
{"doc_id":"current-code-audit","doc_type":"design","version":"v0.1","section_id":"current-code-audit/v11_현재_코드_재사용_제거_신규_감사/_이동시_주의사항/삭제_금지","section_title":"삭제 금지","section_text":"`archive/`는 **완전 삭제가 아니라 격리**. 향후 ablation study에 활용 가능.\n\n---","alpha_id":null,"kill_switch_layer":null,"references":"[]"}
{"doc_id":"current-code-audit","doc_type":"design","version":"v0.1","section_id":"current-code-audit/v11_현재_코드_재사용_제거_신규_감사/다음_단계","section_title":"다음 단계","section_text":"이 감사 문서 기반으로:\n1. Phase -1 Task -1.4 (레거시 코드 격리) 실행\n2. 각 Task는 개별 PR/커밋 단위로\n3. 이동 후 [docs/v11-ensemble/weekly-review-2026-W17.md](weekly-review-2026-W17.md)에 정리 기록","alpha_id":null,"kill_switch_layer":null,"references":"[]"}
{"doc_id":"backtest-decision","doc_type":"design","version":"v1.0","section_id":"backtest-decision/Backtest_v2_Engine_Decision_2026-04-24","section_title":"Backtest v2 Engine Decision · 2026-04-24","section_text":"> **결정자:** Claude Opus 4.7 + 외부 교차검증 리서치\n> **근거 문서:** [research/2026-04-24-external-validation.md](research/2026-04-24-external-validation.md) §2\n> **결정 범위:** Phase 0 `src/backtest/v2/` 스캐폴드 — 엔진 선택 + 검증 하네스 + 안티패턴 방지\n> **결정 배경:** 현 백테스트 결과 \"127k 승 / 0 패\" = 엔진 수준의 fill/funding/slippage 버그로 판정. 엔진 튜닝이 아니라 **전면 교체** 결정.\n\n---","alpha_id":null,"kill_switch_layer":null,"references":"[]"}
{"doc_id":"backtest-decision","doc_type":"design","version":"v1.0","section_id":"backtest-decision/Backtest_v2_Engine_Decision_2026-04-24/결론_먼저_","section_title":"결론 (먼저)","section_text":"1. **Primary engine = `nautilus_trader`**\n2. **Secondary engine = `hftbacktest` (A1 / A6 전용)**\n3. **Validation harness = `mlfinlab` 또는 자체 구현 (CPCV + PBO + Deflated Sharpe)**\n4. **보조 도구 = `vectorbt pro` (파라미터 스윕 전용)**\n5. **탈락 = backtrader · zipline-reloaded · freqtrade · hummingbot · QuantConnect LEAN**\n\nPhase 0 에서 `nautilus_trader` 어댑터와 validation harness 를 **먼저** 완성하고, 알파 구현은 뒤로 미룬다.\n\n---","alpha_id":null,"kill_switch_layer":null,"references":"[]"}
{"doc_id":"backtest-decision","doc_type":"design","version":"v1.0","section_id":"backtest-decision/Backtest_v2_Engine_Decision_2026-04-24/1_선정_근거/1_1_Primary_nautilus_trader_","section_title":"1.1 Primary: `nautilus_trader`","section_text":"| 요구사항 | nautilus_trader 대응 |\n| --- | --- |\n| Tick-level (나노초) | ✅ quote + trade + orderbook delta 네이티브 |\n| 펀딩 네이티브 | ✅ `FundingRateUpdate` + `request_funding_rates` (2025-10 릴리스) |\n| Binance Futures 통합 | ✅ `-PERP` 분기 + `CryptoPerpetual` 네이티브 |\n| Live parity | ✅ **동일 코드가 backtest → live 그대로 실행** (핵심 차별점) |\n| Maker/Taker fee 모델 | ✅ `FeeModel` instrument-level 정의 |\n| Order book 시뮬 | ✅ L2 matching engine 내장 (단순 큐 모델) |\n| Python API | ✅ Rust 코어 + Python 바인딩 |\n| 활성 유지보수 | ✅ 2025-10 기준 릴리스 지속 |\n\n**단점:**\n- L3 큐 포지션 모델은 단순 (FIFO 근사) — A1/A6 같은 microstructure 알파에는 부족\n- 학습곡선 존재, Nautilus 특유의 메시지 기반 아키텍처 숙지 필요","alpha_id":null,"kill_switch_layer":null,"references":"[]"}
{"doc_id":"backtest-decision","doc_type":"design","version":"v1.0","section_id":"backtest-decision/Backtest_v2_Engine_Decision_2026-04-24/1_선정_근거/1_2_Secondary_hftbacktest_A1_A6_전용_","section_title":"1.2 Secondary: `hftbacktest` (A1 / A6 전용)","section_text":"| 요구사항 | hftbacktest 대응 |\n| --- | --- |\n| L3 MBO (Market By Order) | ✅ 업계 최상, Rust 코어 |\n| Feed latency | ✅ 양방향 모델 (feed delay + order ACK delay) |\n| 큐 포지션 | ✅ 정밀 (front-of-queue vs back-of-queue fill 차이 반영) |\n| Liquidation event 주입 | ⚠️ 수동 (tick 스트림에 직접 merge 필요) |\n\n**용도 제한:**\n- A1 Liquidation Cascade — Oct 2025 급 depth 98% 증발 상황에서 taker fill 실패 정확 모델링\n- A6 Alt MM — maker rebate + 큐 포지션이 수익의 핵심 인자\n- 포트폴리오 통합 backtest 에는 부적합 → nautilus_trader 가 담당\n\n**통합 타이밍:**\n- Phase 0 에는 미통합. Phase 1 A1/A6 구현 시점에 통합.","alpha_id":null,"kill_switch_layer":null,"references":"[]"}
{"doc_id":"backtest-decision","doc_type":"design","version":"v1.0","section_id":"backtest-decision/Backtest_v2_Engine_Decision_2026-04-24/1_선정_근거/1_3_Validation_Harness_필수_외부_계층_","section_title":"1.3 Validation Harness (필수 외부 계층)","section_text":"프레임워크 어느 것도 내장하지 않는, **별도 Python 모듈**로 분리:\n\n- `validation/cpcv.py` — Combinatorial Purged K-Fold CV (mlfinlab 포팅 또는 `skfolio.CombinatorialPurgedCV`)\n- `validation/deflated_sharpe.py` — Bailey & López de Prado (2014) SSRN 2460551 공식\n- `validation/pbo.py` — Probability of Backtest Overfitting (PBO) 계산\n\n**CI 강제 규칙:**\n- 모든 백테스트 리포트는 **Sharpe 단독 보고 금지**\n- Deflated Sharpe + PBO 없이 제출되면 CI 실패\n- DSR < 0 이면 알파 라이브 승격 금지 (ROADMAP alpha-promotion gate 와 연동)","alpha_id":null,"kill_switch_layer":null,"references":"[\"validation/cpcv.py\", \"validation/deflated_sharpe.py\", \"validation/pbo.py\"]"}
{"doc_id":"backtest-decision","doc_type":"design","version":"v1.0","section_id":"backtest-decision/Backtest_v2_Engine_Decision_2026-04-24/1_선정_근거/1_4_보조_vectorbt_pro_","section_title":"1.4 보조: `vectorbt pro`","section_text":"- 용도 제한: **파라미터 스윕 + 빠른 statistical scanning**\n- 실제 체결 시뮬은 쓰지 않는다 (벡터화 엔진의 bar-crossing fill 함정 회피)\n- 최종 판정은 nautilus_trader 가 담당","alpha_id":null,"kill_switch_layer":null,"references":"[]"}
{"doc_id":"backtest-decision","doc_type":"design","version":"v1.0","section_id":"backtest-decision/Backtest_v2_Engine_Decision_2026-04-24/1_선정_근거/1_5_탈락_프레임워크_명시_","section_title":"1.5 탈락 프레임워크 (명시)","section_text":"| 프레임워크 | 탈락 이유 |\n| --- | --- |\n| **backtrader** | 2022 이후 유지보수 사실상 정지. perpetual funding 미지원. |\n| **zipline-reloaded** | Equities origin. crypto perp funding 1급 지원 없음. |\n| **freqtrade** | dry-run 이 **OHLCV bar-crossing 체결 기본** — 현 v11 엔진과 동일한 함정 패턴. 우리 문제의 해답이 아니라 원인 쪽. |\n| **hummingbot** | 라이브 MM 봇. 백테스트 엔진 아님 (전략 샘플 참고만). |\n| **QuantConnect LEAN** | Self-host 가능하나 perpetual funding 1급 지원 부족 + C# 의존. Python-only 운영 원칙과 충돌. |\n\n---","alpha_id":null,"kill_switch_layer":null,"references":"[]"}
{"doc_id":"backtest-decision","doc_type":"design","version":"v1.0","section_id":"backtest-decision/Backtest_v2_Engine_Decision_2026-04-24/2_127k_승_0_패_버그_원인_체크리스트","section_title":"2. \"127k 승 / 0 패\" 버그 원인 체크리스트","section_text":"Phase 0 구현 시 **모두 제거 보증** 해야 하는 안티패턴:\n\n1. **Bar-crossing fill** — limit price 가 bar OHLC 범위 내이면 무조건 체결. Freqtrade 기본 방식. **tick-level 에서 실제 trade 가 price level 을 touch + 내 큐 앞을 모두 소진** 해야 체결로 바꾼다.\n2. **Queue position = 0** — maker 100% 체결 가정. 실제 BTC 1-tier 에 이미 수백 BTC 앞줄.\n3. **Lookahead via 타임스탬프 반올림** — 1s tick 을 1m bar close 기준 신호 + same-bar 진입. 신호는 **bar close 에, 진입은 다음 bar open 또는 다음 tick** 으로 고정.\n4. **Funding PnL 누락 / 부호 반전** — long 이 positive funding 에서 **지불해야** 하는데 받는 것처럼 기록되면 승률 즉시 인플레.\n5. **Slippage 0 + 스프레드 0** — mid-price 체결 가정. 시장가 주문이 top-of-book 에 즉시 체결. 실제로 alt 는 몇 틱씩 걸어감.\n6. **Intra-bar liquidation 무시** — high 가 stop 을 건드려도 close 기준으로만 평가 → 생존 처리.\n7. **Survivorship bias** — 현재 상장 심볼만으로 2년 백테스트 → LUNA 계열 / 상폐 밈코인 -100% 이벤트 누락.\n8. **Train/test 누출** — normalization/z-score 를 전체 시계열 통계로 계산. CPCV purge 없으면 거의 확실히 발생.\n\nPhase 0 backtest v2 구현 시 `test/backtest/antipattern-guard.test.js` 를 신설해 위 8개를 CI 에서 강제 차단한다.\n\n---","alpha_id":null,"kill_switch_layer":null,"references":"[\"test/backtest/antipattern-guard.test.js\"]"}
{"doc_id":"backtest-decision","doc_type":"design","version":"v1.0","section_id":"backtest-decision/Backtest_v2_Engine_Decision_2026-04-24/3_Phase_0_스캐폴드_작업_분해/3_1_디렉토리_구조","section_title":"3.1 디렉토리 구조","section_text":"```\nsrc/backtest/v2/\n├── engine/\n│ ├── base.py ← BacktestEngine ABC\n│ ├── nautilus_adapter.py ← Primary (Phase 0)\n│ └── hftbacktest_adapter.py ← Secondary (Phase 1 deferred)\n├── data/\n│ ├── tardis_loader.py ← Tardis.dev flat file 로더\n│ ├── coinapi_loader.py ← CoinAPI 대안\n│ └── forceorder_replay.py ← Binance forceOrder 역사 merge\n├── fill_models/\n│ ├── conservative.py ← 기본 (real trade touch)\n│ ├── queue_aware.py ← hftbacktest 연동용\n│ └── adversarial.py ← stress test 용\n├── universe/\n│ └── as_of.py ← listing/delisting 시점별 재구성\n├── validation/\n│ ├── cpcv.py ← CPCV\n│ ├── deflated_sharpe.py ← DSR\n│ └── pbo.py ← PBO\n└── cli/\n └── run_backtest.py ← CLI 진입점\n```","alpha_id":null,"kill_switch_layer":null,"references":"[]"}
{"doc_id":"backtest-decision","doc_type":"design","version":"v1.0","section_id":"backtest-decision/Backtest_v2_Engine_Decision_2026-04-24/3_Phase_0_스캐폴드_작업_분해/3_2_Phase_0_내_필수_완료_항목","section_title":"3.2 Phase 0 내 필수 완료 항목","section_text":"1. `engine/base.py` + `nautilus_adapter.py` — nautilus_trader 어댑터 첫 동작\n2. `data/tardis_loader.py` — BTC/ETH 2년 tick 로딩 (trade + L2 + funding + forceOrder)\n3. `fill_models/conservative.py` — bar-crossing 완전 삭제, tick-touch 기반 체결\n4. `universe/as_of.py` — survivorship 제거\n5. `validation/deflated_sharpe.py` + `validation/pbo.py` — 최소 2개 검증 지표\n6. `test/backtest/antipattern-guard.test.js` — 8대 안티패턴 CI 차단\n7. 현 v6 런너로 만든 \"127k 승 / 0 패\" 를 v2 로 재실행해서 **실제 결과와 격차 공식 리포트** 작성 → phase-gate-0 증거","alpha_id":null,"kill_switch_layer":null,"references":"[\"engine/base.py\", \"nautilus_adapter.py\", \"data/tardis_loader.py\", \"fill_models/conservative.py\", \"universe/as_of.py\", \"validation/deflated_sharpe.py\", \"validation/pbo.py\", \"test/backtest/antipattern-guard.test.js\"]"}
{"doc_id":"backtest-decision","doc_type":"design","version":"v1.0","section_id":"backtest-decision/Backtest_v2_Engine_Decision_2026-04-24/3_Phase_0_스캐폴드_작업_분해/3_3_Phase_1_이후_deferred_","section_title":"3.3 Phase 1 이후 (deferred)","section_text":"- `hftbacktest_adapter.py` — A1/A6 구현 시점\n- `fill_models/queue_aware.py` — hftbacktest 연동\n- `forceorder_replay.py` — A1 liquidation cascade 백테스트\n- `adversarial.py` — stress scenario 자동화\n\n---","alpha_id":null,"kill_switch_layer":null,"references":"[\"hftbacktest_adapter.py\", \"fill_models/queue_aware.py\", \"forceorder_replay.py\", \"adversarial.py\"]"}
{"doc_id":"backtest-decision","doc_type":"design","version":"v1.0","section_id":"backtest-decision/Backtest_v2_Engine_Decision_2026-04-24/4_데이터_소스_결정","section_title":"4. 데이터 소스 결정","section_text":"| 용도 | Primary | 대안 |\n| --- | --- | --- |\n| Tick (trade + L2 book delta) | **Tardis.dev flat files** | CoinAPI flat files |\n| Funding rate 역사 | **Binance REST `/fapi/v1/fundingRate`** | Tardis.dev (flat file 에 포함) |\n| ForceOrder (liquidation) | **Binance REST `/fapi/v1/allForceOrders`** | Amberdata (보완, 집계 기준) |\n\n**금지 데이터 소스:**\n- Binance REST `/fapi/v1/klines` 의 1m bar — tick-level 재구성 불가, bar-crossing 함정 원인\n\n**비용 고려:**\n- Tardis.dev flat file 은 유료. Phase 0 초기에는 샘플 구간만 구매 → 엔진 검증 통과 후 전체 구매\n- CoinAPI 도 유사 구조. 둘 중 가격/품질 실사 후 결정\n\n---","alpha_id":null,"kill_switch_layer":null,"references":"[]"}
{"doc_id":"backtest-decision","doc_type":"design","version":"v1.0","section_id":"backtest-decision/Backtest_v2_Engine_Decision_2026-04-24/5_성공_기준_phase-gate-0_체크리스트_","section_title":"5. 성공 기준 (phase-gate-0 체크리스트)","section_text":"Phase 0 가 종결되려면 다음이 모두 녹색:\n\n- [ ] `nautilus_adapter.py` 로 BTC 1주일 tick replay 성공\n- [ ] Funding 8h 스케줄 이벤트가 `position_value × funding_rate` 로 PnL 에 정확히 누적\n- [ ] Maker/Taker fee 가 `fees_detail` 에 분리 기록\n- [ ] `fill_models/conservative.py` 에서 `bar_crossing=false` 보증 (CI)\n- [ ] `validation/deflated_sharpe.py` 에서 **DSR 계산 정확도 테스트** (Bailey/Prado 샘플 케이스 일치)\n- [ ] 현 v6 SmartTrend 백테스트를 v2 로 재실행했을 때 **승률이 100% 에서 현실적 범위 (40-60%) 로 붕괴**\n- [ ] 8개 안티패턴 guard 테스트 전체 녹색\n\n현재 \"127k 승 / 0 패\" 결과가 v2 에서 자연스럽게 부서지지 않으면, v2 도 동일 버그를 가진 것이므로 이를 **명시적 진단 도구**로 쓴다.\n\n---","alpha_id":null,"kill_switch_layer":null,"references":"[\"nautilus_adapter.py\", \"fill_models/conservative.py\", \"validation/deflated_sharpe.py\"]"}
{"doc_id":"backtest-decision","doc_type":"design","version":"v1.0","section_id":"backtest-decision/Backtest_v2_Engine_Decision_2026-04-24/6_연관_업데이트","section_title":"6. 연관 업데이트","section_text":"- `INDEX.md` — 본 문서 링크 추가 ✅\n- `ROADMAP.md` Phase 0 — \"backtest v2 엔진 결정\" 항목 체크\n- `.agent/shared-brain/active-tasks.md` — Phase 0 backtest v2 subtask 세분화\n- `research/2026-04-24-external-validation.md` §2 — 본 결정의 원본 근거\n\n---","alpha_id":null,"kill_switch_layer":null,"references":"[\"INDEX.md\", \"ROADMAP.md\", \".agent/shared-brain/active-tasks.md\", \"research/2026-04-24-external-validation.md\"]"}
{"doc_id":"backtest-decision","doc_type":"design","version":"v1.0","section_id":"backtest-decision/Backtest_v2_Engine_Decision_2026-04-24/7_Open_Questions_owner_결정_필요_","section_title":"7. Open Questions (owner 결정 필요)","section_text":"1. **Tardis.dev vs CoinAPI 구매 의사결정** — 예상 월 $50~200. owner 승인.\n2. **hftbacktest 학습 공수 할당** — Rust 빌드 체인 + Python 바인딩. Phase 1 초기 1주 예상.\n3. **Validation harness = mlfinlab 의존 vs 자체 구현** — mlfinlab 은 Apache 2.0 이지만 heavy (pandas 확장). `skfolio.CombinatorialPurgedCV` 사용이 더 가볍다면 그쪽으로.","alpha_id":null,"kill_switch_layer":null,"references":"[]"}
{"doc_id":"kill-switch","doc_type":"risk_layer","version":"v2.0","section_id":"kill-switch/v11_Risk_Engineering_9-Layer_Kill_Switch","section_title":"v11 Risk Engineering — 9-Layer Kill Switch","section_text":"> **근거:** 리스크 리뷰어 감사 (현 코드 [risk-governor.js](../../src/core/risk-governor.js), [risk-policy-engine.js](../../src/core/risk-policy-engine.js), [risk-feed.js](../../src/core/risk-feed.js))\n> **외부 교차검증:** [research/2026-04-24-external-validation.md](research/2026-04-24-external-validation.md) — Knight 2012 · Terra 2022 · FTX · Oct 2025 Hyperliquid $19B 캐스케이드 교훈 반영\n> **목표:** 레버리지 3~5x 운영시 30일 생존확률 95%+, 365일 생존확률 70%+\n> **원칙:** Fail-closed, persistent, cross-asset aware, Kelly-bounded, **ordered-halt** (cancel-all → close → block)\n\n---","alpha_id":null,"kill_switch_layer":null,"references":"[]"}
{"doc_id":"kill-switch","doc_type":"risk_layer","version":"v2.0","section_id":"kill-switch/v11_Risk_Engineering_9-Layer_Kill_Switch/Layer_1_틱별_자동_손절_Hard_SL_at_Exchange_","section_title":"Layer 1 · 틱별 자동 손절 (Hard SL at Exchange)","section_text":"**기능:** 진입과 동시에 거래소에 `STOP_MARKET` 주문 전송. 네트워크 끊김에도 거래소가 실행.","alpha_id":null,"kill_switch_layer":1,"references":"[]"}
{"doc_id":"kill-switch","doc_type":"risk_layer","version":"v2.0","section_id":"kill-switch/v11_Risk_Engineering_9-Layer_Kill_Switch/Layer_1_틱별_자동_손절_Hard_SL_at_Exchange_/현_코드_갭","section_title":"현 코드 갭","section_text":"- [risk-policy-engine.js:46-50](../../src/core/risk-policy-engine.js) — 청산거리 3% 도달시 `EMERGENCY_CLOSE` 플래그만 반환\n- **실제 주문 전송 로직 미확인** → [futures-executor.js](../../src/execution/futures-executor.js)에서 emergency close 경로 검증 필요","alpha_id":null,"kill_switch_layer":null,"references":"[]"}
{"doc_id":"kill-switch","doc_type":"risk_layer","version":"v2.0","section_id":"kill-switch/v11_Risk_Engineering_9-Layer_Kill_Switch/Layer_1_틱별_자동_손절_Hard_SL_at_Exchange_/v11_요구사항","section_title":"v11 요구사항","section_text":"- 모든 포지션 진입 직후 `STOP_MARKET` 주문 자동 생성 (SL 가격 = entry - leverage × risk_pct)\n- 주문 실패시 진입 자체 롤백\n- TP도 동일하게 `TAKE_PROFIT_MARKET` 전송 (bracket order)","alpha_id":null,"kill_switch_layer":null,"references":"[]"}
{"doc_id":"kill-switch","doc_type":"risk_layer","version":"v2.0","section_id":"kill-switch/v11_Risk_Engineering_9-Layer_Kill_Switch/Layer_1_틱별_자동_손절_Hard_SL_at_Exchange_/L1_보강_Order_Rate_Cap_Knight_Capital_2012","section_title":"L1 보강 · Order Rate Cap (Knight Capital 2012 교훈)","section_text":"> **출처:** Knight Capital 2012-08-01 45분간 $460M 손실 — dead code 재활성화 + 8대 서버 중 1대 미배포. SEC Rule 15c3-5 이후 pre-trade rate cap 의무화.\n\n- `max_orders_per_minute = 60` (symbol 전체 합산, 기본값)\n- `max_orders_per_minute_per_symbol = 20`\n- `max_notional_per_minute = 계좌잔고 × 10` (overturn 10 회 이하)\n- 초과 시 **즉시 L2 HALT 전이** — 경고가 아니라 차단\n- `src/core/order-rate-governor.js` 신규 (Phase 0)\n\n---","alpha_id":null,"kill_switch_layer":1,"references":"[\"src/core/order-rate-governor.js\"]"}
{"doc_id":"kill-switch","doc_type":"risk_layer","version":"v2.0","section_id":"kill-switch/v11_Risk_Engineering_9-Layer_Kill_Switch/Layer_2_일일_MaxDD_Halt_24h_Persistent_","section_title":"Layer 2 · 일일 MaxDD Halt (24h Persistent)","section_text":"**기능:** 일 누적손실 5% 도달시 **24시간 모든 신규진입 차단**. 재시작에도 유지.","alpha_id":null,"kill_switch_layer":2,"references":"[]"}
{"doc_id":"kill-switch","doc_type":"risk_layer","version":"v2.0","section_id":"kill-switch/v11_Risk_Engineering_9-Layer_Kill_Switch/Layer_2_일일_MaxDD_Halt_24h_Persistent_/현_코드_갭","section_title":"현 코드 갭","section_text":"- [risk-governor.js:170](../../src/core/risk-governor.js) — `maxDailyLoss=-0.03` 도달시 `HALT` 반환\n- **하지만 `_ladderCooldownBars=5봉` (약 5분)만 적용** → 재진입 가능\n- Supabase persist 없음 → VM 재시작시 초기화","alpha_id":null,"kill_switch_layer":null,"references":"[]"}
{"doc_id":"kill-switch","doc_type":"risk_layer","version":"v2.0","section_id":"kill-switch/v11_Risk_Engineering_9-Layer_Kill_Switch/Layer_2_일일_MaxDD_Halt_24h_Persistent_/v11_요구사항","section_title":"v11 요구사항","section_text":"- Supabase `quant_runtime_leases` 테이블에 `halt_until TIMESTAMPTZ` 컬럼 추가\n- HALT 발동시:\n 1. `halt_until = NOW() + INTERVAL '24 hours'` 설정\n 2. 모든 기존 포지션 `emergencyLiquidateAll()` 호출\n 3. Telegram 알림 + 대시보드 배너\n- VM 재시작시 첫 사이클에서 `halt_until > NOW()` 체크 → 스킵","alpha_id":null,"kill_switch_layer":null,"references":"[]"}
{"doc_id":"kill-switch","doc_type":"risk_layer","version":"v2.0","section_id":"kill-switch/v11_Risk_Engineering_9-Layer_Kill_Switch/Layer_2_일일_MaxDD_Halt_24h_Persistent_/L2_보강_다주기_MaxDD_HALT_순서_명시","section_title":"L2 보강 · 다주기 MaxDD + HALT 순서 명시","section_text":"**다주기 MaxDD (3-tier):**\n- 일 `-5%` → 24h HALT\n- 주 `-12%` → 7일 HALT (rolling 7-day)\n- 월 `-20%` → 30일 HALT (rolling 30-day)\n- 일일 HALT 만 있으면 매일 `-4.9%` 누적으로 월 `-50%` 도달해도 방치됨\n\n**HALT 실행 순서 (race condition 방어):**\n> **출처:** Knight Capital — NYSE 경고 후에도 in-flight 주문이 계속 체결되어 손실 누적. cancel 이 청산보다 먼저 실행되어야 함.\n\n1. **Step 1:** `cancel_all_open_orders(symbol=*)` — 거래소 쪽 모든 open order 즉시 취소\n2. **Step 2:** `verify_no_open_orders()` — 거래소 재조회로 실제 취소 확인 (race-safe)\n3. **Step 3:** `emergency_close_positions(reduce_only=true)` — 포지션 시장가 청산\n4. **Step 4:** `supabase.halt_until = NOW() + tier_duration` — persist\n5. **Step 5:** `block_new_entries = true` — 새 진입 차단\n6. **Step 6:** Telegram / 대시보드 alert\n\n순서가 뒤바뀌면 (예: close 먼저 → cancel 나중) partial fill 상태에서 의도치 않은 포지션 재오픈 가능.\n\n---","alpha_id":null,"kill_switch_layer":2,"references":"[]"}
{"doc_id":"kill-switch","doc_type":"risk_layer","version":"v2.0","section_id":"kill-switch/v11_Risk_Engineering_9-Layer_Kill_Switch/Layer_3_Cross-Asset_Correlation_Kill","section_title":"Layer 3 · Cross-Asset Correlation Kill","section_text":"**기능:** 전 보유 심볼이 5분봉 동시 -3% 하락 → 시장 전체 패닉 감지 → 전면 HALT.","alpha_id":null,"kill_switch_layer":3,"references":"[]"}
{"doc_id":"kill-switch","doc_type":"risk_layer","version":"v2.0","section_id":"kill-switch/v11_Risk_Engineering_9-Layer_Kill_Switch/Layer_3_Cross-Asset_Correlation_Kill/현_코드_갭","section_title":"현 코드 갭","section_text":"- [risk-governor.js](../../src/core/risk-governor.js)의 CVaR는 **단일 자산 PnL 히스토리** 기반\n- cross-asset shock 감지 로직 **전무**\n- 2020-03-13, 2021-05-19 LUNA, 2022-11-08 FTX 시나리오에서 작동 안 함","alpha_id":null,"kill_switch_layer":null,"references":"[]"}
{"doc_id":"kill-switch","doc_type":"risk_layer","version":"v2.0","section_id":"kill-switch/v11_Risk_Engineering_9-Layer_Kill_Switch/Layer_3_Cross-Asset_Correlation_Kill/v11_요구사항_재보정_","section_title":"v11 요구사항 (재보정)","section_text":"> **외부 근거:** 2020-03-13 BTC 1시간 -50%, 2022-05-12 LUNA 분 단위 붕괴, 2025-10-10 Hyperliquid 40분 $19B 캐스케이드 — **`-3%/5분` 기준은 너무 느림**. 이벤트 스터디 결과 실사고는 `-2%/1분` 또는 `-5%/5분` 축에서 먼저 감지됨.\n\n- 신규 모듈 `src/core/correlation-killer.js`\n- 매 사이클마다 보유 심볼 **다주기** 수익률 수집 (1분 + 5분 + 15분)\n- 트리거 조건 (OR):\n - 보유 심볼 중 80%+ 가 **1분봉 -2%** 동시 하락 (flash 감지용)\n - 보유 심볼 중 80%+ 가 **5분봉 -5%** 동시 하락 (Oct 2025 급 캐스케이드)\n - 보유 심볼 중 80%+ 가 **15분봉 -10%** 동시 하락 (2020-03-13 급 매크로 shock)\n- 트리거 시:\n 1. L2 HALT 와 동일한 ordered-halt 절차 실행\n 2. 상관폭발 플래그 기록 (`context.correlation_axis = '1m|5m|15m'`)\n 3. Flash crash tick 데이터 자동 저장 (백테스트 stress scenario 자산)","alpha_id":null,"kill_switch_layer":2,"references":"[\"src/core/correlation-killer.js\"]"}
{"doc_id":"kill-switch","doc_type":"risk_layer","version":"v2.0","section_id":"kill-switch/v11_Risk_Engineering_9-Layer_Kill_Switch/Layer_3_Cross-Asset_Correlation_Kill/L3_보강_Stress_Scenario_재생_검증","section_title":"L3 보강 · Stress Scenario 재생 검증","section_text":"- 2020-03-13 / 2022-05-12 LUNA / 2022-11-08 FTX / **2025-10-10 Hyperliquid** 4개 tick 데이터를 stress test 기본 자산으로 박제\n- 새 임계값은 이 4개 이벤트에서 **최소 1개 이상 탐지** 가 성공해야 CI 통과\n\n---","alpha_id":null,"kill_switch_layer":3,"references":"[]"}
{"doc_id":"kill-switch","doc_type":"risk_layer","version":"v2.0","section_id":"kill-switch/v11_Risk_Engineering_9-Layer_Kill_Switch/Layer_4_WS_Exchange_Fail-Closed","section_title":"Layer 4 · WS/Exchange Fail-Closed","section_text":"**기능:** WebSocket 끊김 / Binance API 오류 / stale data 발생시 **신규 진입 차단 + 기존 포지션 시장가 청산 검토**.","alpha_id":null,"kill_switch_layer":4,"references":"[]"}
{"doc_id":"kill-switch","doc_type":"risk_layer","version":"v2.0","section_id":"kill-switch/v11_Risk_Engineering_9-Layer_Kill_Switch/Layer_4_WS_Exchange_Fail-Closed/현_코드_상태","section_title":"현 코드 상태","section_text":"- [risk-policy-engine.js:82-86](../../src/core/risk-policy-engine.js) — `setOfflineState()` 존재 ✓\n- **하지만 [risk-feed.js:36-39](../../src/core/risk-feed.js) 치명 버그:** `liquidationPrice=0` 반환시 silently `NORMAL` 판정 (fail-open)","alpha_id":null,"kill_switch_layer":null,"references":"[]"}
{"doc_id":"kill-switch","doc_type":"risk_layer","version":"v2.0","section_id":"kill-switch/v11_Risk_Engineering_9-Layer_Kill_Switch/Layer_4_WS_Exchange_Fail-Closed/v11_요구사항","section_title":"v11 요구사항","section_text":"- `liquidationPrice === 0` 또는 `markPrice stale > 10초` → **즉시 OFFLINE** 전환\n- OFFLINE 상태에서:\n - 신규 진입 100% 차단\n - 기존 포지션은 STOP_MARKET 주문이 거래소측에 남아있는지 확인\n - 없으면 시장가 청산 명령 전송 후 OFFLINE 유지\n- WS reconnect 성공 후 3사이클 정상 데이터 확인되면 복귀","alpha_id":null,"kill_switch_layer":null,"references":"[]"}
{"doc_id":"kill-switch","doc_type":"risk_layer","version":"v2.0","section_id":"kill-switch/v11_Risk_Engineering_9-Layer_Kill_Switch/Layer_4_WS_Exchange_Fail-Closed/L4_보강_Supabase_의존성_단일점_제거","section_title":"L4 보강 · Supabase 의존성 단일점 제거","section_text":"> **외부 근거:** Supabase 다운 시 `halt_until` 조회 실패 = fail-open 회귀 가능. FIA Best Practices 2024 에서 \"외부 상태 저장소 단일점 의존 금지\" 명시.\n\n- 로컬 `~/.quant-bot/halt_state.sqlite` mirror 파일 유지\n- 매번 `halt_until` 변경 시 Supabase + 로컬 SQLite 동시 기록\n- Supabase 읽기 실패 시 (timeout 2s, error 3회 연속) **로컬 mirror 로 fallback**\n- 로컬도 실패 시 **fail-closed: 신규 진입 차단** (block-by-default)\n- Supabase 복구 후 로컬 → 원격 reconciliation (최신 `halt_until` 우선)\n\n---","alpha_id":null,"kill_switch_layer":4,"references":"[]"}
{"doc_id":"kill-switch","doc_type":"risk_layer","version":"v2.0","section_id":"kill-switch/v11_Risk_Engineering_9-Layer_Kill_Switch/Layer_5_Flash_Crash_Stress_Scenarios","section_title":"Layer 5 · Flash Crash Stress Scenarios","section_text":"**기능:** 극단 시나리오 (-20%, -50%, -99%) 시뮬레이션을 포지션 진입 직전 실행하여 예상 손실 계산.","alpha_id":null,"kill_switch_layer":5,"references":"[]"}
{"doc_id":"kill-switch","doc_type":"risk_layer","version":"v2.0","section_id":"kill-switch/v11_Risk_Engineering_9-Layer_Kill_Switch/Layer_5_Flash_Crash_Stress_Scenarios/현_코드_갭","section_title":"현 코드 갭","section_text":"- [risk-governor.js:203](../../src/core/risk-governor.js) — 하드코딩 `-0.05, -0.08, -0.10` 3단계만\n- LUNA(-99%) / FTX(-85%) 급 시나리오 **부재**","alpha_id":null,"kill_switch_layer":null,"references":"[]"}
{"doc_id":"kill-switch","doc_type":"risk_layer","version":"v2.0","section_id":"kill-switch/v11_Risk_Engineering_9-Layer_Kill_Switch/Layer_5_Flash_Crash_Stress_Scenarios/v11_요구사항","section_title":"v11 요구사항","section_text":"- 시나리오 확장: `[-0.03, -0.05, -0.10, -0.20, -0.50, -0.99]` (price axis)\n- 진입 직전 각 시나리오별 예상 계좌 손실 계산\n- -50% 시나리오에서 계좌 -30% 초과 예상시 → 진입 차단\n- -99% 시나리오에서 계좌 -50% 초과시 → 전체 레버리지 자동 감축","alpha_id":null,"kill_switch_layer":null,"references":"[]"}
{"doc_id":"kill-switch","doc_type":"risk_layer","version":"v2.0","section_id":"kill-switch/v11_Risk_Engineering_9-Layer_Kill_Switch/Layer_5_Flash_Crash_Stress_Scenarios/L5_보강_Orderbook_Depth_Spread_축_stress_Oc","section_title":"L5 보강 · Orderbook Depth/Spread 축 stress (Oct 2025 교훈)","section_text":"> **외부 근거:** Oct 10-11 2025 Hyperliquid $19B 캐스케이드 — notional 축 impact 뿐 아니라 **spread 1,321x 확대 + depth 98% 증발** 축의 충격이 실질적 taker fill 손실 주범.\n\n- 추가 축: **effective spread** (현재 vs pre-cascade 평균)\n- 추가 축: **book depth at ±0.5%** (현재 vs pre-cascade 평균)\n- stress scenario 벡터를 `(price_drop, spread_mult, depth_fraction)` 3차원으로 확장\n- `(–0.20, 100x, 0.05)` 시나리오 (Oct 2025 재현) 에서 taker 슬리피지가 expected PnL 의 **30% 초과 예상 시 진입 차단**\n- cascade 중에는 maker-only 진입만 허용, taker 진입은 block\n\n---","alpha_id":null,"kill_switch_layer":5,"references":"[]"}
{"doc_id":"kill-switch","doc_type":"risk_layer","version":"v2.0","section_id":"kill-switch/v11_Risk_Engineering_9-Layer_Kill_Switch/Layer_6_MMR_기반_실청산가_모니터","section_title":"Layer 6 · MMR 기반 실청산가 모니터","section_text":"**기능:** Binance의 Maintenance Margin Rate tier를 기반으로 **실제 청산가** 실시간 계산.","alpha_id":null,"kill_switch_layer":6,"references":"[]"}
{"doc_id":"kill-switch","doc_type":"risk_layer","version":"v2.0","section_id":"kill-switch/v11_Risk_Engineering_9-Layer_Kill_Switch/Layer_6_MMR_기반_실청산가_모니터/현_코드_갭","section_title":"현 코드 갭","section_text":"- [risk-feed.js:138](../../src/core/risk-feed.js) — 거래소가 반환한 `liquidationPrice`만 사용\n- MMR tier 경계 계산 **없음**\n- 포지션 증액/감액시 liq price 갱신 지연 가능","alpha_id":null,"kill_switch_layer":null,"references":"[]"}
{"doc_id":"kill-switch","doc_type":"risk_layer","version":"v2.0","section_id":"kill-switch/v11_Risk_Engineering_9-Layer_Kill_Switch/Layer_6_MMR_기반_실청산가_모니터/v11_요구사항","section_title":"v11 요구사항","section_text":"- 신규 모듈 `src/core/mmr-monitor.js`\n- 심볼별 `GET /fapi/v1/leverageBracket` 캐싱 (1시간 TTL)\n- 포지션 변경시 실시간 계산:\n ```\n liq_price = entry_price × (1 - 1/leverage + MMR) / (1 - MMR × side_sign)\n ```\n- ADL (Auto-Deleveraging) 경고: liq_price 근접 +15% 구간 진입시 Telegram 알림","alpha_id":null,"kill_switch_layer":null,"references":"[\"src/core/mmr-monitor.js\"]"}
{"doc_id":"kill-switch","doc_type":"risk_layer","version":"v2.0","section_id":"kill-switch/v11_Risk_Engineering_9-Layer_Kill_Switch/Layer_6_MMR_기반_실청산가_모니터/L6_보강_ADL_Queue_Rank_실시간_모니터_Oct_2025_교훈","section_title":"L6 보강 · ADL Queue Rank 실시간 모니터 (Oct 2025 교훈)","section_text":"> **외부 근거:** Hyperliquid 2025-10-10 — ADL 이 **승리 포지션도 강제 청산**. Binance 도 동일 메커니즘. ADL queue rank 모니터 없으면 A5 델타뉴트럴의 한 다리가 예측 불가하게 사라질 수 있음.\n\n- `GET /fapi/v1/adlQuantile` 를 **심볼별 5분마다** 조회\n- queue rank 4+ (최상위 20% 청산 대상) 진입 시:\n 1. 해당 포지션 **즉시 50% reduce-only 감축**\n 2. Telegram \"ADL-PROXIMITY\" 알림\n 3. queue rank 5 진입 시 **100% reduce-only 청산** (ADL 이 봇을 청산하기 전에 봇이 먼저 청산)\n- 델타뉴트럴 페어 (A5) 에서 한쪽 다리가 ADL 위험 도달 시 **양쪽 다리 동시 언와인딩**\n\n---","alpha_id":null,"kill_switch_layer":6,"references":"[]"}
{"doc_id":"kill-switch","doc_type":"risk_layer","version":"v2.0","section_id":"kill-switch/v11_Risk_Engineering_9-Layer_Kill_Switch/Layer_7_Clock_Drift_Rate_Limit_API_Key_G","section_title":"Layer 7 · Clock Drift + Rate Limit + API Key Guard","section_text":"**기능:** 운영 인프라 레벨 방어.","alpha_id":null,"kill_switch_layer":7,"references":"[]"}
{"doc_id":"kill-switch","doc_type":"risk_layer","version":"v2.0","section_id":"kill-switch/v11_Risk_Engineering_9-Layer_Kill_Switch/Layer_7_Clock_Drift_Rate_Limit_API_Key_G/v11_요구사항/7a_Clock_Drift_Monitor_강화_","section_title":"7a. Clock Drift Monitor (강화)","section_text":"- NTP 동기화 매 10분 확인\n- Binance 서버 `/fapi/v1/time` vs 로컬 시간 차이 > **100ms → 경고** (HFT 기준)\n- > **500ms → 자동 NTP 재동기화 + 사이클 pause**\n- > 2s → Fail-closed, 진입 차단","alpha_id":null,"kill_switch_layer":null,"references":"[]"}
{"doc_id":"kill-switch","doc_type":"risk_layer","version":"v2.0","section_id":"kill-switch/v11_Risk_Engineering_9-Layer_Kill_Switch/Layer_7_Clock_Drift_Rate_Limit_API_Key_G/v11_요구사항/7b_Rate_Limit_Governor","section_title":"7b. Rate Limit Governor","section_text":"- [rate-limit-governor.js](../../src/core/rate-limit-governor.js) 재감사 (현 상태 미검증)\n- `X-MBX-USED-WEIGHT-1M` 헤더 모니터링\n- 80% 도달시 요청 속도 감소 (throttle)\n- 95% 도달시 5분 pause","alpha_id":null,"kill_switch_layer":null,"references":"[]"}
{"doc_id":"kill-switch","doc_type":"risk_layer","version":"v2.0","section_id":"kill-switch/v11_Risk_Engineering_9-Layer_Kill_Switch/Layer_7_Clock_Drift_Rate_Limit_API_Key_G/v11_요구사항/7c_API_Key_Guard","section_title":"7c. API Key Guard","section_text":"- API key가 **READ-ONLY 전용**으로 PAPER 모드에서 동작 보장\n- `FUTURES_TESTNET=true` 또는 `TRADING_MODE=PAPER` 중 하나만 남으면 **LIVE 전환 거부**\n- Supabase `quant_runtime_leases.trading_mode` 컬럼 추가, runtime이 live 모드 요청시 최소 2개 확인 게이트 통과 필요","alpha_id":null,"kill_switch_layer":null,"references":"[]"}
{"doc_id":"kill-switch","doc_type":"risk_layer","version":"v2.0","section_id":"kill-switch/v11_Risk_Engineering_9-Layer_Kill_Switch/Layer_7_Clock_Drift_Rate_Limit_API_Key_G/v11_요구사항/7d_Exchange_Maintenance_Guard_신규_Phase_2","section_title":"7d. Exchange Maintenance Guard (신규, Phase 2)","section_text":"- `GET /sapi/v1/system/status` 를 5분마다 조회\n- Binance 공식 공지 RSS/Twitter 모니터링 (announcement 파이프라인)\n- maintenance window 진입 예정 30분 전 → **신규 진입 차단 + 기존 포지션 점진 언와인딩**\n\n---","alpha_id":null,"kill_switch_layer":null,"references":"[]"}
{"doc_id":"kill-switch","doc_type":"risk_layer","version":"v2.0","section_id":"kill-switch/v11_Risk_Engineering_9-Layer_Kill_Switch/Layer_8_Stablecoin_Depeg_Guard_신규_","section_title":"Layer 8 · Stablecoin Depeg Guard (신규)","section_text":"> **외부 근거:** Terra/Luna 2022-05 UST depeg → $60B 증발. USDC 2023-03-11 SVB 노출 → $0.87 depeg. USDT-margined 포지션 을 보유한 봇은 담보 자체가 녹을 수 있음.\n\n**기능:** USDT/USDC/USDe 의 spot 가격을 실시간 모니터링하여 depeg 발생 시 담보 보호.","alpha_id":null,"kill_switch_layer":8,"references":"[]"}
{"doc_id":"kill-switch","doc_type":"risk_layer","version":"v2.0","section_id":"kill-switch/v11_Risk_Engineering_9-Layer_Kill_Switch/Layer_8_Stablecoin_Depeg_Guard_신규_/v11_요구사항","section_title":"v11 요구사항","section_text":"- `src/core/stablecoin-depeg-guard.js` 신규\n- 5분마다 다음 가격 조회:\n - `USDT/USD` (Kraken 또는 Coinbase)\n - `USDC/USD` (Coinbase)\n - `USDe/USD` (Ethena 공식 NAV)\n- Trigger tiers:\n - **Tier 1 (warning):** deviation > 30bp → Telegram 경고, 신규 A5 (basis harvest) 차단\n - **Tier 2 (reduce):** deviation > 80bp → 전체 포지션 **reduce-only 모드** (new entries block, close-only 허용)\n - **Tier 3 (emergency):** deviation > 150bp → L2 HALT 와 동일한 ordered-halt 절차\n- USDT-margined 계약 기준에서 USDT depeg 은 **담보 손실**이므로 최우선 감지\n\n---","alpha_id":null,"kill_switch_layer":2,"references":"[\"src/core/stablecoin-depeg-guard.js\"]"}
{"doc_id":"kill-switch","doc_type":"risk_layer","version":"v2.0","section_id":"kill-switch/v11_Risk_Engineering_9-Layer_Kill_Switch/Layer_9_Funding_Rate_Spike_Guard_신규_","section_title":"Layer 9 · Funding Rate Spike Guard (신규)","section_text":"> **외부 근거:** 2025-10-10 Hyperliquid 캐스케이드 — 시간당 funding 이 일반 수준의 50x 이상 spike. 극단 funding 은 **liquidity 고갈 신호**이지 mean-reversion 신호가 아님.\n\n**기능:** 시간당 funding 이 비정상적으로 spike 할 때 A3/A5 신규 진입을 일시 차단.","alpha_id":null,"kill_switch_layer":9,"references":"[]"}
{"doc_id":"kill-switch","doc_type":"risk_layer","version":"v2.0","section_id":"kill-switch/v11_Risk_Engineering_9-Layer_Kill_Switch/Layer_9_Funding_Rate_Spike_Guard_신규_/v11_요구사항","section_title":"v11 요구사항","section_text":"- `src/core/funding-spike-guard.js` 신규\n- 심볼별 hourly-equivalent funding 계산 (`current_8h_rate × (1/8)`)\n- Trigger:\n - 시간당 |funding| > 0.5% → **A3 신규 진입 차단** (30분간)\n - 시간당 |funding| > 1.0% → **A3 + A5 모두 차단 + 기존 A5 헤지 점검** (1시간)\n- Cooldown: funding 이 정상 범위 (|f| < 0.05%/h) 로 복귀 후 15분 추가 관망\n\n---","alpha_id":null,"kill_switch_layer":null,"references":"[\"src/core/funding-spike-guard.js\"]"}
{"doc_id":"kill-switch","doc_type":"risk_layer","version":"v2.0","section_id":"kill-switch/v11_Risk_Engineering_9-Layer_Kill_Switch/공통_요구사항_모든_Layer_/Persistent_State","section_title":"Persistent State","section_text":"모든 HALT 상태는 Supabase `quant_runtime_leases`에 영구 기록:\n- `halt_until TIMESTAMPTZ`\n- `halt_reason TEXT`\n- `halt_triggered_by TEXT` (layer 번호)\n- `halt_triggered_at TIMESTAMPTZ`","alpha_id":null,"kill_switch_layer":null,"references":"[]"}
{"doc_id":"kill-switch","doc_type":"risk_layer","version":"v2.0","section_id":"kill-switch/v11_Risk_Engineering_9-Layer_Kill_Switch/공통_요구사항_모든_Layer_/Audit_Trail","section_title":"Audit Trail","section_text":"모든 kill switch 발동은 `quant_killswitch_log` 테이블에 기록:\n```sql\nCREATE TABLE quant_killswitch_log (\n id BIGSERIAL PRIMARY KEY,\n triggered_at TIMESTAMPTZ NOT NULL DEFAULT NOW(),\n layer INT NOT NULL,\n reason TEXT NOT NULL,\n context JSONB,\n positions_closed INT,\n pnl_impact NUMERIC,\n resolved_at TIMESTAMPTZ\n);\n```","alpha_id":null,"kill_switch_layer":null,"references":"[]"}
{"doc_id":"kill-switch","doc_type":"risk_layer","version":"v2.0","section_id":"kill-switch/v11_Risk_Engineering_9-Layer_Kill_Switch/공통_요구사항_모든_Layer_/Testing_Requirements","section_title":"Testing Requirements","section_text":"- 각 Layer별 **단위 테스트** 필수 (`test/killswitch/`)\n- Flash crash 시나리오는 과거 tick 데이터 (tardis) 재생으로 검증\n- Paper 모드에서 30일 연속 돌려서 **false positive < 1%** 확인\n\n---","alpha_id":null,"kill_switch_layer":null,"references":"[]"}
{"doc_id":"kill-switch","doc_type":"risk_layer","version":"v2.0","section_id":"kill-switch/v11_Risk_Engineering_9-Layer_Kill_Switch/구현_우선순위/Phase_-1_완료_2026-04-24_","section_title":"Phase -1 (완료, 2026-04-24)","section_text":"| # | Layer | 상태 |\n|---|---|---|\n| 1 | Layer 4 fail-closed 버그 수정 | ✅ |\n| 2 | Layer 2 persistent halt (Supabase) | ✅ (halt_until / quant_killswitch_log live) |\n| 3 | Layer 1 STOP_MARKET 검증 + 보완 | ✅ |","alpha_id":null,"kill_switch_layer":4,"references":"[]"}
{"doc_id":"kill-switch","doc_type":"risk_layer","version":"v2.0","section_id":"kill-switch/v11_Risk_Engineering_9-Layer_Kill_Switch/구현_우선순위/Phase_0_신규_권고_외부_교차검증_2026-04-24_반영_","section_title":"Phase 0 (신규 권고, 외부 교차검증 2026-04-24 반영)","section_text":"| # | Layer | 우선순위 | 예상 공수 |\n|---|---|---|---|\n| 4 | **L1 보강 Order Rate Cap (Knight 2012)** | 🔴 Critical | 0.5일 |\n| 5 | **L2 보강 HALT 실행 순서 명시 + 다주기 MaxDD** | 🔴 Critical | 0.5일 |\n| 6 | **L3 correlation 임계값 재보정 + 4개 stress tick 박제** | 🔴 Critical | 1.5일 |\n| 7 | **L8 Stablecoin Depeg Guard (신규)** | 🔴 Critical | 1일 |\n| 8 | Layer 6 MMR monitor 신규 구현 | 🟡 High | 2일 |\n| 9 | Layer 5 시나리오 depth/spread 축 확장 | 🟡 High | 1일 |","alpha_id":null,"kill_switch_layer":1,"references":"[]"}
{"doc_id":"kill-switch","doc_type":"risk_layer","version":"v2.0","section_id":"kill-switch/v11_Risk_Engineering_9-Layer_Kill_Switch/구현_우선순위/Phase_1_2-4주_내_","section_title":"Phase 1 (2-4주 내)","section_text":"| # | Layer | 우선순위 | 예상 공수 |\n|---|---|---|---|\n| 10 | **L4 보강 Supabase fallback (SQLite mirror)** | 🟡 High | 1일 |\n| 11 | **L6 보강 ADL Queue Rank monitor** | 🟡 High | 1일 |\n| 12 | **L9 Funding Rate Spike Guard (신규)** | 🟡 High | 1일 |\n| 13 | Layer 7 clock/rate/key guards 강화 | 🔵 Medium | 1일 |","alpha_id":null,"kill_switch_layer":4,"references":"[]"}
{"doc_id":"kill-switch","doc_type":"risk_layer","version":"v2.0","section_id":"kill-switch/v11_Risk_Engineering_9-Layer_Kill_Switch/구현_우선순위/Phase_2_","section_title":"Phase 2+","section_text":"| # | Layer | 우선순위 |\n|---|---|---|\n| 14 | L7d Exchange Maintenance Guard | 🔵 Medium |\n| 15 | HRP-based correlation sizing (Lopez de Prado 2024) | 🔵 Medium |\n\n---","alpha_id":null,"kill_switch_layer":null,"references":"[]"}
{"doc_id":"kill-switch","doc_type":"risk_layer","version":"v2.0","section_id":"kill-switch/v11_Risk_Engineering_9-Layer_Kill_Switch/성공_기준","section_title":"성공 기준","section_text":"- 페이퍼 모드 30일 연속 운영시:\n - False positive HALT < 1%\n - 실제 flash crash 시뮬레이션 (-20% tick 재생) 100% 탐지\n - Kill switch 발동 후 포지션 정리 완료까지 < 60초\n- 라이브 전환 전제조건:\n - **9개 Layer** 모두 녹색 (Phase 0 + Phase 1 대부분 항목 포함)\n - Audit trail 완비\n - Telegram + 대시보드 alert 라우팅 검증\n - 4개 과거 crash tick 재생 (2020-03-13 / 2022-05-12 LUNA / 2022-11-08 FTX / **2025-10-10 Hyperliquid**) 에서 L3 correlation killer 가 최소 1개 이상 탐지 통과\n\n---","alpha_id":null,"kill_switch_layer":3,"references":"[]"}
{"doc_id":"kill-switch","doc_type":"risk_layer","version":"v2.0","section_id":"kill-switch/v11_Risk_Engineering_9-Layer_Kill_Switch/2026-04-24_외부_교차검증_반영_요약","section_title":"2026-04-24 외부 교차검증 반영 요약","section_text":"이 문서는 2026-04-24 외부 공개 실사고·논문·오픈소스 병렬 리서치 결과를 반영해 `7-Layer → 9-Layer` 로 확장됨. 근거 문서: [research/2026-04-24-external-validation.md](research/2026-04-24-external-validation.md)","alpha_id":null,"kill_switch_layer":null,"references":"[]"}
{"doc_id":"kill-switch","doc_type":"risk_layer","version":"v2.0","section_id":"kill-switch/v11_Risk_Engineering_9-Layer_Kill_Switch/2026-04-24_외부_교차검증_반영_요약/주요_변경","section_title":"주요 변경","section_text":"- **신규 Layer 2종**: L8 Stablecoin Depeg Guard, L9 Funding Rate Spike Guard\n- **보강 항목 6종**: L1 Order Rate Cap, L2 HALT 실행 순서 + 다주기 MaxDD, L3 임계값 재보정, L4 Supabase fallback, L5 depth/spread 축, L6 ADL Queue Rank\n- **Stress scenario 확장**: 4개 과거 crash tick 을 재생 자산으로 박제, 특히 Oct 10-11 2025 Hyperliquid $19B 캐스케이드를 기본 stress 기준","alpha_id":null,"kill_switch_layer":8,"references":"[]"}
{"doc_id":"kill-switch","doc_type":"risk_layer","version":"v2.0","section_id":"kill-switch/v11_Risk_Engineering_9-Layer_Kill_Switch/2026-04-24_외부_교차검증_반영_요약/외부_근거_핵심","section_title":"외부 근거 핵심","section_text":"| 사고 | 연도 | 반영 Layer |\n| --- | --- | --- |\n| Knight Capital | 2012 | L1 Order Rate Cap + L2 HALT 순서 |\n| Terra/Luna UST depeg | 2022-05 | L8 Stablecoin Depeg Guard |\n| USDC SVB depeg | 2023-03 | L8 Stablecoin Depeg Guard |\n| Hyperliquid Oct 10-11 | 2025-10 | L3 재보정 + L5 depth/spread 축 + L6 ADL Queue Rank + L9 Funding Spike |","alpha_id":null,"kill_switch_layer":8,"references":"[]"}
{"doc_id":"kill-switch","doc_type":"risk_layer","version":"v2.0","section_id":"kill-switch/v11_Risk_Engineering_9-Layer_Kill_Switch/2026-04-24_외부_교차검증_반영_요약/미반영_defer_","section_title":"미반영 (defer)","section_text":"- 거래소 solvency 모니터 (FTX 2022 교훈) — CEX 봇에서 실시간 측정 어렵고, v11 은 Binance 단일 거래소 전제\n- Oracle manipulation (Mango 2022) — DEX/오라클 기반 전략 부재\n- Smart contract 감사 (Euler 2023) — DeFi 미진입","alpha_id":null,"kill_switch_layer":null,"references":"[]"}
{"doc_id":"roadmap","doc_type":"roadmap","version":"v0.2","section_id":"roadmap/v11_Ensemble_Roadmap","section_title":"v11 Ensemble — Roadmap","section_text":"> **총 기간:** 6~8주 (Phase -1 ~ Phase 2)\n> **전제:** 현재 잔고 ~$29 (사용자 자금 출금 후), VM `quant-bot` 라이브 운영 중단 필요\n> **원칙:** 각 Phase 통과 게이트 충족 전 다음 단계 진입 금지\n\n---","alpha_id":null,"kill_switch_layer":null,"references":"[]"}
{"doc_id":"roadmap","doc_type":"roadmap","version":"v0.2","section_id":"roadmap/v11_Ensemble_Roadmap/Phase_-1_지혈_관측복구_1주_","section_title":"Phase -1 · 지혈 + 관측복구 (1주)","section_text":"**목표:** 추가 손실 중단, 진단 가능 상태로 복귀, Critical 리스크 버그 7개 수정","alpha_id":null,"kill_switch_layer":null,"references":"[]"}
{"doc_id":"roadmap","doc_type":"roadmap","version":"v0.2","section_id":"roadmap/v11_Ensemble_Roadmap/Phase_-1_지혈_관측복구_1주_/Task_-1_1_VM_페이퍼_모드_강제_전환_0_5일_","section_title":"Task -1.1 · VM 페이퍼 모드 강제 전환 (0.5일)","section_text":"- [ ] VM `quant-bot` .env: `TRADING_MODE=PAPER` + `FUTURES_TESTNET=true`\n- [ ] PM2 재시작 + 라이브 포지션 전부 시장가 청산\n- [ ] Supabase `quant_runtime_leases.trading_mode='PAPER'` 강제\n- [ ] Telegram 알림으로 전환 완료 확인","alpha_id":null,"kill_switch_layer":null,"references":"[]"}
{"doc_id":"roadmap","doc_type":"roadmap","version":"v0.2","section_id":"roadmap/v11_Ensemble_Roadmap/Phase_-1_지혈_관측복구_1주_/Task_-1_2_Critical_버그_수정_2일_","section_title":"Task -1.2 · Critical 버그 수정 (2일)","section_text":"- [ ] [risk-policy-engine.js:37-39](../../src/core/risk-policy-engine.js) fail-open → fail-closed\n- [ ] [risk-governor.js:75](../../src/core/risk-governor.js) HALT시 `emergencyLiquidateAll()` 호출\n- [ ] [risk-governor.js:196-197](../../src/core/risk-governor.js) CVaR 콜드스타트 보수화\n- [ ] [risk-governor.js:207](../../src/core/risk-governor.js) 노출 계산을 notional 기반으로\n- [ ] Supabase 마이그레이션: `halt_until`, `halt_reason`, `trading_mode`, `quant_killswitch_log` 테이블\n- [ ] Layer 2 persistent halt 구현","alpha_id":null,"kill_switch_layer":null,"references":"[]"}
{"doc_id":"roadmap","doc_type":"roadmap","version":"v0.2","section_id":"roadmap/v11_Ensemble_Roadmap/Phase_-1_지혈_관측복구_1주_/Task_-1_3_관측_복구_2일_","section_title":"Task -1.3 · 관측 복구 (2일)","section_text":"- [ ] `updateMaeMfe` 호출 경로 재설계 — 서버사이드 TP/SL 사용시에도 호출\n- [ ] 전 거래 entry_tick / exit_tick 저장\n- [ ] Funding PnL 집계 (매 펀딩 시점마다 Supabase 기록)\n- [ ] Grid inventory 장부 연동 (제거 전 잔존 포지션 정리)\n- [ ] Maker vs Taker 수수료 분리 집계","alpha_id":null,"kill_switch_layer":null,"references":"[]"}
{"doc_id":"roadmap","doc_type":"roadmap","version":"v0.2","section_id":"roadmap/v11_Ensemble_Roadmap/Phase_-1_지혈_관측복구_1주_/Task_-1_4_레거시_코드_격리_1일_","section_title":"Task -1.4 · 레거시 코드 격리 (1일)","section_text":"- [ ] [src/engines/grid-order-manager.js](../../src/engines/grid-order-manager.js) 호출 경로 차단\n- [ ] [src/engines/smart-trend-engine.js](../../src/engines/smart-trend-engine.js) orchestrator에서 제거\n- [ ] [src/engines/funding-harvest-manager.js](../../src/engines/funding-harvest-manager.js) A5로 재목적화 표시\n- [ ] 9 에이전트 중 meanRevert만 활성, 나머지 8개 비활성 플래그\n- [ ] `backtest-*.json` 12개 `archive/backtest-fantasy/`로 이미 이동 완료","alpha_id":null,"kill_switch_layer":null,"references":"[\"backtest-*.json\"]"}
{"doc_id":"roadmap","doc_type":"roadmap","version":"v0.2","section_id":"roadmap/v11_Ensemble_Roadmap/Phase_-1_지혈_관측복구_1주_/Task_-1_5_VM_Tokyo_이전_0_5일_","section_title":"Task -1.5 · VM Tokyo 이전 (0.5일)","section_text":"- [ ] GCP 신규 VM `quant-bot-tokyo` (ap-northeast-1, e2-medium)\n- [ ] 기존 VM SSH key / .env / systemd 복사\n- [ ] Supabase lease 이전 후 구 VM 중지\n- [ ] Binance API whitelist 신 VM IP 등록\n- [ ] RTT 측정: 15ms → 3ms 확인","alpha_id":null,"kill_switch_layer":null,"references":"[]"}
{"doc_id":"roadmap","doc_type":"roadmap","version":"v0.2","section_id":"roadmap/v11_Ensemble_Roadmap/Phase_-1_지혈_관측복구_1주_/Phase_-1_통과_게이트","section_title":"Phase -1 통과 게이트","section_text":"- [ ] 실거래 중단, 페이퍼 모드 운영\n- [ ] MAE/MFE 비-0 값 기록 시작 확인\n- [ ] Critical 리스크 버그 7개 녹색\n- [ ] Tokyo VM RTT < 5ms\n- [ ] `docs/v11-ensemble/` 전체 문서 완비\n\n---","alpha_id":null,"kill_switch_layer":null,"references":"[]"}
{"doc_id":"roadmap","doc_type":"roadmap","version":"v0.2","section_id":"roadmap/v11_Ensemble_Roadmap/Phase_0_인프라_대수술_1주_","section_title":"Phase 0 · 인프라 대수술 (1주)","section_text":"**목표:** v11 앙상블을 돌릴 수 있는 기반 구축","alpha_id":null,"kill_switch_layer":null,"references":"[]"}
{"doc_id":"roadmap","doc_type":"roadmap","version":"v0.2","section_id":"roadmap/v11_Ensemble_Roadmap/Phase_0_인프라_대수술_1주_/Task_0_1_Liquidation_Stream_2일_","section_title":"Task 0.1 · Liquidation Stream (2일)","section_text":"- [ ] 신규 `src/core/liquidation-stream.js`\n- [ ] Binance WS `!forceOrder@arr` 구독\n- [ ] 5분 rolling window cluster 감지\n- [ ] Supabase `quant_liquidation_events` 테이블에 누적\n- [ ] 대시보드에 실시간 heatmap","alpha_id":null,"kill_switch_layer":null,"references":"[\"src/core/liquidation-stream.js\"]"}
{"doc_id":"roadmap","doc_type":"roadmap","version":"v0.2","section_id":"roadmap/v11_Ensemble_Roadmap/Phase_0_인프라_대수술_1주_/Task_0_2_cryptofeed_통합_1일_","section_title":"Task 0.2 · cryptofeed 통합 (1일)","section_text":"- [ ] Python 서브시스템 추가 (선택: Node.js 자체 구현)\n- [ ] 다중 거래소 liquidation + funding 통합 수집\n- [ ] Redis pub/sub로 Node.js 메인 프로세스 전달","alpha_id":null,"kill_switch_layer":null,"references":"[]"}
{"doc_id":"roadmap","doc_type":"roadmap","version":"v0.2","section_id":"roadmap/v11_Ensemble_Roadmap/Phase_0_인프라_대수술_1주_/Task_0_3_Backtest_v2_3일_","section_title":"Task 0.3 · Backtest v2 (3일)","section_text":"> **엔진 결정:** [backtest-v2-engine-decision.md](backtest-v2-engine-decision.md) — nautilus_trader primary, hftbacktest (A1/A6) 는 Phase 1 deferred\n> **외부 근거:** [research/2026-04-24-external-validation.md](research/2026-04-24-external-validation.md) §2\n\n- [ ] 신규 `src/backtest/v2/` 디렉토리 (scaffold 7 항목)\n - [ ] `engine/base.py` + `engine/nautilus_adapter.py`\n - [ ] `data/tardis_loader.py` (trade + L2 + funding + forceOrder)\n - [ ] `fill_models/conservative.py` — **bar-crossing 완전 삭제, tick-touch 기반**\n - [ ] `universe/as_of.py` — survivorship 제거\n - [ ] `validation/deflated_sharpe.py` + `validation/pbo.py`\n - [ ] `test/backtest/antipattern-guard.test.js` — 8대 안티패턴 CI 차단\n - [ ] 현 v6 SmartTrend \"127k 승 / 0 패\" 를 v2 에서 재실행 → **승률 40-60% 로 붕괴** 확인 공식 리포트\n- [ ] `vectorbt pro` 는 파라미터 스윕 보조 (체결 시뮬은 사용 금지)\n- [ ] `hftbacktest` 는 Phase 1 A1/A6 구현 시점에 통합 (Phase 0 에서 미포함)","alpha_id":null,"kill_switch_layer":null,"references":"[\"engine/base.py\", \"engine/nautilus_adapter.py\", \"data/tardis_loader.py\", \"fill_models/conservative.py\", \"universe/as_of.py\", \"validation/deflated_sharpe.py\", \"validation/pbo.py\", \"test/backtest/antipattern-guard.test.js\"]"}
{"doc_id":"roadmap","doc_type":"roadmap","version":"v0.2","section_id":"roadmap/v11_Ensemble_Roadmap/Phase_0_인프라_대수술_1주_/Task_0_4_MMR_Monitor_Correlation_Killer_","section_title":"Task 0.4 · MMR Monitor + Correlation Killer (2일)","section_text":"- [ ] 신규 `src/core/mmr-monitor.js` (Layer 6)\n- [ ] 신규 `src/core/correlation-killer.js` (Layer 3) — **임계값 재보정: `-2%/1분 OR -5%/5분 OR -10%/15분`** ([RISK_KILLSWITCH.md](RISK_KILLSWITCH.md) L3 참조)\n- [ ] 둘 다 단위 테스트 + paper 모드 false positive 체크\n- [ ] 4개 과거 crash tick (2020-03-13 / 2022-05-12 LUNA / 2022-11-08 FTX / 2025-10-10 Hyperliquid) 재생 테스트","alpha_id":null,"kill_switch_layer":null,"references":"[\"src/core/mmr-monitor.js\", \"src/core/correlation-killer.js\"]"}
{"doc_id":"roadmap","doc_type":"roadmap","version":"v0.2","section_id":"roadmap/v11_Ensemble_Roadmap/Phase_0_인프라_대수술_1주_/Task_0_5_Kill_Switch_신규_보강_2일_외부_교차검증_반영","section_title":"Task 0.5 · Kill Switch 신규/보강 (2일, 외부 교차검증 반영)","section_text":"> **근거:** [research/2026-04-24-external-validation.md](research/2026-04-24-external-validation.md) §5 + [RISK_KILLSWITCH.md](RISK_KILLSWITCH.md) `2026-04-24 외부 교차검증 반영 요약` 섹션\n\n- [ ] **L1 보강:** `src/core/order-rate-governor.js` (Knight Capital 2012 교훈)\n- [ ] **L2 보강:** HALT 실행 순서 명시 (cancel-all → close → block) + 다주기 MaxDD (일 -5% / 주 -12% / 월 -20%)\n- [ ] **L8 신규:** `src/core/stablecoin-depeg-guard.js` (Terra/USDC 교훈)\n- [ ] **L5 보강:** stress scenario 를 price/spread/depth 3축으로 확장\n- [ ] 단위 테스트 + phase-gate-0 체크리스트 갱신","alpha_id":null,"kill_switch_layer":null,"references":"[\"src/core/order-rate-governor.js\", \"src/core/stablecoin-depeg-guard.js\"]"}
{"doc_id":"roadmap","doc_type":"roadmap","version":"v0.2","section_id":"roadmap/v11_Ensemble_Roadmap/Phase_0_인프라_대수술_1주_/Phase_0_통과_게이트","section_title":"Phase 0 통과 게이트","section_text":"- [ ] Backtest v2로 BTC 2년 재실행 시 현실적 샤프 (0.5~1.5 범위)\n- [ ] **현 v6 백테스트 \"127k 승 / 0 패\" 가 v2 에서 40-60% 승률로 붕괴** (공식 비교 리포트)\n- [ ] Liquidation stream 실시간 작동 (일 100+ 이벤트 수집)\n- [ ] **9 Kill Switch Layer** 모두 단위 테스트 통과 (L1-L7 + L8 depeg + L9 funding spike 는 Phase 1 으로 defer 가능)\n- [ ] 4개 과거 crash tick 재생 stress test 에서 L3 correlation killer 최소 1개 이상 탐지\n- [ ] Deflated Sharpe < 0 인 알파는 라이브 승격 자동 차단 (CI)\n\n---","alpha_id":null,"kill_switch_layer":null,"references":"[]"}
{"doc_id":"roadmap","doc_type":"roadmap","version":"v0.2","section_id":"roadmap/v11_Ensemble_Roadmap/Phase_1_알파_개별_Shadow_증명_2주_","section_title":"Phase 1 · 알파 개별 Shadow 증명 (2주)","section_text":"**목표:** 6개 알파 중 edge 증명된 것만 Phase 2 진출","alpha_id":null,"kill_switch_layer":null,"references":"[]"}
{"doc_id":"roadmap","doc_type":"roadmap","version":"v0.2","section_id":"roadmap/v11_Ensemble_Roadmap/Phase_1_알파_개별_Shadow_증명_2주_/Task_1_1_A1_Liquidation_Cascade_Hunter_3","section_title":"Task 1.1 · A1 Liquidation Cascade Hunter (3일 구현 + 2주 shadow)","section_text":"- [ ] 신규 `src/agents/liquidation-hunter-agent.js`\n- [ ] Shadow 2주 (통과 기준: Sharpe > 1.2, t-test p < 0.05, 최소 20 trades)","alpha_id":null,"kill_switch_layer":null,"references":"[\"src/agents/liquidation-hunter-agent.js\"]"}
{"doc_id":"roadmap","doc_type":"roadmap","version":"v0.2","section_id":"roadmap/v11_Ensemble_Roadmap/Phase_1_알파_개별_Shadow_증명_2주_/Task_1_2_A2_Mean_Reversion_OU_2일_2주_","section_title":"Task 1.2 · A2 Mean Reversion OU (2일 + 2주)","section_text":"- [ ] 기존 [mean-revert-agent.js](../../src/agents/mean-revert-agent.js) 재구현\n- [ ] OU half-life 동적 추정\n- [ ] 1~5분봉 스캘핑","alpha_id":null,"kill_switch_layer":null,"references":"[]"}
{"doc_id":"roadmap","doc_type":"roadmap","version":"v0.2","section_id":"roadmap/v11_Ensemble_Roadmap/Phase_1_알파_개별_Shadow_증명_2주_/Task_1_3_A3_Extreme_Funding_Reverse_2일_2","section_title":"Task 1.3 · A3 Extreme Funding Reverse (2일 + 2주)","section_text":"- [ ] 신규 `src/agents/extreme-funding-agent.js`\n- [ ] 펀딩 > +0.1% / < -0.08% 트리거\n- [ ] OI + basis 확산 confirmation","alpha_id":null,"kill_switch_layer":null,"references":"[\"src/agents/extreme-funding-agent.js\"]"}
{"doc_id":"roadmap","doc_type":"roadmap","version":"v0.2","section_id":"roadmap/v11_Ensemble_Roadmap/Phase_1_알파_개별_Shadow_증명_2주_/Task_1_4_A4_Macro_Event_Bracket_2일_2주_대기","section_title":"Task 1.4 · A4 Macro Event Bracket (2일 + 2주 대기)","section_text":"- [ ] 신규 `src/agents/macro-event-agent.js`\n- [ ] ForexFactory API 연결\n- [ ] CPI/FOMC T-5min ~ T+15min 윈도우","alpha_id":null,"kill_switch_layer":null,"references":"[\"src/agents/macro-event-agent.js\"]"}
{"doc_id":"roadmap","doc_type":"roadmap","version":"v0.2","section_id":"roadmap/v11_Ensemble_Roadmap/Phase_1_알파_개별_Shadow_증명_2주_/Task_1_5_A5_Funding_Basis_Harvest_2일_2주_","section_title":"Task 1.5 · A5 Funding+Basis Harvest (2일 + 2주)","section_text":"- [ ] 기존 [funding-harvest-manager.js](../../src/engines/funding-harvest-manager.js) 재활용\n- [ ] Spot 연결 (Binance spot API)\n- [ ] 델타중립 자동 rebalance","alpha_id":null,"kill_switch_layer":null,"references":"[]"}
{"doc_id":"roadmap","doc_type":"roadmap","version":"v0.2","section_id":"roadmap/v11_Ensemble_Roadmap/Phase_1_알파_개별_Shadow_증명_2주_/Task_1_6_A6_Alt_Market_Making_3일_2주_","section_title":"Task 1.6 · A6 Alt Market Making (3일 + 2주)","section_text":"- [ ] 신규 `src/engines/alt-mm-engine.js`\n- [ ] Hummingbot 브릿지 또는 자체 구현\n- [ ] LINK/SUI/APT 3심볼","alpha_id":null,"kill_switch_layer":null,"references":"[\"src/engines/alt-mm-engine.js\"]"}
{"doc_id":"roadmap","doc_type":"roadmap","version":"v0.2","section_id":"roadmap/v11_Ensemble_Roadmap/Phase_1_알파_개별_Shadow_증명_2주_/Phase_1_통과_게이트_알파별_","section_title":"Phase 1 통과 게이트 (알파별)","section_text":"- Sharpe > 1.2 (2주 페이퍼 기준)\n- 최소 20 trades\n- t-test p < 0.05\n- MaxDD < 15%\n- **통과 알파만** Phase 2로 진출 (6개 중 3~5개 살아남으면 OK)\n\n---","alpha_id":null,"kill_switch_layer":null,"references":"[]"}
{"doc_id":"roadmap","doc_type":"roadmap","version":"v0.2","section_id":"roadmap/v11_Ensemble_Roadmap/Phase_2_소액_라이브_2주_","section_title":"Phase 2 · 소액 라이브 (2주)","section_text":"**목표:** 통과 알파만 묶어서 $100~$500 실거래, 일 0.5% 달성 검증","alpha_id":null,"kill_switch_layer":null,"references":"[]"}
{"doc_id":"roadmap","doc_type":"roadmap","version":"v0.2","section_id":"roadmap/v11_Ensemble_Roadmap/Phase_2_소액_라이브_2주_/Task_2_1_자본_확보_선결_","section_title":"Task 2.1 · 자본 확보 (선결)","section_text":"- [ ] 현재 잔고 $29 → $100 이상 입금 (사용자)\n- [ ] 레버리지 3x 하드캡으로 설정","alpha_id":null,"kill_switch_layer":null,"references":"[]"}
{"doc_id":"roadmap","doc_type":"roadmap","version":"v0.2","section_id":"roadmap/v11_Ensemble_Roadmap/Phase_2_소액_라이브_2주_/Task_2_2_Live_통합_3일_","section_title":"Task 2.2 · Live 통합 (3일)","section_text":"- [ ] 통과 알파 orchestrator에 편입\n- [ ] 자본 배분: 통과 알파 수에 따라 재배분\n- [ ] 모든 킬스위치 7 Layer 라이브 활성","alpha_id":null,"kill_switch_layer":null,"references":"[]"}
{"doc_id":"roadmap","doc_type":"roadmap","version":"v0.2","section_id":"roadmap/v11_Ensemble_Roadmap/Phase_2_소액_라이브_2주_/Task_2_3_2주_운영_튜닝","section_title":"Task 2.3 · 2주 운영 + 튜닝","section_text":"- [ ] 매일 shadow vs live 괴리 리뷰\n- [ ] 알파별 실제 Sharpe 추적\n- [ ] False positive HALT < 1% 유지","alpha_id":null,"kill_switch_layer":null,"references":"[]"}
{"doc_id":"roadmap","doc_type":"roadmap","version":"v0.2","section_id":"roadmap/v11_Ensemble_Roadmap/Phase_2_소액_라이브_2주_/Phase_2_통과_게이트","section_title":"Phase 2 통과 게이트","section_text":"- [ ] 실 2주 누적 수익 +5%+ (일평균 0.35%+)\n- [ ] MaxDD < 15%\n- [ ] 실제 Sharpe > 1.5\n- [ ] Kill switch 거짓 양성 없음\n\n---","alpha_id":null,"kill_switch_layer":null,"references":"[]"}
{"doc_id":"roadmap","doc_type":"roadmap","version":"v0.2","section_id":"roadmap/v11_Ensemble_Roadmap/Phase_3_자본_증액_단계적_상향_진화형_","section_title":"Phase 3 · 자본 증액 + 단계적 상향 (진화형)","section_text":"**목표:** 통계적 유의성 축적하면서 점진적 상향","alpha_id":null,"kill_switch_layer":null,"references":"[]"}
{"doc_id":"roadmap","doc_type":"roadmap","version":"v0.2","section_id":"roadmap/v11_Ensemble_Roadmap/Phase_3_자본_증액_단계적_상향_진화형_/단계별_Gate","section_title":"단계별 Gate","section_text":"| 단계 | 달성 조건 | 다음 허용 |\n|---|---|---|\n| 3.1 | 실 30일 Sharpe > 2.0 | 레버리지 5x 허용 |\n| 3.2 | 실 60일 Sharpe > 2.5, MaxDD < 15% | 자본 $1K 이상 |\n| 3.3 | 실 90일 누적 +50%+ | CEX-DEX (Hyperliquid) 추가 |\n| 3.4 | 실 180일 누적 +200%+ | 레버리지 상한 재검토 |","alpha_id":null,"kill_switch_layer":null,"references":"[]"}
{"doc_id":"roadmap","doc_type":"roadmap","version":"v0.2","section_id":"roadmap/v11_Ensemble_Roadmap/Phase_3_자본_증액_단계적_상향_진화형_/각_Gate_실패시","section_title":"각 Gate 실패시","section_text":"- 즉시 페이퍼 모드 복귀\n- 원인 분석 (어떤 알파가 망가졌나)\n- 해당 알파 shadow로 복귀\n- 나머지 알파만 라이브 재개\n\n---","alpha_id":null,"kill_switch_layer":null,"references":"[]"}
{"doc_id":"roadmap","doc_type":"roadmap","version":"v0.2","section_id":"roadmap/v11_Ensemble_Roadmap/예상_타임라인_누적_","section_title":"예상 타임라인 (누적)","section_text":"| 주차 | 상태 | 예상 잔고 | 일 평균 목표 |\n|---|---|---|---|\n| W1 | Phase -1 (페이퍼) | $29 | 0% (지혈) |\n| W2 | Phase 0 (인프라) | $29 | 0% |\n| W3-4 | Phase 1 (shadow) | $29 + 입금 | 0% (페이퍼만) |\n| W5-6 | Phase 2 (라이브 소액) | $100 → $110 | 0.35% |\n| W7-12 | Phase 3.1 (상향) | $110 → $300 | 0.5% |\n| W13-24 | Phase 3.2 (증액) | $300 → $1500 | 0.6% |\n| W25-52 | Phase 3.3+ (규모화) | $1500 → $10K+ | 0.6~0.8% |\n\n**1년차 현실 목표: 연 500~1000% (상위분위 달성)**\n**1년차 실패 시나리오: 연 -30~+50% (중위분위)**\n**최악 시나리오: Phase 2에서 edge 증명 실패 → venue 전환 (현물+펀딩캐리) 재설계**\n\n---","alpha_id":null,"kill_switch_layer":null,"references":"[]"}
{"doc_id":"roadmap","doc_type":"roadmap","version":"v0.2","section_id":"roadmap/v11_Ensemble_Roadmap/결정_트리","section_title":"결정 트리","section_text":"```\nPhase -1 완료?\n├── YES → Phase 0 진입\n└── NO → 원인 분석, 문서 갱신, 재시도\n\nPhase 0 backtest v2에서 현실적 샤프 나왔나?\n├── YES → Phase 1 진입\n└── NO → 알파 재검토 (어떤 알파의 edge가 허구였나)\n\nPhase 1에서 알파 몇 개 통과?\n├── 3개+ → Phase 2 진입 (통과한 것만)\n├── 1~2개 → Phase 2 진입하되 목표 하향 (일 0.2%)\n└── 0개 → 전면 재설계, venue 전환 검토\n\nPhase 2에서 일 0.35%+ 달성?\n├── YES → Phase 3 진입\n└── NO → Phase 1 복귀, 실패 알파 드롭\n```\n\n---","alpha_id":null,"kill_switch_layer":null,"references":"[]"}
{"doc_id":"roadmap","doc_type":"roadmap","version":"v0.2","section_id":"roadmap/v11_Ensemble_Roadmap/커뮤니케이션_규칙","section_title":"커뮤니케이션 규칙","section_text":"- **일일 보고:** 텔레그램 자동 보고 (PnL, Sharpe, 알파별 기여도)\n- **주간 리뷰:** `docs/v11-ensemble/weekly-review-YYYY-WW.md` 작성\n- **Phase 전환:** 통과 게이트 체크리스트 `docs/v11-ensemble/phase-gate-Nx.md`\n- **장애 리포트:** Kill switch 발동시 즉시 `docs/v11-ensemble/incidents/YYYY-MM-DD.md`","alpha_id":null,"kill_switch_layer":null,"references":"[\"docs/v11-ensemble/weekly-review-YYYY-WW.md\", \"docs/v11-ensemble/phase-gate-Nx.md\", \"docs/v11-ensemble/incidents/YYYY-MM-DD.md\"]"}
{"doc_id":"alpha-A1","doc_type":"alpha_spec","version":"v0.1","section_id":"alpha-A1/A1_Liquidation_Cascade_Reverse_Primary_A","section_title":"A1 · Liquidation Cascade Reverse (Primary Alpha)","section_text":"> **기대 기여:** 일 0.4~0.6% (앙상블에서 최대 기여 알파)\n> **승률:** 58% (과거 청산 sweep reversion 데이터 기준)\n> **Sharpe:** 1.5~2.0\n> **우선순위:** ⭐⭐⭐⭐⭐ (Phase 1 최우선 구현)\n\n---","alpha_id":"A1","kill_switch_layer":null,"references":"[]"}
{"doc_id":"alpha-A1","doc_type":"alpha_spec","version":"v0.1","section_id":"alpha-A1/A1_Liquidation_Cascade_Reverse_Primary_A/이론_배경/시장_구조","section_title":"시장 구조","section_text":"대형 청산(long liquidation cascade) 발생시:\n1. **Phase 1 (0~30초):** 연쇄 청산으로 가격 1~3% overshoot\n2. **Phase 2 (30초~5분):** 청산 종료 후 매수세 유입, 평균 0.8~2.5% mean revert\n3. **Phase 3 (5분~1시간):** 정상 추세 복귀\n\nA1은 **Phase 2 진입하여 Phase 1의 역방향 포지션** 구축.","alpha_id":"A1","kill_switch_layer":null,"references":"[]"}
{"doc_id":"alpha-A1","doc_type":"alpha_spec","version":"v0.1","section_id":"alpha-A1/A1_Liquidation_Cascade_Reverse_Primary_A/이론_배경/학술_근거","section_title":"학술 근거","section_text":"- Lehar & Parlour (2024) — crypto perpetual liquidation 연구\n- Hyblock Capital 2024 리서치 — liq cluster sweep 후 0.8~2.5% 리바운드 평균\n- Coinalyze 2024 데이터 — BTC $50M+ 청산 후 3분 내 평균 mean revert 확률 62%\n\n---","alpha_id":"A1","kill_switch_layer":null,"references":"[]"}
{"doc_id":"alpha-A1","doc_type":"alpha_spec","version":"v0.1","section_id":"alpha-A1/A1_Liquidation_Cascade_Reverse_Primary_A/진입_로직/데이터_소스","section_title":"데이터 소스","section_text":"- **실시간 청산:** Binance WS `!forceOrder@arr` (무료, <100ms)\n- **심볼별 집계:** 5분 rolling window\n- **청산 클러스터:** Coinglass heatmap 사전 매핑 (선택, free tier)","alpha_id":"A1","kill_switch_layer":null,"references":"[]"}
{"doc_id":"alpha-A1","doc_type":"alpha_spec","version":"v0.1","section_id":"alpha-A1/A1_Liquidation_Cascade_Reverse_Primary_A/진입_로직/Entry_Signal","section_title":"Entry Signal","section_text":"```\n조건 1: 5분 window 누적 청산 ≥ threshold\n BTC: $20M\n ETH: $10M\n SOL/기타: $5M\n\n조건 2: 청산 방향 단방향 비율 ≥ 75%\n 예: 청산의 75%+가 long → SHORT 청산 = 가격 하락 → LONG 진입\n\n조건 3: 현재 가격이 청산 클러스터 하단 -0.5% ~ -2% 관통\n (이미 sweep 발생 확인)\n\n조건 4: 직전 1분봉 volume > 평균 3σ 이상\n\n→ 모두 충족시: 역방향 포지션 진입\n```","alpha_id":"A1","kill_switch_layer":null,"references":"[]"}
{"doc_id":"alpha-A1","doc_type":"alpha_spec","version":"v0.1","section_id":"alpha-A1/A1_Liquidation_Cascade_Reverse_Primary_A/진입_로직/Exit_Rules","section_title":"Exit Rules","section_text":"- **TP:** entry + 0.8% (leverage 반영 실질 수익 4%)\n- **SL:** entry - 0.4% (R/R 2:1)\n- **Timeout:** 30분 내 미체결시 시장가 청산\n- **Trailing:** TP 50% 도달시 SL을 entry + 0.2%로 이동 (breakeven guard)","alpha_id":"A1","kill_switch_layer":null,"references":"[]"}
{"doc_id":"alpha-A1","doc_type":"alpha_spec","version":"v0.1","section_id":"alpha-A1/A1_Liquidation_Cascade_Reverse_Primary_A/진입_로직/포지션_크기","section_title":"포지션 크기","section_text":"- 자본의 **5%** (capital-tier-router 기반)\n- 레버리지 **5x** (Kelly/3 안전계수)\n- 실효 노출: 25%\n\n---","alpha_id":"A1","kill_switch_layer":null,"references":"[]"}
{"doc_id":"alpha-A1","doc_type":"alpha_spec","version":"v0.1","section_id":"alpha-A1/A1_Liquidation_Cascade_Reverse_Primary_A/기대_성과","section_title":"기대 성과","section_text":"| 지표 | 예상치 |\n|---|---|\n| 거래 빈도 | 일 2~5회 |\n| 승률 | 58% |\n| 평균 수익 (wins) | +0.8% |\n| 평균 손실 (losses) | -0.4% |\n| 기대값 per trade | 0.58 × 0.8 - 0.42 × 0.4 = **+0.296%** |\n| 일 기대 수익 | 0.296% × 3회 = **+0.89%** (실효) |\n| 수수료 차감 후 | **+0.4~0.6%** |","alpha_id":"A1","kill_switch_layer":null,"references":"[]"}
{"doc_id":"alpha-A1","doc_type":"alpha_spec","version":"v0.1","section_id":"alpha-A1/A1_Liquidation_Cascade_Reverse_Primary_A/리스크/False_Cascade","section_title":"False Cascade","section_text":"- 청산이 완전히 끝나지 않고 추세 지속 → 역방향 진입 손실\n- **완화:** 청산 5분 rolling이 hard stop (조건 2 방향 비율 75%+)","alpha_id":"A1","kill_switch_layer":null,"references":"[]"}
{"doc_id":"alpha-A1","doc_type":"alpha_spec","version":"v0.1","section_id":"alpha-A1/A1_Liquidation_Cascade_Reverse_Primary_A/리스크/Flash_Crash","section_title":"Flash Crash","section_text":"- LUNA/FTX 급 사태에서는 \"mean revert\"가 오지 않음\n- **완화:** Kill Switch Layer 3 (correlation killer), Layer 5 (flash crash 시나리오)","alpha_id":"A1","kill_switch_layer":null,"references":"[]"}
{"doc_id":"alpha-A1","doc_type":"alpha_spec","version":"v0.1","section_id":"alpha-A1/A1_Liquidation_Cascade_Reverse_Primary_A/리스크/Latency","section_title":"Latency","section_text":"- forceOrder WS 수신 → 주문 전송까지 >100ms시 이미 Phase 1 끝나있을 수 있음\n- **완화:** VM Tokyo 이전 (RTT 3ms), WS 전용 연결 분리\n\n---","alpha_id":"A1","kill_switch_layer":null,"references":"[]"}
{"doc_id":"alpha-A1","doc_type":"alpha_spec","version":"v0.1","section_id":"alpha-A1/A1_Liquidation_Cascade_Reverse_Primary_A/구현_파일","section_title":"구현 파일","section_text":"신규: `src/agents/liquidation-hunter-agent.js`\n\n의존:\n- `src/core/liquidation-stream.js` (신규, 5분 rolling cluster)\n- `src/core/ws-connection-manager.js` (기존)\n- `src/execution/futures-executor.js` (기존 + STOP_MARKET 자동)","alpha_id":"A1","kill_switch_layer":null,"references":"[\"src/agents/liquidation-hunter-agent.js\", \"src/core/liquidation-stream.js\", \"src/core/ws-connection-manager.js\", \"src/execution/futures-executor.js\"]"}
{"doc_id":"alpha-A1","doc_type":"alpha_spec","version":"v0.1","section_id":"alpha-A1/A1_Liquidation_Cascade_Reverse_Primary_A/구현_파일/핵심_메서드","section_title":"핵심 메서드","section_text":"```javascript\nclass LiquidationHunterAgent extends BaseAgent {\n evaluate(marketContext) {\n const clusters = liquidationStream.getRecentClusters(symbol, 300); // 5분\n const totalLiq = clusters.reduce((s, c) => s + c.notional, 0);\n\n if (totalLiq < this._threshold(symbol)) return null;\n\n const longLiqRatio = clusters.filter(c => c.side === 'LONG').reduce(...) / totalLiq;\n if (longLiqRatio < 0.75 && longLiqRatio > 0.25) return null; // not directional\n\n const direction = longLiqRatio > 0.75 ? 'LONG' : 'SHORT';\n // (long 청산 = 가격 하락 → LONG 진입)\n\n const currentPrice = marketContext.lastPrice;\n const clusterLow = Math.min(...clusters.map(c => c.price));\n\n if (direction === 'LONG' && currentPrice > clusterLow * 1.005) return null; // sweep 미발생\n\n return {\n agent: 'liquidationHunter',\n side: direction,\n confidence: this._scoreConfidence(totalLiq, longLiqRatio, volumeZ),\n tp: 0.008,\n sl: 0.004,\n timeout: 30 * 60 * 1000,\n trailingActivate: 0.004, // TP 50% 지점\n trailingOffset: -0.002, // entry + 0.2%\n };\n }\n}\n```\n\n---","alpha_id":"A1","kill_switch_layer":null,"references":"[]"}
{"doc_id":"alpha-A1","doc_type":"alpha_spec","version":"v0.1","section_id":"alpha-A1/A1_Liquidation_Cascade_Reverse_Primary_A/Shadow_검증_기준_Phase_1_","section_title":"Shadow 검증 기준 (Phase 1)","section_text":"- 기간: 2주\n- 최소 거래: 20건\n- Sharpe > 1.2\n- t-test p < 0.05\n- MaxDD < 10%\n- False positive (청산 방향 오인) < 20%\n\n실패시: 조건 임계값 재조정 또는 Phase 2 제외\n\n---","alpha_id":"A1","kill_switch_layer":null,"references":"[]"}
{"doc_id":"alpha-A1","doc_type":"alpha_spec","version":"v0.1","section_id":"alpha-A1/A1_Liquidation_Cascade_Reverse_Primary_A/리스크_예산","section_title":"리스크 예산","section_text":"- 일일 MaxDD 기여: < 2%\n- 주간 MaxDD 기여: < 5%\n- 초과시: 자동 일시 중단 (24h)","alpha_id":"A1","kill_switch_layer":null,"references":"[]"}
{"doc_id":"alpha-A1","doc_type":"alpha_spec","version":"v0.1","section_id":"alpha-A1/A1_Liquidation_Cascade_Reverse_Primary_A/참고","section_title":"참고","section_text":"- Binance API: https://binance-docs.github.io/apidocs/futures/en/#liquidation-order-streams\n- Coinglass: https://www.coinglass.com/\n- 학술: Lehar & Parlour (2024) \"Decentralized Exchanges\"","alpha_id":"A1","kill_switch_layer":null,"references":"[\"https://binance-docs.github.io/apidocs/futures/en/#liquidation-order-streams\", \"https://www.coinglass.com/\"]"}
{"doc_id":"alpha-A2","doc_type":"alpha_spec","version":"v0.1","section_id":"alpha-A2/A2_Mean_Reversion_OU_High-Frequency_Scal","section_title":"A2 · Mean Reversion OU (High-Frequency Scalping)","section_text":"> **기대 기여:** 일 0.3~0.8% (두 번째로 큰 기여)\n> **승률:** 55%\n> **Sharpe:** 1.5~2.5\n> **우선순위:** ⭐⭐⭐⭐ (Phase 1 공동 우선)\n\n---","alpha_id":"A2","kill_switch_layer":null,"references":"[]"}
{"doc_id":"alpha-A2","doc_type":"alpha_spec","version":"v0.1","section_id":"alpha-A2/A2_Mean_Reversion_OU_High-Frequency_Scal/이론_배경/Ornstein-Uhlenbeck_프로세스","section_title":"Ornstein-Uhlenbeck 프로세스","section_text":"단기 시간프레임(1~5분)에서 가격은 **평균회귀** 성질을 보임:\n```\ndX_t = θ(μ - X_t)dt + σdW_t\n```\n- θ: 평균회귀 속도 (half-life = ln(2)/θ)\n- μ: 장기 평균\n- σ: 변동성\n\nCrypto 1분봉 BTC/ETH 실측 half-life: **5~30분**","alpha_id":"A2","kill_switch_layer":null,"references":"[]"}
{"doc_id":"alpha-A2","doc_type":"alpha_spec","version":"v0.1","section_id":"alpha-A2/A2_Mean_Reversion_OU_High-Frequency_Scal/이론_배경/학술_근거","section_title":"학술 근거","section_text":"- Cartea, Jaimungal, Penalva (2015) \"Algorithmic and High-Frequency Trading\" Ch. 6\n- Avellaneda & Stoikov (2008) \"High-frequency trading in a limit order book\"\n- Ernest Chan (2013) \"Algorithmic Trading\" Ch. 4","alpha_id":"A2","kill_switch_layer":null,"references":"[]"}
{"doc_id":"alpha-A2","doc_type":"alpha_spec","version":"v0.1","section_id":"alpha-A2/A2_Mean_Reversion_OU_High-Frequency_Scal/이론_배경/Crypto_특이성","section_title":"Crypto 특이성","section_text":"- 전체 시간프레임에서는 Hurst > 0.5 (trending) 이지만\n- **1~5분봉은 평균회귀** (retail noise, market maker replenishment)\n- 단, **추세장에서는 작동 안 함** → regime filter 필수\n\n---","alpha_id":"A2","kill_switch_layer":null,"references":"[]"}
{"doc_id":"alpha-A2","doc_type":"alpha_spec","version":"v0.1","section_id":"alpha-A2/A2_Mean_Reversion_OU_High-Frequency_Scal/진입_로직/전처리","section_title":"전처리","section_text":"1. 1분봉 OHLCV 수집 (최근 200 bars)\n2. OLS로 OU 모델 fit: θ, μ, σ 추정\n3. Half-life 계산: τ = ln(2) / θ\n4. Z-score: z = (X_t - μ) / (σ / √(2θ))","alpha_id":"A2","kill_switch_layer":null,"references":"[]"}
{"doc_id":"alpha-A2","doc_type":"alpha_spec","version":"v0.1","section_id":"alpha-A2/A2_Mean_Reversion_OU_High-Frequency_Scal/진입_로직/Regime_Filter_필수_선행_","section_title":"Regime Filter (필수 선행)","section_text":"- ADX < 25 (trending 아님)\n- BBW > 0.015 (squeeze 아님)\n- 1h timeframe 추세 flat (EMA50 ~ EMA200 간격 < 0.5%)","alpha_id":"A2","kill_switch_layer":null,"references":"[]"}
{"doc_id":"alpha-A2","doc_type":"alpha_spec","version":"v0.1","section_id":"alpha-A2/A2_Mean_Reversion_OU_High-Frequency_Scal/진입_로직/Entry_Signal","section_title":"Entry Signal","section_text":"```\n조건 1: |Z-score| > 2.0 (2σ 이탈)\n조건 2: Half-life 5 ≤ τ ≤ 30 분 (너무 빠르거나 느리면 skip)\n조건 3: Regime filter 통과\n\nZ > +2.0 → SHORT entry (μ로 회귀 예상)\nZ < -2.0 → LONG entry\n```","alpha_id":"A2","kill_switch_layer":null,"references":"[]"}
{"doc_id":"alpha-A2","doc_type":"alpha_spec","version":"v0.1","section_id":"alpha-A2/A2_Mean_Reversion_OU_High-Frequency_Scal/진입_로직/Exit_Rules","section_title":"Exit Rules","section_text":"- **TP:** Z-score = 0.5 도달 (평균 근접)\n- **SL:** Z-score 추가 0.5σ 이탈 (|Z| > 2.5)\n- **Timeout:** half-life × 2 (회귀 실패시)","alpha_id":"A2","kill_switch_layer":null,"references":"[]"}
{"doc_id":"alpha-A2","doc_type":"alpha_spec","version":"v0.1","section_id":"alpha-A2/A2_Mean_Reversion_OU_High-Frequency_Scal/진입_로직/포지션_크기","section_title":"포지션 크기","section_text":"- 자본의 **3%** (소액 scalping)\n- 레버리지 **3x**\n- 실효 노출: 9%\n\n---","alpha_id":"A2","kill_switch_layer":null,"references":"[]"}
{"doc_id":"alpha-A2","doc_type":"alpha_spec","version":"v0.1","section_id":"alpha-A2/A2_Mean_Reversion_OU_High-Frequency_Scal/기대_성과","section_title":"기대 성과","section_text":"| 지표 | 예상치 |\n|---|---|\n| 거래 빈도 | 일 10~30회 |\n| 승률 | 55% |\n| 평균 수익/손실 | +0.15% / -0.12% |\n| 기대값 per trade | 0.55 × 0.15 - 0.45 × 0.12 = **+0.028%** |\n| 일 기대 (15회 기준) | +0.42% |\n| 수수료 차감 후 (taker 0.08% 왕복) | **+0.3~0.5%** |\n\n**핵심:** 거래 빈도 × 낮은 기대값의 곱. Maker rebate로 전환시 수수료 절반 → **+0.5~0.8%** 달성 가능\n\n---","alpha_id":"A2","kill_switch_layer":null,"references":"[]"}
{"doc_id":"alpha-A2","doc_type":"alpha_spec","version":"v0.1","section_id":"alpha-A2/A2_Mean_Reversion_OU_High-Frequency_Scal/리스크/Regime_Shift","section_title":"Regime Shift","section_text":"- Trending 시장으로 전환시 승률 급락\n- **완화:** Regime filter 매 bar 재평가, 실패시 1시간 쿨다운","alpha_id":"A2","kill_switch_layer":null,"references":"[]"}
{"doc_id":"alpha-A2","doc_type":"alpha_spec","version":"v0.1","section_id":"alpha-A2/A2_Mean_Reversion_OU_High-Frequency_Scal/리스크/OU_fit_불안정","section_title":"OU fit 불안정","section_text":"- Sample 부족 (<100 bars) 또는 high σ 구간에서 parameter 불안정\n- **완화:** R² > 0.3 확인, 미달시 skip","alpha_id":"A2","kill_switch_layer":null,"references":"[]"}
{"doc_id":"alpha-A2","doc_type":"alpha_spec","version":"v0.1","section_id":"alpha-A2/A2_Mean_Reversion_OU_High-Frequency_Scal/리스크/고빈도_수수료_누적","section_title":"고빈도 수수료 누적","section_text":"- Taker 0.04% × 2 = 0.08%/거래\n- 기대값 0.028% < 수수료 0.08% → **Maker-only 전환 필수**\n- Post-only limit 주문, 미체결시 10초 뒤 취소/재시도\n\n---","alpha_id":"A2","kill_switch_layer":null,"references":"[]"}
{"doc_id":"alpha-A2","doc_type":"alpha_spec","version":"v0.1","section_id":"alpha-A2/A2_Mean_Reversion_OU_High-Frequency_Scal/구현_파일","section_title":"구현 파일","section_text":"기존: [src/agents/mean-revert-agent.js](../../src/agents/mean-revert-agent.js) 재구현\n\n신규 의존:\n- `src/core/ou-estimator.js` (신규, Johansen/OLS fit)\n- 기존 regime-detector 재활용","alpha_id":"A2","kill_switch_layer":null,"references":"[\"src/core/ou-estimator.js\"]"}
{"doc_id":"alpha-A2","doc_type":"alpha_spec","version":"v0.1","section_id":"alpha-A2/A2_Mean_Reversion_OU_High-Frequency_Scal/구현_파일/핵심_메서드","section_title":"핵심 메서드","section_text":"```javascript\nclass MeanRevertAgent extends BaseAgent {\n evaluate(marketContext) {\n if (!this._regimeFilter(marketContext)) return null;\n\n const bars = marketContext.ohlcv1m.slice(-200);\n const { theta, mu, sigma, halfLife, r2 } = ouEstimator.fit(bars);\n\n if (r2 < 0.3) return null;\n if (halfLife < 5 || halfLife > 30) return null;\n\n const currentPrice = bars[bars.length - 1][4];\n const z = (currentPrice - mu) / (sigma / Math.sqrt(2 * theta));\n\n if (Math.abs(z) < 2.0) return null;\n\n return {\n agent: 'meanRevertOU',\n side: z > 0 ? 'SHORT' : 'LONG',\n confidence: Math.min(100, 50 + Math.abs(z) * 10),\n entryType: 'LIMIT_POST_ONLY', // Maker fee\n tp: 0.005, // Z=0.5 목표\n sl: 0.003,\n timeout: halfLife * 2 * 60 * 1000,\n meta: { theta, mu, sigma, halfLife, z, r2 },\n };\n }\n}\n```\n\n---","alpha_id":"A2","kill_switch_layer":null,"references":"[]"}
{"doc_id":"alpha-A2","doc_type":"alpha_spec","version":"v0.1","section_id":"alpha-A2/A2_Mean_Reversion_OU_High-Frequency_Scal/Shadow_검증_기준_Phase_1_","section_title":"Shadow 검증 기준 (Phase 1)","section_text":"- 기간: 2주\n- 최소 거래: 200건 (고빈도라 쉽게 달성)\n- Sharpe > 1.2\n- t-test p < 0.01 (더 엄격, 샘플 많음)\n- MaxDD < 8%\n- Maker fill rate > 70% (post-only 체결 비율)\n\n실패시: OU 파라미터 임계값 조정 또는 symbol 제한\n\n---","alpha_id":"A2","kill_switch_layer":null,"references":"[]"}
{"doc_id":"alpha-A2","doc_type":"alpha_spec","version":"v0.1","section_id":"alpha-A2/A2_Mean_Reversion_OU_High-Frequency_Scal/리스크_예산","section_title":"리스크 예산","section_text":"- 일일 MaxDD 기여: < 1.5%\n- 주간 MaxDD 기여: < 4%","alpha_id":"A2","kill_switch_layer":null,"references":"[]"}
{"doc_id":"alpha-A2","doc_type":"alpha_spec","version":"v0.1","section_id":"alpha-A2/A2_Mean_Reversion_OU_High-Frequency_Scal/참고","section_title":"참고","section_text":"- Cartea et al. (2015) *Algorithmic and High-Frequency Trading*\n- Ernest Chan (2013) *Algorithmic Trading* Ch. 4 \"Mean Reversion of Stocks and ETFs\"\n- Avellaneda & Stoikov (2008)","alpha_id":"A2","kill_switch_layer":null,"references":"[]"}
{"doc_id":"alpha-A3","doc_type":"alpha_spec","version":"v0.1","section_id":"alpha-A3/A3_Extreme_Funding_Reversal","section_title":"A3 · Extreme Funding Reversal","section_text":"> **기대 기여:** 일 0.2~0.3%\n> **승률:** 62%\n> **Sharpe:** 1.2~1.8\n> **우선순위:** ⭐⭐⭐ (Phase 1)\n\n---","alpha_id":"A3","kill_switch_layer":null,"references":"[]"}
{"doc_id":"alpha-A3","doc_type":"alpha_spec","version":"v0.1","section_id":"alpha-A3/A3_Extreme_Funding_Reversal/이론_배경/Funding_구조","section_title":"Funding 구조","section_text":"Binance 무기한선물은 8시간마다 funding 지급:\n- 정상: ±0.01% (연 ~10.95%)\n- 극단: +0.1% 이상 → **과열된 long 포지션** (crowded trade)\n- 극단: -0.08% 이하 → 과열된 short\n\n극단 펀딩 후 48시간 내 **역방향 평균회귀 확률 68%** (CryptoQuant 2024 리서치).","alpha_id":"A3","kill_switch_layer":null,"references":"[]"}
{"doc_id":"alpha-A3","doc_type":"alpha_spec","version":"v0.1","section_id":"alpha-A3/A3_Extreme_Funding_Reversal/이론_배경/학술_근거","section_title":"학술 근거","section_text":"- Alexander et al. (2023) \"Crypto basis trading\"\n- Makarov & Schoar (2020) \"Trading and Arbitrage in Cryptocurrency Markets\"\n- Binance Research 2024 funding rate anomaly report\n\n---","alpha_id":"A3","kill_switch_layer":null,"references":"[]"}
{"doc_id":"alpha-A3","doc_type":"alpha_spec","version":"v0.1","section_id":"alpha-A3/A3_Extreme_Funding_Reversal/진입_로직/데이터_소스","section_title":"데이터 소스","section_text":"- **Funding rate:** Binance `/fapi/v1/premiumIndex` (무료)\n- **OI:** Coinalyze free API\n- **Basis:** Binance spot + perp 가격 차이","alpha_id":"A3","kill_switch_layer":null,"references":"[]"}
{"doc_id":"alpha-A3","doc_type":"alpha_spec","version":"v0.1","section_id":"alpha-A3/A3_Extreme_Funding_Reversal/진입_로직/Entry_Signal","section_title":"Entry Signal","section_text":"```\n조건 1: Funding rate 극단\n - Long crowded: funding ≥ +0.1% (8h)\n - Short crowded: funding ≤ -0.08%\n\n조건 2: OI 확장 동반\n - OI 6시간 전 대비 +5% 이상 증가\n\n조건 3: Basis 괴리\n - Perp vs Spot spread > 0.3% annualized\n\n조건 4: 가격 이미 방향성 있는 움직임\n - Long crowded → 24h 상승 5%+\n - Short crowded → 24h 하락 5%+\n\n→ 모두 충족시 역방향 진입\n (funding +0.1% → SHORT, funding -0.08% → LONG)\n```","alpha_id":"A3","kill_switch_layer":null,"references":"[]"}
{"doc_id":"alpha-A3","doc_type":"alpha_spec","version":"v0.1","section_id":"alpha-A3/A3_Extreme_Funding_Reversal/진입_로직/Exit_Rules","section_title":"Exit Rules","section_text":"- **TP:** +2% (8~12시간 hold 예상)\n- **SL:** -1% (빠른 추가 쏠림 방어)\n- **Timeout:** 다음 funding 시점 + 4시간 (24h 이내 회귀 없으면 청산)\n- **Funding 수익 가산:** 역포지션으로 funding 받음 (추가 수익)","alpha_id":"A3","kill_switch_layer":null,"references":"[]"}
{"doc_id":"alpha-A3","doc_type":"alpha_spec","version":"v0.1","section_id":"alpha-A3/A3_Extreme_Funding_Reversal/진입_로직/포지션_크기","section_title":"포지션 크기","section_text":"- 자본의 **4%**\n- 레버리지 **5x**\n- 실효 노출: 20%\n\n---","alpha_id":"A3","kill_switch_layer":null,"references":"[]"}
{"doc_id":"alpha-A3","doc_type":"alpha_spec","version":"v0.1","section_id":"alpha-A3/A3_Extreme_Funding_Reversal/기대_성과","section_title":"기대 성과","section_text":"| 지표 | 예상치 |\n|---|---|\n| 거래 빈도 | 일 0.5~1회 (극단 펀딩 빈도 제한) |\n| 승률 | 62% |\n| 평균 수익 (wins) | +2.0% |\n| 평균 손실 (losses) | -1.0% |\n| Funding 수익 추가 | +0.1~0.3%/포지션 |\n| 기대값 per trade | 0.62 × 2.0 - 0.38 × 1.0 = **+0.86%** (funding 포함 +1.1%) |\n| 일 기대 (0.7회 기준) | **+0.6~0.8%** |\n| 수수료 차감 후 | **+0.2~0.3%** |\n\n---","alpha_id":"A3","kill_switch_layer":null,"references":"[]"}
{"doc_id":"alpha-A3","doc_type":"alpha_spec","version":"v0.1","section_id":"alpha-A3/A3_Extreme_Funding_Reversal/리스크/False_Signal","section_title":"False Signal","section_text":"- 극단 펀딩이 **추세 지속**을 의미할 때도 있음 (특히 알트 bull run)\n- **완화:** 조건 4 (24h 이미 움직였음)으로 late-entry 방지","alpha_id":"A3","kill_switch_layer":null,"references":"[]"}
{"doc_id":"alpha-A3","doc_type":"alpha_spec","version":"v0.1","section_id":"alpha-A3/A3_Extreme_Funding_Reversal/리스크/Funding_Flip","section_title":"Funding Flip","section_text":"- 진입 후 funding이 정상화되면서 역방향 포지션의 funding 수익 사라짐\n- **완화:** 포지션 진입시 funding 수익이 아닌 **가격 회귀**가 주 edge임을 명시","alpha_id":"A3","kill_switch_layer":null,"references":"[]"}
{"doc_id":"alpha-A3","doc_type":"alpha_spec","version":"v0.1","section_id":"alpha-A3/A3_Extreme_Funding_Reversal/리스크/Opportunity_Cost","section_title":"Opportunity Cost","section_text":"- 극단 펀딩 대기 시간이 길 수 있음 (주 2~3회)\n- **완화:** 다른 알파와 병행, 자본은 대기중 Funding/Basis Harvest (A5)에 투입\n\n---","alpha_id":"A3","kill_switch_layer":null,"references":"[]"}
{"doc_id":"alpha-A3","doc_type":"alpha_spec","version":"v0.1","section_id":"alpha-A3/A3_Extreme_Funding_Reversal/구현_파일","section_title":"구현 파일","section_text":"신규: `src/agents/extreme-funding-agent.js`\n\n의존:\n- 기존 [src/core/market-context.js](../../src/core/market-context.js) funding 데이터 확장\n- 신규 OI 모니터 (Coinalyze API)","alpha_id":"A3","kill_switch_layer":null,"references":"[\"src/agents/extreme-funding-agent.js\"]"}
{"doc_id":"alpha-A3","doc_type":"alpha_spec","version":"v0.1","section_id":"alpha-A3/A3_Extreme_Funding_Reversal/구현_파일/핵심_메서드","section_title":"핵심 메서드","section_text":"```javascript\nclass ExtremeFundingAgent extends BaseAgent {\n async evaluate(marketContext) {\n const funding = await fetchFundingRate(marketContext.symbol); // 8h funding\n const fundingAnnualized = funding * 3 * 365; // annualized\n\n if (Math.abs(funding) < 0.0008) return null; // < 0.08%\n\n const oiChange = marketContext.openInterest6hChange;\n if (oiChange < 0.05) return null;\n\n const basisSpread = await calcBasisSpread(marketContext.symbol);\n if (basisSpread < 0.003) return null;\n\n const price24hChange = marketContext.price24hChange;\n const crowdedDirection = funding > 0 ? 'LONG_CROWDED' : 'SHORT_CROWDED';\n\n if (crowdedDirection === 'LONG_CROWDED' && price24hChange < 0.05) return null;\n if (crowdedDirection === 'SHORT_CROWDED' && price24hChange > -0.05) return null;\n\n return {\n agent: 'extremeFunding',\n side: funding > 0 ? 'SHORT' : 'LONG',\n confidence: Math.min(95, 50 + Math.abs(funding) * 10000),\n tp: 0.02,\n sl: 0.01,\n timeout: 28 * 60 * 60 * 1000, // 28h (다음 funding + 4h)\n meta: { funding, fundingAnnualized, oiChange, basisSpread },\n };\n }\n}\n```\n\n---","alpha_id":"A3","kill_switch_layer":null,"references":"[]"}
{"doc_id":"alpha-A3","doc_type":"alpha_spec","version":"v0.1","section_id":"alpha-A3/A3_Extreme_Funding_Reversal/Shadow_검증_기준_Phase_1_","section_title":"Shadow 검증 기준 (Phase 1)","section_text":"- 기간: 2주 (극단 펀딩 10건+ 목표, 부족시 backtest v2로 보완)\n- 최소 거래: 10건\n- 승률 > 55%\n- Sharpe > 1.0\n- MaxDD < 8%\n\n샘플 부족시: Backtest v2에서 2020~2025 극단 펀딩 전부 재현\n\n---","alpha_id":"A3","kill_switch_layer":null,"references":"[]"}
{"doc_id":"alpha-A3","doc_type":"alpha_spec","version":"v0.1","section_id":"alpha-A3/A3_Extreme_Funding_Reversal/리스크_예산","section_title":"리스크 예산","section_text":"- 일일 MaxDD 기여: < 1%\n- 주간 MaxDD 기여: < 3%","alpha_id":"A3","kill_switch_layer":null,"references":"[]"}
{"doc_id":"alpha-A3","doc_type":"alpha_spec","version":"v0.1","section_id":"alpha-A3/A3_Extreme_Funding_Reversal/참고","section_title":"참고","section_text":"- Alexander et al. (2023) \"Crypto basis trading\"\n- Makarov & Schoar (2020)\n- Binance Research 2024 funding anomaly\n- CryptoQuant 2024 리서치","alpha_id":"A3","kill_switch_layer":null,"references":"[]"}
{"doc_id":"alpha-A4","doc_type":"alpha_spec","version":"v0.1","section_id":"alpha-A4/A4_Macro_Event_Bracket","section_title":"A4 · Macro Event Bracket","section_text":"> **기대 기여:** 이벤트일 0.5~1.2% (월 2~4회 이벤트)\n> **승률:** 55%\n> **Sharpe:** N/A (저빈도, 이벤트 기반)\n> **우선순위:** ⭐⭐⭐ (Phase 1)\n\n---","alpha_id":"A4","kill_switch_layer":null,"references":"[]"}
{"doc_id":"alpha-A4","doc_type":"alpha_spec","version":"v0.1","section_id":"alpha-A4/A4_Macro_Event_Bracket/이론_배경/매크로_이벤트_변동성","section_title":"매크로 이벤트 변동성","section_text":"FOMC, CPI, NFP 등 주요 매크로 이벤트 직후:\n- **T+0 ~ T+5분:** 평균 0.6~1.4% 변동 (BTC 기준)\n- **T+5 ~ T+15분:** 30% 확률로 full reversal (overshoot 수정)\n- **T+15 이후:** 정상 추세 복귀\n\n**전략:** T-5min 브래킷 대기 → T+0 방향성 확인 → overshoot fade","alpha_id":"A4","kill_switch_layer":null,"references":"[]"}
{"doc_id":"alpha-A4","doc_type":"alpha_spec","version":"v0.1","section_id":"alpha-A4/A4_Macro_Event_Bracket/이론_배경/학술_근거","section_title":"학술 근거","section_text":"- BlackRock 2024 \"Crypto response to macro events\"\n- Cortés & Zangari (2023) \"Event-driven crypto strategies\"\n- Binance Research 2024 CPI/FOMC impact analysis\n\n---","alpha_id":"A4","kill_switch_layer":null,"references":"[]"}
{"doc_id":"alpha-A4","doc_type":"alpha_spec","version":"v0.1","section_id":"alpha-A4/A4_Macro_Event_Bracket/이벤트_캘린더/월_2_4회_정기_이벤트","section_title":"월 2~4회 정기 이벤트","section_text":"- **CPI (Consumer Price Index):** 매월 중순 08:30 ET\n- **FOMC 결정:** 6주 주기, 14:00 ET\n- **NFP (Non-Farm Payrolls):** 매월 첫 금요일 08:30 ET\n- **PCE (Personal Consumption Expenditures):** 매월 말 08:30 ET","alpha_id":"A4","kill_switch_layer":null,"references":"[]"}
{"doc_id":"alpha-A4","doc_type":"alpha_spec","version":"v0.1","section_id":"alpha-A4/A4_Macro_Event_Bracket/이벤트_캘린더/비정기_고영향_이벤트","section_title":"비정기 고영향 이벤트","section_text":"- SEC ETF 승인/거부\n- Fed Chair 연설\n- 암호화폐 규제 발표\n- Binance/주요 거래소 공지","alpha_id":"A4","kill_switch_layer":null,"references":"[]"}
{"doc_id":"alpha-A4","doc_type":"alpha_spec","version":"v0.1","section_id":"alpha-A4/A4_Macro_Event_Bracket/이벤트_캘린더/데이터_소스","section_title":"데이터 소스","section_text":"- **정기 스케줄:** ForexFactory API (무료), FRED API (무료)\n- **실시간 헤드라인:** Cryptopanic API (무료)\n- **전문 뉴스:** Bloomberg Terminal (유료, 선택)\n\n---","alpha_id":"A4","kill_switch_layer":null,"references":"[]"}
{"doc_id":"alpha-A4","doc_type":"alpha_spec","version":"v0.1","section_id":"alpha-A4/A4_Macro_Event_Bracket/진입_로직/T-10min_사전_준비","section_title":"T-10min: 사전 준비","section_text":"1. 이벤트 T-10분 전 알림 수신\n2. 현재 포지션 일부 감축 (A1/A2/A3 포지션 50% 축소)\n3. 브래킷 자본 준비 (자본의 5%)","alpha_id":"A4","kill_switch_layer":null,"references":"[]"}
{"doc_id":"alpha-A4","doc_type":"alpha_spec","version":"v0.1","section_id":"alpha-A4/A4_Macro_Event_Bracket/진입_로직/T-5min_T-1min_Bracket_Standby","section_title":"T-5min ~ T-1min: Bracket Standby","section_text":"- 대기 상태, 주문 없음\n- 현재 가격 ± 0.3% 양쪽에 STOP 주문 대기","alpha_id":"A4","kill_switch_layer":null,"references":"[]"}
{"doc_id":"alpha-A4","doc_type":"alpha_spec","version":"v0.1","section_id":"alpha-A4/A4_Macro_Event_Bracket/진입_로직/T_0_T_2min_Direction_Confirm","section_title":"T+0 ~ T+2min: Direction Confirm","section_text":"```\n조건 1: T+0~T+2min 가격 변동 > 0.5% (단방향)\n조건 2: 거래량 평균 대비 5σ 이상\n조건 3: 반대 방향 STOP 자동 취소\n\n→ 방향성 확인시 해당 방향으로 진입\n```","alpha_id":"A4","kill_switch_layer":null,"references":"[]"}
{"doc_id":"alpha-A4","doc_type":"alpha_spec","version":"v0.1","section_id":"alpha-A4/A4_Macro_Event_Bracket/진입_로직/T_5min_T_15min_Fade_Entry_역방향_","section_title":"T+5min ~ T+15min: Fade Entry (역방향)","section_text":"```\n조건 1: T+0 진입 포지션이 +0.8% 이상 수익\n조건 2: T+5~T+8분 사이 과열 신호 (OI 급증, 펀딩 스파이크)\n\n→ 진입 포지션 청산 + 역방향 소규모 진입 (자본 2%)\n→ T+15min overshoot 수정 노림\n```","alpha_id":"A4","kill_switch_layer":null,"references":"[]"}
{"doc_id":"alpha-A4","doc_type":"alpha_spec","version":"v0.1","section_id":"alpha-A4/A4_Macro_Event_Bracket/진입_로직/Exit_Rules","section_title":"Exit Rules","section_text":"- **Primary (T+0 entry):** TP +1.5%, SL -0.8%, timeout 20분\n- **Fade (T+5~T+15):** TP +0.5%, SL -0.3%, timeout 10분","alpha_id":"A4","kill_switch_layer":null,"references":"[]"}
{"doc_id":"alpha-A4","doc_type":"alpha_spec","version":"v0.1","section_id":"alpha-A4/A4_Macro_Event_Bracket/진입_로직/포지션_크기","section_title":"포지션 크기","section_text":"- Primary: 자본의 **5%**, 레버리지 **3x**, 실효 15%\n- Fade: 자본의 **2%**, 레버리지 **3x**, 실효 6%\n\n---","alpha_id":"A4","kill_switch_layer":null,"references":"[]"}
{"doc_id":"alpha-A4","doc_type":"alpha_spec","version":"v0.1","section_id":"alpha-A4/A4_Macro_Event_Bracket/기대_성과","section_title":"기대 성과","section_text":"| 지표 | 예상치 |\n|---|---|\n| 이벤트 빈도 | 월 2~4회 |\n| 승률 (Primary) | 55% |\n| 승률 (Fade) | 45% (더 어려움) |\n| 평균 수익 | +1.5% (Primary), +0.5% (Fade) |\n| 평균 손실 | -0.8%, -0.3% |\n| 이벤트당 기대값 | +0.6% |\n| 월 기대 (3회) | +1.8% |\n| **일 평균 환산** | **+0.06%** (저빈도 알파) |\n\n**주의:** A4는 빈도 낮지만 이벤트일 기여도 큼. 연간 30~40회 이벤트 × 평균 +0.6% = **+18~24% 연 단독**\n\n---","alpha_id":"A4","kill_switch_layer":null,"references":"[]"}
{"doc_id":"alpha-A4","doc_type":"alpha_spec","version":"v0.1","section_id":"alpha-A4/A4_Macro_Event_Bracket/리스크/Direction_Misread","section_title":"Direction Misread","section_text":"- T+2분에 방향 확정했는데 T+3분에 역전\n- **완화:** SL 짧게 (-0.8%), timeout 20분 내 청산","alpha_id":"A4","kill_switch_layer":null,"references":"[]"}
{"doc_id":"alpha-A4","doc_type":"alpha_spec","version":"v0.1","section_id":"alpha-A4/A4_Macro_Event_Bracket/리스크/Flash_Crash","section_title":"Flash Crash","section_text":"- ETF 거부, 해킹 뉴스 등 극단 이벤트시 가격 5%+ 단방향\n- **완화:** Kill Switch Layer 3 (correlation killer), Layer 5 (flash scenarios)","alpha_id":"A4","kill_switch_layer":null,"references":"[]"}
{"doc_id":"alpha-A4","doc_type":"alpha_spec","version":"v0.1","section_id":"alpha-A4/A4_Macro_Event_Bracket/리스크/Rate_Limit","section_title":"Rate Limit","section_text":"- 이벤트 직후 거래량 폭증으로 API weight 초과 가능\n- **완화:** Rate limit governor에 이벤트 모드 추가 (주문 우선순위 상향)","alpha_id":"A4","kill_switch_layer":null,"references":"[]"}
{"doc_id":"alpha-A4","doc_type":"alpha_spec","version":"v0.1","section_id":"alpha-A4/A4_Macro_Event_Bracket/리스크/News_Interpretation","section_title":"News Interpretation","section_text":"- LLM이 헤드라인 잘못 해석 (예: \"Powell hawkish\" 실은 dovish)\n- **완화:** Claude Haiku로 재검증, confidence < 70% 시 skip\n\n---","alpha_id":"A4","kill_switch_layer":null,"references":"[]"}
{"doc_id":"alpha-A4","doc_type":"alpha_spec","version":"v0.1","section_id":"alpha-A4/A4_Macro_Event_Bracket/구현_파일","section_title":"구현 파일","section_text":"신규: `src/agents/macro-event-agent.js`\n\n의존:\n- 신규 `src/core/event-calendar.js` (ForexFactory/FRED 연동)\n- 기존 [src/core/news-snapshot-updater.js](../../src/core/news-snapshot-updater.js) 확장\n- 기존 [src/ml/llm-signal-filter.js](../../src/core/llm-signal-filter.js) (Claude Haiku 재활용)","alpha_id":"A4","kill_switch_layer":null,"references":"[\"src/agents/macro-event-agent.js\", \"src/core/event-calendar.js\"]"}
{"doc_id":"alpha-A4","doc_type":"alpha_spec","version":"v0.1","section_id":"alpha-A4/A4_Macro_Event_Bracket/구현_파일/핵심_메서드","section_title":"핵심 메서드","section_text":"```javascript\nclass MacroEventAgent extends BaseAgent {\n async evaluate(marketContext) {\n const upcomingEvent = eventCalendar.next(10 * 60 * 1000); // 10분 이내\n if (!upcomingEvent) return null;\n\n // T-10~T-0: standby 모드\n if (upcomingEvent.minutesUntil > 0) {\n return { action: 'PREPARE_BRACKET', event: upcomingEvent };\n }\n\n // T+0 ~ T+2: 방향 확정 대기\n const t0Move = marketContext.priceChangeSince(upcomingEvent.time);\n if (Math.abs(t0Move) < 0.005) return null; // 0.5% 이하 skip\n\n const volumeZ = marketContext.volumeZScore(5);\n if (volumeZ < 5) return null;\n\n return {\n agent: 'macroEvent',\n side: t0Move > 0 ? 'LONG' : 'SHORT',\n confidence: Math.min(90, 50 + Math.abs(t0Move) * 1000),\n tp: 0.015,\n sl: 0.008,\n timeout: 20 * 60 * 1000,\n meta: { event: upcomingEvent.name, t0Move, volumeZ },\n };\n }\n\n async evaluateFade(position) {\n // T+5 이후 fade 진입 판단\n if (position.holdMinutes < 5 || position.holdMinutes > 8) return null;\n if (position.pnlPct < 0.008) return null;\n\n const oiSpike = await marketContext.oiChange1m > 0.02;\n const fundingSpike = await marketContext.funding1h > 0.0005;\n if (!oiSpike && !fundingSpike) return null;\n\n return {\n agent: 'macroEventFade',\n side: position.side === 'LONG' ? 'SHORT' : 'LONG',\n confidence: 65,\n tp: 0.005,\n sl: 0.003,\n timeout: 10 * 60 * 1000,\n };\n }\n}\n```\n\n---","alpha_id":"A4","kill_switch_layer":null,"references":"[]"}
{"doc_id":"alpha-A4","doc_type":"alpha_spec","version":"v0.1","section_id":"alpha-A4/A4_Macro_Event_Bracket/Shadow_검증_기준_Phase_1_","section_title":"Shadow 검증 기준 (Phase 1)","section_text":"- 기간: 2주 (이벤트 2~4건 예상)\n- 최소 거래: 5건 (샘플 부족 가능)\n- 승률 > 50%\n- 이벤트당 기대값 > +0.4%\n\n샘플 부족시: Backtest v2에서 2023~2025 CPI/FOMC 전부 재현\n\n---","alpha_id":"A4","kill_switch_layer":null,"references":"[]"}
{"doc_id":"alpha-A4","doc_type":"alpha_spec","version":"v0.1","section_id":"alpha-A4/A4_Macro_Event_Bracket/리스크_예산","section_title":"리스크 예산","section_text":"- 이벤트당 MaxDD 기여: < 1%\n- 월간 MaxDD 기여: < 3%","alpha_id":"A4","kill_switch_layer":null,"references":"[]"}
{"doc_id":"alpha-A4","doc_type":"alpha_spec","version":"v0.1","section_id":"alpha-A4/A4_Macro_Event_Bracket/참고","section_title":"참고","section_text":"- ForexFactory: https://www.forexfactory.com/calendar\n- FRED: https://fred.stlouisfed.org/\n- Cryptopanic API: https://cryptopanic.com/developers/api/\n- BlackRock 2024 crypto macro analysis","alpha_id":"A4","kill_switch_layer":null,"references":"[\"https://www.forexfactory.com/calendar\", \"https://fred.stlouisfed.org/\", \"https://cryptopanic.com/developers/api/\"]"}
{"doc_id":"alpha-A5","doc_type":"alpha_spec","version":"v0.1","section_id":"alpha-A5/A5_Funding_Basis_Harvest_Delta-Neutral_B","section_title":"A5 · Funding + Basis Harvest (Delta-Neutral Base)","section_text":"> **기대 기여:** 일 0.05~0.15% (안정성 축)\n> **승률:** 95%+ (델타중립)\n> **Sharpe:** 3~5 (시장중립 고효율)\n> **우선순위:** ⭐⭐ (Phase 1, 안정성 베이스라인)\n\n---","alpha_id":"A5","kill_switch_layer":null,"references":"[]"}
{"doc_id":"alpha-A5","doc_type":"alpha_spec","version":"v0.1","section_id":"alpha-A5/A5_Funding_Basis_Harvest_Delta-Neutral_B/이론_배경/Delta-Neutral_Carry","section_title":"Delta-Neutral Carry","section_text":"**현물 매수 + 동일 notional 선물 숏** → 가격 방향성 제거, funding만 수확:\n- Funding +0.01%/8h (정상) = 연 **10.95%**\n- Quarterly basis +8~25% 연환산 (강세장 구간)\n- 누적시 안정적 \"국채 같은\" 수익","alpha_id":"A5","kill_switch_layer":null,"references":"[]"}
{"doc_id":"alpha-A5","doc_type":"alpha_spec","version":"v0.1","section_id":"alpha-A5/A5_Funding_Basis_Harvest_Delta-Neutral_B/이론_배경/학술_근거","section_title":"학술 근거","section_text":"- Alexander et al. (2023) \"Crypto basis trading\"\n- Makarov & Schoar (2020) \"Trading and Arbitrage in Cryptocurrency Markets\"\n- Hazard (2021) basis trading 실증","alpha_id":"A5","kill_switch_layer":null,"references":"[]"}
{"doc_id":"alpha-A5","doc_type":"alpha_spec","version":"v0.1","section_id":"alpha-A5/A5_Funding_Basis_Harvest_Delta-Neutral_B/이론_배경/Crypto_특이성","section_title":"Crypto 특이성","section_text":"- Bull market: basis 확대 (연 15~25%)\n- Bear market: basis 축소/역전 (음의 carry)\n- **시장 regime에 따라 켜고 끄기 필요**\n\n---","alpha_id":"A5","kill_switch_layer":null,"references":"[]"}
{"doc_id":"alpha-A5","doc_type":"alpha_spec","version":"v0.1","section_id":"alpha-A5/A5_Funding_Basis_Harvest_Delta-Neutral_B/포지션_구조/기본_Delta-Neutral_Pair","section_title":"기본 Delta-Neutral Pair","section_text":"```\nSpot Long (Binance Spot API): 1 BTC 매수\nPerp Short (USDM Futures): 1 BTC 숏 (1x 레버리지)\n```\n\n- **Delta:** 0 (가격 중립)\n- **Funding payment:** 숏 포지션이 long으로부터 받음\n- **Basis capture:** 선물 프리미엄 축소시 이익","alpha_id":"A5","kill_switch_layer":null,"references":"[]"}
{"doc_id":"alpha-A5","doc_type":"alpha_spec","version":"v0.1","section_id":"alpha-A5/A5_Funding_Basis_Harvest_Delta-Neutral_B/포지션_구조/운영_비용","section_title":"운영 비용","section_text":"- 진입 수수료: spot 0.1% + futures 0.04% = 0.14% 왕복\n- 청산 수수료: 동일 0.14%\n- 총 round-trip: **0.28%**","alpha_id":"A5","kill_switch_layer":null,"references":"[]"}
{"doc_id":"alpha-A5","doc_type":"alpha_spec","version":"v0.1","section_id":"alpha-A5/A5_Funding_Basis_Harvest_Delta-Neutral_B/포지션_구조/최소_보유_기간","section_title":"최소 보유 기간","section_text":"Funding 1회 수확 = 0.01% → 수수료 상회하려면 최소 **28회 funding = 9일 보유**\n\n---","alpha_id":"A5","kill_switch_layer":null,"references":"[]"}
{"doc_id":"alpha-A5","doc_type":"alpha_spec","version":"v0.1","section_id":"alpha-A5/A5_Funding_Basis_Harvest_Delta-Neutral_B/진입_로직/조건_체크","section_title":"조건 체크","section_text":"```\n조건 1: Funding rate 양수이며 지속 확인\n - 현재 funding > +0.005% (연 5%+)\n - 지난 24h 평균 funding > 0\n - 지난 7d 음수 funding < 3회\n\n조건 2: Basis 확대 구간 감지 (선택)\n - Perp premium > Spot + 0.1% annualized\n\n조건 3: Regime filter\n - BTC 7d 변동성 < 5% (안정)\n - 극단 공포/탐욕 지수 30~70 사이\n\n→ 모두 충족시 신규 pair 구축\n```","alpha_id":"A5","kill_switch_layer":null,"references":"[]"}
{"doc_id":"alpha-A5","doc_type":"alpha_spec","version":"v0.1","section_id":"alpha-A5/A5_Funding_Basis_Harvest_Delta-Neutral_B/진입_로직/자동_Rebalance","section_title":"자동 Rebalance","section_text":"Spot과 Perp notional 차이가 2% 이상 벌어지면 자동 재조정:\n- 가격 변동으로 notional drift\n- 매 사이클마다 spot_qty × spot_price ≈ |perp_qty × perp_price| 유지","alpha_id":"A5","kill_switch_layer":null,"references":"[]"}
{"doc_id":"alpha-A5","doc_type":"alpha_spec","version":"v0.1","section_id":"alpha-A5/A5_Funding_Basis_Harvest_Delta-Neutral_B/진입_로직/Exit_Rules","section_title":"Exit Rules","section_text":"- **Funding 역전:** 연속 funding < 0 × 3회 → 청산\n- **Basis 축소:** Premium < 0.05% annualized → 청산\n- **Volatility spike:** 24h 변동성 > 10% → 일시 청산 (추후 재진입 가능)\n- **Profit target:** 누적 PnL +2% 도달시 청산 옵션","alpha_id":"A5","kill_switch_layer":null,"references":"[]"}
{"doc_id":"alpha-A5","doc_type":"alpha_spec","version":"v0.1","section_id":"alpha-A5/A5_Funding_Basis_Harvest_Delta-Neutral_B/진입_로직/포지션_크기","section_title":"포지션 크기","section_text":"- 자본의 **15%** (델타중립이라 큰 비중 가능)\n- 레버리지 **1x** (spot) + **1x** (perp) = 실효 0x (market neutral)\n- 단, Perp 증거금 효율로 실효 자본 활용률 높음\n\n---","alpha_id":"A5","kill_switch_layer":null,"references":"[]"}
{"doc_id":"alpha-A5","doc_type":"alpha_spec","version":"v0.1","section_id":"alpha-A5/A5_Funding_Basis_Harvest_Delta-Neutral_B/기대_성과","section_title":"기대 성과","section_text":"| 지표 | 예상치 |\n|---|---|\n| 연환산 수익 (정상 구간) | 10~15% |\n| 연환산 수익 (강세 구간) | 20~40% (basis 확대시) |\n| 연환산 수익 (약세 구간) | 0~5% (funding 축소) |\n| 일 평균 | **+0.03~0.10%** (정상), **+0.05~0.15%** (강세) |\n| Sharpe | 3~5 |\n| MaxDD | < 5% (볼 spike시) |\n\n**역할:** 높은 Sharpe로 앙상블의 **안정성 축**. A1~A4가 불리한 regime에서도 꾸준히 수익.\n\n---","alpha_id":"A5","kill_switch_layer":null,"references":"[]"}
{"doc_id":"alpha-A5","doc_type":"alpha_spec","version":"v0.1","section_id":"alpha-A5/A5_Funding_Basis_Harvest_Delta-Neutral_B/리스크/Funding_Flip","section_title":"Funding Flip","section_text":"- 갑작스런 funding 음수 전환 (예: 약세장 진입)\n- **완화:** 조건 1 (24h 평균 확인), 3회 연속 음수시 자동 청산","alpha_id":"A5","kill_switch_layer":null,"references":"[]"}
{"doc_id":"alpha-A5","doc_type":"alpha_spec","version":"v0.1","section_id":"alpha-A5/A5_Funding_Basis_Harvest_Delta-Neutral_B/리스크/Basis_Collapse","section_title":"Basis Collapse","section_text":"- 선물 프리미엄 급격 축소 → basis 수익 증발\n- **완화:** Basis 모니터링, 축소시 점진 청산","alpha_id":"A5","kill_switch_layer":null,"references":"[]"}
{"doc_id":"alpha-A5","doc_type":"alpha_spec","version":"v0.1","section_id":"alpha-A5/A5_Funding_Basis_Harvest_Delta-Neutral_B/리스크/Exchange_Risk","section_title":"Exchange Risk","section_text":"- Binance spot 또는 futures 한쪽만 장애 발생시 delta 노출\n- **완화:** Kill Switch Layer 4 (fail-closed), 즉시 반대편도 수동 청산 알림","alpha_id":"A5","kill_switch_layer":null,"references":"[]"}
{"doc_id":"alpha-A5","doc_type":"alpha_spec","version":"v0.1","section_id":"alpha-A5/A5_Funding_Basis_Harvest_Delta-Neutral_B/리스크/Borrow_Rate_선택_확장_","section_title":"Borrow Rate (선택 확장)","section_text":"- 나중에 spot을 margin에서 빌려 쓰면 borrow rate 부담\n- **완화:** 순자산 내에서만 운영 (no margin borrow)\n\n---","alpha_id":"A5","kill_switch_layer":null,"references":"[]"}
{"doc_id":"alpha-A5","doc_type":"alpha_spec","version":"v0.1","section_id":"alpha-A5/A5_Funding_Basis_Harvest_Delta-Neutral_B/구현_파일","section_title":"구현 파일","section_text":"기존: [src/engines/funding-harvest-manager.js](../../src/engines/funding-harvest-manager.js) 재활용 + 확장\n\n신규 의존:\n- Binance Spot API 클라이언트 추가 (`src/core/spot-executor.js`)\n- 기존 WS 연결 관리자 확장","alpha_id":"A5","kill_switch_layer":null,"references":"[\"src/core/spot-executor.js\"]"}
{"doc_id":"alpha-A5","doc_type":"alpha_spec","version":"v0.1","section_id":"alpha-A5/A5_Funding_Basis_Harvest_Delta-Neutral_B/구현_파일/핵심_메서드","section_title":"핵심 메서드","section_text":"```javascript\nclass FundingHarvestManager {\n async evaluate(marketContext) {\n const funding = await fetchCurrentFunding(symbol);\n const funding24h = await fetch24hAvgFunding(symbol);\n const basis = await calcBasisSpread(symbol);\n const volatility7d = marketContext.volatility7d;\n const fearGreed = await fetchFearGreedIndex();\n\n if (funding < 0.00005) return null;\n if (funding24h < 0) return null;\n if (basis < 0.001) return null;\n if (volatility7d > 0.05) return null;\n if (fearGreed < 30 || fearGreed > 70) return null;\n\n return {\n agent: 'fundingHarvest',\n type: 'DELTA_NEUTRAL_PAIR',\n spotAction: { side: 'BUY', qty: this._calcSize(capital) },\n perpAction: { side: 'SELL', qty: this._calcSize(capital), leverage: 1 },\n expectedYield: funding * 3 * 365, // annualized\n minHoldDays: 9,\n exitConditions: ['FUNDING_FLIP_3X', 'BASIS_COLLAPSE', 'VOL_SPIKE_10PCT'],\n };\n }\n\n async rebalance(position) {\n const spotNotional = position.spot.qty * currentSpotPrice;\n const perpNotional = Math.abs(position.perp.qty * currentPerpPrice);\n const driftPct = Math.abs(spotNotional - perpNotional) / spotNotional;\n\n if (driftPct > 0.02) {\n // adjust perp size to match spot\n return this._rebalanceToMatch(position);\n }\n }\n}\n```\n\n---","alpha_id":"A5","kill_switch_layer":null,"references":"[]"}
{"doc_id":"alpha-A5","doc_type":"alpha_spec","version":"v0.1","section_id":"alpha-A5/A5_Funding_Basis_Harvest_Delta-Neutral_B/Shadow_검증_기준_Phase_1_","section_title":"Shadow 검증 기준 (Phase 1)","section_text":"- 기간: 2주 (funding 6회 수확 목표)\n- 최소 보유 기간: 9일 이상 1 pair\n- 일 수익 > 0.02% 평균\n- MaxDD < 2%\n- Delta drift < 2% (rebalance 작동 확인)\n\n---","alpha_id":"A5","kill_switch_layer":null,"references":"[]"}
{"doc_id":"alpha-A5","doc_type":"alpha_spec","version":"v0.1","section_id":"alpha-A5/A5_Funding_Basis_Harvest_Delta-Neutral_B/리스크_예산","section_title":"리스크 예산","section_text":"- 일일 MaxDD 기여: < 0.5% (가장 안정)\n- 주간 MaxDD 기여: < 1.5%","alpha_id":"A5","kill_switch_layer":null,"references":"[]"}
{"doc_id":"alpha-A5","doc_type":"alpha_spec","version":"v0.1","section_id":"alpha-A5/A5_Funding_Basis_Harvest_Delta-Neutral_B/참고","section_title":"참고","section_text":"- Alexander et al. (2023) \"Crypto basis trading\"\n- Makarov & Schoar (2020)\n- Binance Funding Rate: https://www.binance.com/en/futures/funding-history\n- Fear & Greed Index: https://alternative.me/crypto/fear-and-greed-index/","alpha_id":"A5","kill_switch_layer":null,"references":"[\"https://www.binance.com/en/futures/funding-history\", \"https://alternative.me/crypto/fear-and-greed-index/\"]"}
{"doc_id":"alpha-A6","doc_type":"alpha_spec","version":"v0.1","section_id":"alpha-A6/A6_Alt_Market_Making_Post-Only_Spread_Ca","section_title":"A6 · Alt Market Making (Post-Only Spread Capture)","section_text":"> **기대 기여:** 일 0.1~0.3%\n> **승률:** 상시 (MM은 spread capture, 개별 trade 개념 약함)\n> **Sharpe:** 1.0~1.5\n> **우선순위:** ⭐⭐ (Phase 1)\n\n---","alpha_id":"A6","kill_switch_layer":null,"references":"[]"}
{"doc_id":"alpha-A6","doc_type":"alpha_spec","version":"v0.1","section_id":"alpha-A6/A6_Alt_Market_Making_Post-Only_Spread_Ca/이론_배경/Market_Making_구조","section_title":"Market Making 구조","section_text":"양쪽에 limit 주문을 걸고 스프레드 수확:\n```\n매수 주문: 현재가 - spread/2 (bid)\n매도 주문: 현재가 + spread/2 (ask)\n```\n- 양쪽 체결시: +spread - 2×maker fee\n- 한쪽만 체결시: 인벤토리 누적 → 다음 체결 기다림\n\nBinance USDM 선물 **Maker rebate 0.02%** (VIP 0) → 한쪽 체결만으로도 +0.02%","alpha_id":"A6","kill_switch_layer":null,"references":"[]"}
{"doc_id":"alpha-A6","doc_type":"alpha_spec","version":"v0.1","section_id":"alpha-A6/A6_Alt_Market_Making_Post-Only_Spread_Ca/이론_배경/Avellaneda-Stoikov_모델","section_title":"Avellaneda-Stoikov 모델","section_text":"- **Reservation price:** 순수 중간가 대신 인벤토리 고려한 가격\n- **Optimal spread:** 변동성·인벤토리·시간 고려\n- **Inventory penalty:** 한쪽으로 치우치면 반대편 가격 공격적으로","alpha_id":"A6","kill_switch_layer":null,"references":"[]"}
{"doc_id":"alpha-A6","doc_type":"alpha_spec","version":"v0.1","section_id":"alpha-A6/A6_Alt_Market_Making_Post-Only_Spread_Ca/이론_배경/학술_근거","section_title":"학술 근거","section_text":"- Avellaneda & Stoikov (2008) \"High-frequency trading in a limit order book\"\n- Cartea, Jaimungal, Penalva (2015) Ch. 10\n\n---","alpha_id":"A6","kill_switch_layer":null,"references":"[]"}
{"doc_id":"alpha-A6","doc_type":"alpha_spec","version":"v0.1","section_id":"alpha-A6/A6_Alt_Market_Making_Post-Only_Spread_Ca/타깃_심볼/선택_기준","section_title":"선택 기준","section_text":"- 유동성 있되 HFT 경쟁 덜한 **mid-cap**\n- Spread 0.05~0.15% 정규적 관찰\n- Binance 선물 상장","alpha_id":"A6","kill_switch_layer":null,"references":"[]"}
{"doc_id":"alpha-A6","doc_type":"alpha_spec","version":"v0.1","section_id":"alpha-A6/A6_Alt_Market_Making_Post-Only_Spread_Ca/타깃_심볼/추천_3심볼","section_title":"추천 3심볼","section_text":"1. **LINK/USDT** — 안정적 유동성, spread 0.08%\n2. **SUI/USDT** — 신흥 altcoin, spread 0.12%\n3. **APT/USDT** — 활발한 거래, spread 0.10%\n\nBTC/ETH는 **제외** (HFT colocation 봇과 queue 경쟁 불가)\n\n---","alpha_id":"A6","kill_switch_layer":null,"references":"[]"}
{"doc_id":"alpha-A6","doc_type":"alpha_spec","version":"v0.1","section_id":"alpha-A6/A6_Alt_Market_Making_Post-Only_Spread_Ca/진입_로직/Reservation_Price_Avellaneda-Stoikov_","section_title":"Reservation Price (Avellaneda-Stoikov)","section_text":"```\nr = mid - q × γ × σ² × (T - t)\n\nq: 현재 인벤토리 (양수: long, 음수: short)\nγ: 리스크 회피 계수 (0.1 기본)\nσ: 최근 변동성 (ATR/price)\nT-t: 남은 세션 시간 (24h cycle)\n```","alpha_id":"A6","kill_switch_layer":null,"references":"[]"}
{"doc_id":"alpha-A6","doc_type":"alpha_spec","version":"v0.1","section_id":"alpha-A6/A6_Alt_Market_Making_Post-Only_Spread_Ca/진입_로직/Optimal_Spread","section_title":"Optimal Spread","section_text":"```\nδ = γ × σ² × (T - t) + (2/γ) × ln(1 + γ/k)\n\nk: orderbook liquidity parameter (실측)\n```","alpha_id":"A6","kill_switch_layer":null,"references":"[]"}
{"doc_id":"alpha-A6","doc_type":"alpha_spec","version":"v0.1","section_id":"alpha-A6/A6_Alt_Market_Making_Post-Only_Spread_Ca/진입_로직/주문_배치","section_title":"주문 배치","section_text":"- **Bid:** r - δ/2 at post-only limit\n- **Ask:** r + δ/2 at post-only limit\n- **Size:** 자본 × 0.5% (MM은 빠른 회전율이 핵심, 작은 size)","alpha_id":"A6","kill_switch_layer":null,"references":"[]"}
{"doc_id":"alpha-A6","doc_type":"alpha_spec","version":"v0.1","section_id":"alpha-A6/A6_Alt_Market_Making_Post-Only_Spread_Ca/진입_로직/갱신_주기","section_title":"갱신 주기","section_text":"- 매 5초 WS bookTicker 업데이트 감지\n- mid 변동 > 0.02% 또는 인벤토리 변화시 주문 취소/재배치","alpha_id":"A6","kill_switch_layer":null,"references":"[]"}
{"doc_id":"alpha-A6","doc_type":"alpha_spec","version":"v0.1","section_id":"alpha-A6/A6_Alt_Market_Making_Post-Only_Spread_Ca/진입_로직/Inventory_Limit","section_title":"Inventory Limit","section_text":"- 최대 인벤토리 ±자본의 2%\n- 초과시:\n - Long 포지션: ask 공격적 (r - 0.01% 이하), bid 중단\n - Short 포지션: bid 공격적, ask 중단","alpha_id":"A6","kill_switch_layer":null,"references":"[]"}
{"doc_id":"alpha-A6","doc_type":"alpha_spec","version":"v0.1","section_id":"alpha-A6/A6_Alt_Market_Making_Post-Only_Spread_Ca/진입_로직/Exit_Inventory_Clear","section_title":"Exit / Inventory Clear","section_text":"- 세션 말 (매 24h) 자정 KST에 잔여 인벤토리 시장가 청산\n- 일중에도 인벤토리 ±1.5% 초과시 taker로 즉시 감축\n\n---","alpha_id":"A6","kill_switch_layer":null,"references":"[]"}
{"doc_id":"alpha-A6","doc_type":"alpha_spec","version":"v0.1","section_id":"alpha-A6/A6_Alt_Market_Making_Post-Only_Spread_Ca/기대_성과","section_title":"기대 성과","section_text":"| 지표 | 예상치 |\n|---|---|\n| 체결 빈도 | 심볼당 일 100~300회 |\n| 일 spread 수확 | 심볼당 0.03~0.08% |\n| 3심볼 합산 | **+0.09~0.24%** (인벤토리 비용 차감 전) |\n| Maker rebate | +0.02%/fill × fill rate = +0.04~0.10%/일 |\n| **순 기대 일 수익** | **+0.13~0.34%** |\n\n---","alpha_id":"A6","kill_switch_layer":null,"references":"[]"}
{"doc_id":"alpha-A6","doc_type":"alpha_spec","version":"v0.1","section_id":"alpha-A6/A6_Alt_Market_Making_Post-Only_Spread_Ca/리스크/Inventory_Blowout","section_title":"Inventory Blowout","section_text":"- 한쪽 추세 강할 때 계속 한쪽만 체결 → 불리 방향 인벤토리 누적\n- **완화:** Inventory limit (±2%), 초과시 taker 청산, Avellaneda-Stoikov γ 증가","alpha_id":"A6","kill_switch_layer":null,"references":"[]"}
{"doc_id":"alpha-A6","doc_type":"alpha_spec","version":"v0.1","section_id":"alpha-A6/A6_Alt_Market_Making_Post-Only_Spread_Ca/리스크/Spread_Compression","section_title":"Spread Compression","section_text":"- HFT 봇이 더 좁은 spread로 진입 → 체결 빈도 저하\n- **완화:** 심볼 주기적 재평가, spread < 0.04%시 해당 심볼 pause","alpha_id":"A6","kill_switch_layer":null,"references":"[]"}
{"doc_id":"alpha-A6","doc_type":"alpha_spec","version":"v0.1","section_id":"alpha-A6/A6_Alt_Market_Making_Post-Only_Spread_Ca/리스크/Exchange_Risk_Maker_주문_","section_title":"Exchange Risk (Maker 주문)","section_text":"- Post-only 거부 (예: 이미 cross시) 실패 반복시 주문 놓침\n- **완화:** Reject 3회 연속시 심볼 5분 pause","alpha_id":"A6","kill_switch_layer":null,"references":"[]"}
{"doc_id":"alpha-A6","doc_type":"alpha_spec","version":"v0.1","section_id":"alpha-A6/A6_Alt_Market_Making_Post-Only_Spread_Ca/리스크/Adverse_Selection","section_title":"Adverse Selection","section_text":"- 정보우위 트레이더가 MM 가격을 먼저 집어감 (toxic flow)\n- **완화:** Volume imbalance 감지시 spread 확대\n\n---","alpha_id":"A6","kill_switch_layer":null,"references":"[]"}
{"doc_id":"alpha-A6","doc_type":"alpha_spec","version":"v0.1","section_id":"alpha-A6/A6_Alt_Market_Making_Post-Only_Spread_Ca/구현_파일","section_title":"구현 파일","section_text":"신규: `src/engines/alt-mm-engine.js`\n\n옵션 1: Hummingbot 브릿지 (Python → Node.js Redis pub/sub)\n옵션 2: 자체 Node.js 구현 (Avellaneda-Stoikov 수식 간단 구현)\n\n**권장:** Phase 1은 자체 구현 (brige 복잡도 회피), Phase 3 확장시 Hummingbot 고려","alpha_id":"A6","kill_switch_layer":null,"references":"[\"src/engines/alt-mm-engine.js\"]"}
{"doc_id":"alpha-A6","doc_type":"alpha_spec","version":"v0.1","section_id":"alpha-A6/A6_Alt_Market_Making_Post-Only_Spread_Ca/구현_파일/핵심_메서드","section_title":"핵심 메서드","section_text":"```javascript\nclass AltMMEngine {\n constructor({ symbols = ['LINK/USDT', 'SUI/USDT', 'APT/USDT'] }) {\n this.symbols = symbols;\n this.inventory = new Map(); // symbol → qty (+/-)\n this.activeOrders = new Map(); // symbol → { bidId, askId }\n this.gamma = 0.1;\n }\n\n async cycle(marketContext) {\n for (const symbol of this.symbols) {\n const state = await this._getSymbolState(symbol);\n if (!this._passFilter(state)) continue;\n\n const { mid, sigma, bookDepth } = state;\n const q = this.inventory.get(symbol) || 0;\n const T_minus_t = this._timeUntilClose();\n\n // Avellaneda-Stoikov reservation price + optimal spread\n const r = mid - q * this.gamma * sigma * sigma * T_minus_t;\n const delta = this.gamma * sigma * sigma * T_minus_t\n + (2 / this.gamma) * Math.log(1 + this.gamma / bookDepth.k);\n\n const bidPrice = r - delta / 2;\n const askPrice = r + delta / 2;\n\n // Replace orders if drift > 0.02% or inventory changed\n await this._replaceOrders(symbol, bidPrice, askPrice);\n\n // Inventory guard\n if (Math.abs(q * mid) > this._maxInventoryUsd(state.capital)) {\n await this._reduceInventory(symbol, q);\n }\n }\n }\n}\n```\n\n---","alpha_id":"A6","kill_switch_layer":null,"references":"[]"}
{"doc_id":"alpha-A6","doc_type":"alpha_spec","version":"v0.1","section_id":"alpha-A6/A6_Alt_Market_Making_Post-Only_Spread_Ca/Shadow_검증_기준_Phase_1_","section_title":"Shadow 검증 기준 (Phase 1)","section_text":"- 기간: 2주\n- 심볼별 최소 체결: 500건 (일 평균 35건)\n- 평균 maker fill rate > 60%\n- 인벤토리 breach < 1% 일수\n- 일 평균 수익 > +0.05% (3심볼 합산)\n- MaxDD < 5%\n\n---","alpha_id":"A6","kill_switch_layer":null,"references":"[]"}
{"doc_id":"alpha-A6","doc_type":"alpha_spec","version":"v0.1","section_id":"alpha-A6/A6_Alt_Market_Making_Post-Only_Spread_Ca/리스크_예산","section_title":"리스크 예산","section_text":"- 일일 MaxDD 기여: < 1%\n- 주간 MaxDD 기여: < 3%","alpha_id":"A6","kill_switch_layer":null,"references":"[]"}
{"doc_id":"alpha-A6","doc_type":"alpha_spec","version":"v0.1","section_id":"alpha-A6/A6_Alt_Market_Making_Post-Only_Spread_Ca/참고","section_title":"참고","section_text":"- Avellaneda & Stoikov (2008) 원논문\n- Cartea et al. (2015) *Algorithmic and High-Frequency Trading* Ch. 10\n- Hummingbot Avellaneda 구현: https://github.com/hummingbot/hummingbot\n- Binance 선물 fee schedule: https://www.binance.com/en/fee/futureFee","alpha_id":"A6","kill_switch_layer":null,"references":"[\"https://github.com/hummingbot/hummingbot\", \"https://www.binance.com/en/fee/futureFee\"]"}
{"doc_id":"expert-01-math","doc_type":"expert_report","version":"v1.0","section_id":"expert-01-math/Expert_Report_01_수학적_경계_분석","section_title":"Expert Report 01 · 수학적 경계 분석","section_text":"> **에이전트:** neo-architect\n> **일시:** 2026-04-22\n> **임무:** 일 1%+ 누적 수익률의 수학적 실현 가능성 분석\n\n---","alpha_id":null,"kill_switch_layer":null,"references":"[]"}
{"doc_id":"expert-01-math","doc_type":"expert_report","version":"v1.0","section_id":"expert-01-math/Expert_Report_01_수학적_경계_분석/_수학적_결론","section_title":"📐 수학적 결론","section_text":"**일 1% 복리는 2026년 현재 시장에서 실증 불가능.** 조건부 단기(30~90일) 가능, 장기(12개월+) 통계적으로 불가능에 가까움.\n\n결론 먼저: 일 1% 복리 = 연 3,678%. 이 수익률을 **지속적**으로 달성한 기관은 공개·비공개 통틀어 **0건**. Renaissance Medallion(연 66% 세전, 일 0.21%)의 약 **58배**. López de Prado의 Deflated Sharpe Ratio 기준 이 정도 수익률의 장기 지속 확률은 사실상 0에 수렴합니다. 다만 **소액(<$5K) + 레버리지 20~50x + 단기 윈도우(30~90일)** 조건에서는 통계적으로 가능은 하나, 파산 확률이 50%를 초과합니다.\n\n---","alpha_id":null,"kill_switch_layer":null,"references":"[]"}
{"doc_id":"expert-01-math","doc_type":"expert_report","version":"v1.0","section_id":"expert-01-math/Expert_Report_01_수학적_경계_분석/_기관_실측_비교표","section_title":"📊 기관 실측 비교표","section_text":"| 주체 | 공개 연수익률 | 환산 일수익률 | 샤프 | 자본 규모 | 주요 전략 |\n|---|---|---|---|---|---|\n| Renaissance Medallion (1988-2018) | 39% 순 / 66% 세전 | 0.13% / 0.21% | 2.5~7.5 추정 | $10B 상한(의도적) | 단기 stat arb, HFT |\n| Two Sigma Compass | 15~20% | 0.06~0.08% | 1.2~1.8 | $60B+ | multi-factor, ML |\n| Citadel Wellington | 15.2% (LTD) | 0.06% | 1.5~2.0 | $65B | 멀티전략 |\n| Jump Trading (crypto desk) | 추정 30~50% | 0.10~0.16% | 비공개 | $수십억 | HFT MM, latency arb |\n| Wintermute (crypto MM) | 추정 40~80% | 0.14~0.23% | 비공개 | $수십억 | CEX/DEX MM |\n| GSR Markets | 추정 30~60% | 0.10~0.19% | 비공개 | $수십억 | OTC + MM |\n| Alameda Research (2019~2021) | 추정 100~300% | 0.27~0.55% | N/A (붕괴) | $수십억 | arb + 방향성 + 사기 |\n| 개인 HFT 탑티어 (익명) | 100~500% | 0.27~0.49% | 2~3 | <$1M | latency arb |\n\n**핵심:** 세계 최고 기관도 **일 0.25%를 넘기지 못함**. 일 1%는 이들의 4~7배.\n\n---","alpha_id":null,"kill_switch_layer":null,"references":"[]"}
{"doc_id":"expert-01-math","doc_type":"expert_report","version":"v1.0","section_id":"expert-01-math/Expert_Report_01_수학적_경계_분석/_일_1_달성_경로_수학적_조건/기대값_방정식","section_title":"기대값 방정식","section_text":"```\nE[R] = p × W - (1-p) × L - fee × 2\n목표: E[R] × N_trades_per_day ≥ 0.01\n```","alpha_id":null,"kill_switch_layer":null,"references":"[]"}
{"doc_id":"expert-01-math","doc_type":"expert_report","version":"v1.0","section_id":"expert-01-math/Expert_Report_01_수학적_경계_분석/_일_1_달성_경로_수학적_조건/전략별_분석","section_title":"전략별 분석","section_text":"**전략 1: Binance 선물 Taker 스캘핑 (승률 65%, R:R 1:1)**\n- 거래당 기대값: 0.65×R - 0.35×R - 0.08% = 0.30R - 0.08%\n- 일 1% 위해: R=0.5% 시 일 4회, R=1% 시 일 2회\n- 문제: 승률 65%는 López de Prado 기준 **2σ outlier**. 오버피팅 거의 확실.\n- 필요 샤프: 8~12 (Medallion 수준의 3배)\n\n**전략 2: Grid + Funding Harvest (시장중립)**\n- 일 funding rate 평균 0.01~0.03% × 3회 = 0.03~0.09%\n- Grid 수익 0.1~0.3%/일 (횡보장 한정)\n- 합계 **일 0.13~0.39%** → 일 1% 불가\n- 레버리지 10x 적용 시 0.4~1.2% 가능하나 **추세장 강제청산 리스크**\n\n**전략 3: 고레버리지 + 단기 추세 (20~50x)**\n- Kelly 최적: f* = (p×W - q×L) / (W×L)\n- 승률 55%, R:R 1.5 가정: f* = 0.25 (25% 베팅)\n- 실전 안전계수: Kelly/4 = 6.25% 베팅\n- 일 5회 × 평균 0.3% = 1.5% (이론치), 실전 σ_daily = 5~8%\n- **파산확률(Chan 공식)**: P(ruin) = ((1-edge)/(1+edge))^(capital/risk_per_trade)\n - edge 10%, 자본 6.25% 베팅 시 N=100 거래 후 50% 손실 확률 = 약 35%\n\n**전략 4: Cross-Exchange Arbitrage**\n- 실측 edge: 연 20~60% (Cartea 2015 crypto)\n- 일 환산: 0.07~0.19%\n- 일 1% 달성 불가\n\n**전략 5: MEV / Sandwich (온체인)**\n- 상위 봇 연 200~500% (Flashbots)\n- 일 0.55~1.3%\n- **Binance 선물 범위 밖**\n\n**전략 6: 이벤트 드리븐 + 뉴스 반응**\n- 월 5~8회 이벤트에 레버리지 집중\n- 성공 시 1회 3~10%, 실패 시 -30~-100%\n- 단일 이벤트 파산 확률 5~15%\n\n---","alpha_id":null,"kill_switch_layer":null,"references":"[]"}
{"doc_id":"expert-01-math","doc_type":"expert_report","version":"v1.0","section_id":"expert-01-math/Expert_Report_01_수학적_경계_분석/_파산_확률_Risk_of_Ruin_계산","section_title":"⚠️ 파산 확률 (Risk of Ruin) 계산","section_text":"López de Prado AFML Ch.15:\n```\nP(ruin, N) = exp(-2 × μ × capital / σ²)\n```\n\n일 1% 목표 시 필요 최소 샤프:\n- **일 1% × √252 / σ_annual = Sharpe**\n- σ_annual 30% 가정 시 필요 Sharpe = **8.4**\n- σ_annual 60% 가정 시 필요 Sharpe = **4.2**\n- Medallion 추정 Sharpe 2.5~4.0. 공식 기록 최고는 **일 1% 조건 미달**\n\n**Risk of Ruin** (레버리지 20x, 손절 1%):\n\n| N거래 | 50% 손실 확률 | 완전 파산 확률 |\n|---|---|---|\n| 100 | 28% | 8% |\n| 500 | 61% | 34% |\n| 1,000 | 82% | 57% |\n| 2,500 (1년) | 96% | 84% |\n\n**결론:** 1년 연속 일 1%는 **파산 확률 84%**.\n\n---","alpha_id":null,"kill_switch_layer":null,"references":"[]"}
{"doc_id":"expert-01-math","doc_type":"expert_report","version":"v1.0","section_id":"expert-01-math/Expert_Report_01_수학적_경계_분석/_최종_권고_자본_구간별_/_30_500_소액_","section_title":"$30~$500 (소액)","section_text":"- **현실 목표: 일 0.3~0.8% 평균, 월 10~25%**\n- 전략: 고레버리지(20~30x) + 단일 추세 + 엄격 손절 1%\n- 파산 각오 전제. \"실험 자본\"으로 간주.\n- Kelly/4 적용, 거래 빈도 일 2~4회\n- 3~6개월 내 $5K 도달 후 전략 전환","alpha_id":null,"kill_switch_layer":null,"references":"[]"}
{"doc_id":"expert-01-math","doc_type":"expert_report","version":"v1.0","section_id":"expert-01-math/Expert_Report_01_수학적_경계_분석/_최종_권고_자본_구간별_/_1K_10K_중액_","section_title":"$1K~$10K (중액)","section_text":"- **현실 목표: 일 0.15~0.4% 평균, 월 5~12%**\n- 전략: Grid + Funding (60%) + 추세추종 (30%) + 이벤트 (10%)\n- 레버리지: 5~10x 평균\n- 샤프 2~3 타겟\n- 연 60~300% = 세계 최상위권","alpha_id":null,"kill_switch_layer":null,"references":"[]"}
{"doc_id":"expert-01-math","doc_type":"expert_report","version":"v1.0","section_id":"expert-01-math/Expert_Report_01_수학적_경계_분석/_최종_권고_자본_구간별_/핵심_메시지","section_title":"핵심 메시지","section_text":"1. **일 1% 복리는 물리법칙은 아니지만 시장 유동성·경쟁 구조상 지속 불가능**. Grinold-Kahn Fundamental Law 위배.\n2. 코드베이스의 `capital-tier-router.js`, `trade-edge-policy.js` **micro tier 보수 설정이 수학적으로 정당**.\n3. **단기 성과에 목표 조정 금지**. DSR 기준 30일 +30%는 운으로 설명 가능.\n4. 소액 추천: **일 목표 0.5%, 월 15%, 파산 각오**. 이 자체도 상위 1%.\n\n---","alpha_id":null,"kill_switch_layer":null,"references":"[\"capital-tier-router.js\", \"trade-edge-policy.js\"]"}
{"doc_id":"expert-01-math","doc_type":"expert_report","version":"v1.0","section_id":"expert-01-math/Expert_Report_01_수학적_경계_분석/참고_문헌","section_title":"참고 문헌","section_text":"- López de Prado, M. (2018). *Advances in Financial Machine Learning*, Ch. 14-15\n- Bailey & López de Prado (2014). \"The Deflated Sharpe Ratio\", *JPM*\n- Chan, E. (2013). *Algorithmic Trading*\n- Cartea, Jaimungal, Penalva (2015). *Algorithmic and High-Frequency Trading*\n- Grinold & Kahn (1999). *Active Portfolio Management*","alpha_id":null,"kill_switch_layer":null,"references":"[]"}
{"doc_id":"expert-02-hft-mm","doc_type":"expert_report","version":"v1.0","section_id":"expert-02-hft-mm/Expert_Report_02_HFT_Market_Making_전략","section_title":"Expert Report 02 · HFT/Market Making 전략","section_text":"> **에이전트:** general-purpose\n> **일시:** 2026-04-22\n> **임무:** Binance 선물 일 1%+ 달성 가능한 HFT/MM 전략 조사\n\n---","alpha_id":null,"kill_switch_layer":null,"references":"[]"}
{"doc_id":"expert-02-hft-mm","doc_type":"expert_report","version":"v1.0","section_id":"expert-02-hft-mm/Expert_Report_02_HFT_Market_Making_전략/_결론_TL_DR_","section_title":"🎯 결론 (TL;DR)","section_text":"일 1% 누적 달성은 가능하지만, 단일 전략으로는 통계적으로 희박. 리테일 검증 경로는:\n**(1) 공격적 Funding Arb + (2) Market Making on 저유동성 알트 + (3) Liquidation Cascade 진입** 의 앙상블.\n\n일 1%는 월 ~26% 복리(연 ~3,678%)로 HFT 프롭 수준 목표이며, 본질적으로 **드로다운 관리와 자본 회전율**이 생존 결정 요인.\n\n---","alpha_id":null,"kill_switch_layer":null,"references":"[]"}
{"doc_id":"expert-02-hft-mm","doc_type":"expert_report","version":"v1.0","section_id":"expert-02-hft-mm/Expert_Report_02_HFT_Market_Making_전략/1_전략별_심층_분석/1_1_Market_Making_post-only_limit_edge_중","section_title":"1.1 Market Making (post-only limit) — edge 중","section_text":"- **이론 edge:** Binance 선물 maker 리베이트 **0.02%** (taker 0.05%). Spread 0.04%면 왕복 0.08% per fill.\n- **리테일 제약:** co-location 없는 WAN latency 30~80ms → BTC/ETH 같은 유동 pair는 tight queue 경쟁에서 밀림. **LINK, APT, SUI 급 mid-cap**에서 spread 0.05~0.15% 포획 가능.\n- **Binance rate limit:** 주문 1,200/min, weight 6,000/min, WS 10 msgs/sec. **Hummingbot 1~3 pair 한계**.\n- **실측 성과 (Hashquant/Hummingbot Miner):** 월 3~8%, 일 환산 0.1~0.27%. **단독 일 1% 어려움**.\n- **오픈소스:** [hummingbot/hummingbot](https://github.com/hummingbot/hummingbot) (8k+ stars). Avellaneda-Stoikov 내장.","alpha_id":null,"kill_switch_layer":null,"references":"[\"https://github.com/hummingbot/hummingbot\"]"}
{"doc_id":"expert-02-hft-mm","doc_type":"expert_report","version":"v1.0","section_id":"expert-02-hft-mm/Expert_Report_02_HFT_Market_Making_전략/1_전략별_심층_분석/1_2_Funding_Rate_Arbitrage_공격형_edge_상","section_title":"1.2 Funding Rate Arbitrage (공격형) — edge 상","section_text":"- **단순 spot-short 캐리:** 일 0.03% → 목표 미달\n- **공격화:**\n - **멀티거래소 레깅:** Binance long vs Bybit/OKX short (펀딩 역전 구간). 극단 구간 **일 1~3%**.\n - **Pre-funding sniper:** 펀딩 체결 직전 진입 → 직후 청산\n - **Negative funding farming:** 극단 시장 연 200%+\n- **실측:** BlockWorks 2024 APY 15~40%, 피크 **일 2%+**\n- **Binance 특화:** Cross margin 증거금 효율 ↑, 동일 심볼 양방향 헤지는 hedge mode 필수","alpha_id":null,"kill_switch_layer":null,"references":"[]"}
{"doc_id":"expert-02-hft-mm","doc_type":"expert_report","version":"v1.0","section_id":"expert-02-hft-mm/Expert_Report_02_HFT_Market_Making_전략/1_전략별_심층_분석/1_3_Liquidation_Cascade_Trading_edge_상_리","section_title":"1.3 Liquidation Cascade Trading — edge 상, 리스크 상","section_text":"- **이론:** 대형 청산($10M+)은 5~15초 내 1~3% overshoot 후 mean revert\n- **실측 edge:** BTC 청산 $50M+ 시 3분 내 평균 0.8~1.5% mean reversion (Coinalyze 2024)\n- **구현:**\n - Binance WS `!forceOrder@arr` 구독\n - Coinglass/Coinalyze heatmap 사전 매핑\n - 청산 누적 $X 초과 시 역방향 진입, TP 0.5~1%\n- **리스크:** False cascade, 10~20% 드로다운 빈번","alpha_id":null,"kill_switch_layer":null,"references":"[]"}
{"doc_id":"expert-02-hft-mm","doc_type":"expert_report","version":"v1.0","section_id":"expert-02-hft-mm/Expert_Report_02_HFT_Market_Making_전략/1_전략별_심층_분석/1_4_Triangular_Arbitrage_선물_edge_하","section_title":"1.4 Triangular Arbitrage (선물) — edge 하","section_text":"- **현실:** Binance 선물 내부 tri-arb **거의 소멸** (HFT 10ms 수렴)\n- **변형:** Perp-Spot basis arb 연 5~15%\n- **결론:** 일 1% 목표 부적합","alpha_id":null,"kill_switch_layer":null,"references":"[]"}
{"doc_id":"expert-02-hft-mm","doc_type":"expert_report","version":"v1.0","section_id":"expert-02-hft-mm/Expert_Report_02_HFT_Market_Making_전략/1_전략별_심층_분석/1_5_News_Event_Alpha_edge_중_비정기","section_title":"1.5 News/Event Alpha — edge 중, 비정기","section_text":"- **Edge 지속:** Fed/CPI 후 1~5분 최대 변동. LLM 추론 지연 3~5초 허용\n- **실측:** ETF 승인 같은 이벤트 5~15%. 정기 CPI 1~3%. 월 2~4회 기회\n- **기존 구현:** `news-snapshot-updater.js`, `event-risk-gate.js` 이미 존재 (방어용 → 진입 알파 전환 가능)","alpha_id":null,"kill_switch_layer":null,"references":"[\"news-snapshot-updater.js\", \"event-risk-gate.js\"]"}
{"doc_id":"expert-02-hft-mm","doc_type":"expert_report","version":"v1.0","section_id":"expert-02-hft-mm/Expert_Report_02_HFT_Market_Making_전략/1_전략별_심층_분석/1_6_Order_Book_Imbalance_edge_중","section_title":"1.6 Order Book Imbalance — edge 중","section_text":"- **이론:** OBI = (bid_vol - ask_vol) / total. 1~10초 horizon 예측력 (Cont, Kukanov 2014)\n- **리테일:** Binance depth WS 100ms 스냅샷. edge 0.02~0.05% per trade\n- **일 1% 단독 불가**. MM 보조 시그널로 적합\n\n---","alpha_id":null,"kill_switch_layer":null,"references":"[]"}
{"doc_id":"expert-02-hft-mm","doc_type":"expert_report","version":"v1.0","section_id":"expert-02-hft-mm/Expert_Report_02_HFT_Market_Making_전략/2_전략별_실측_일_수익률_비교_500_10K_","section_title":"2. 전략별 실측 일 수익률 비교 ($500~$10K)","section_text":"| 전략 | 기대 일 수익률 | 변동성 | 기회 빈도 | 단독 1% | 인프라 |\n|------|--------------|-------|---------|-----------|------------|\n| Market Making (알트) | 0.1~0.3% | 중 | 상시 | ❌ | 중 |\n| Funding Arb 단순 | 0.03% | 하 | 상시 | ❌ | 하 |\n| Funding Arb 공격 | 0.3~2% | 상 | 구간 집중 | ⭕ | 상 |\n| Liquidation Cascade | 0.5~3% | 상 | 일 2~5회 | ⭕ | 중 |\n| Triangular | <0.05% | 하 | 희소 | ❌ | 상 |\n| News/Event | 0.2~5% (이벤트일) | 극상 | 월 2~4회 | ⭕ | 중 |\n| Order Book Imbalance | 0.1~0.4% | 중 | 상시 | ❌ | 상 |\n\n---","alpha_id":null,"kill_switch_layer":null,"references":"[]"}
{"doc_id":"expert-02-hft-mm","doc_type":"expert_report","version":"v1.0","section_id":"expert-02-hft-mm/Expert_Report_02_HFT_Market_Making_전략/3_일_1_달성_가능성_Top_3","section_title":"3. 🏆 일 1%+ 달성 가능성 Top 3","section_text":"1. **Liquidation Cascade + OBI 보조** — 일 2~5회, 건당 0.5~1.5% TP. forceOrder 스트림 추가만 필요.\n2. **공격형 멀티거래소 Funding Arb** — 극단 구간 일 2%+, 평시 0.1~0.3%. OKX/Bybit CCXT Pro 필요.\n3. **알트 MM + Inventory Skew** — LINK/SUI/APT 3개 pair 시 일 0.3~0.6% 안정, 이벤트 구간 1%+.\n\n---","alpha_id":null,"kill_switch_layer":null,"references":"[]"}
{"doc_id":"expert-02-hft-mm","doc_type":"expert_report","version":"v1.0","section_id":"expert-02-hft-mm/Expert_Report_02_HFT_Market_Making_전략/4_검증된_오픈소스","section_title":"4. 💻 검증된 오픈소스","section_text":"| 레포 | Stars | 용도 | 적합도 |\n|------|-------|-----|-------|\n| [hummingbot/hummingbot](https://github.com/hummingbot/hummingbot) | 8k+ | MM, Funding Arb | ⭐⭐⭐⭐⭐ |\n| [nautechsystems/nautilus_trader](https://github.com/nautechsystems/nautilus_trader) | 2k+ | Tick-level backtest + live | ⭐⭐⭐⭐ |\n| [jesse-ai/jesse](https://github.com/jesse-ai/jesse) | 5k+ | 전략 프레임워크 | ⭐⭐⭐ |\n| [freqtrade/freqtrade](https://github.com/freqtrade/freqtrade) | 28k+ | 추세/ML | ⭐⭐ (현물 편향) |\n| [ccxt/ccxt](https://github.com/ccxt/ccxt) | 32k+ | 거래소 통합 | ⭐⭐⭐⭐⭐ |\n| [tardis-dev/tardis-machine](https://github.com/tardis-dev/tardis-machine) | 500+ | 과거 tick 데이터 | ⭐⭐⭐⭐ |\n\n---","alpha_id":null,"kill_switch_layer":null,"references":"[\"https://github.com/hummingbot/hummingbot\", \"https://github.com/nautechsystems/nautilus_trader\", \"https://github.com/jesse-ai/jesse\", \"https://github.com/freqtrade/freqtrade\", \"https://github.com/ccxt/ccxt\", \"https://github.com/tardis-dev/tardis-machine\"]"}
{"doc_id":"expert-02-hft-mm","doc_type":"expert_report","version":"v1.0","section_id":"expert-02-hft-mm/Expert_Report_02_HFT_Market_Making_전략/5_피해야_할_전략","section_title":"5. 🚫 피해야 할 전략","section_text":"- **Triangular arb (선물 내부):** HFT 수렴, 리테일 edge 소멸\n- **순수 추세추종 (고레버 10x+):** Binance BTC/ETH 월 샤프 <0.5\n- **Grid (무제한 loss):** 하락장 $10K→$2K 실사례\n- **Copy trading / Signal 구독:** 90% 적자 (Binance COPY 2024)\n- **저지연 단독 tick arb:** WAN 30ms+ 리테일 구조적 열위\n\n---","alpha_id":null,"kill_switch_layer":null,"references":"[]"}
{"doc_id":"expert-02-hft-mm","doc_type":"expert_report","version":"v1.0","section_id":"expert-02-hft-mm/Expert_Report_02_HFT_Market_Making_전략/6_통합_앙상블_제안_일_1_현실안_","section_title":"6. 🎯 통합 앙상블 제안 (일 1% 현실안)","section_text":"**자본 $1K~$10K 배분:**\n```\n40% — Liquidation Cascade (primary alpha)\n → forceOrder WS + Coinglass heatmap\n → 진입: 5분 청산 누적 $20M+ 반대 방향\n → TP 0.8% / SL 0.4%, 일 2~4회 기대\n\n30% — 알트 MM (LINK/SUI/APT)\n → Hummingbot Avellaneda-Stoikov\n → spread 0.08%, inventory_skew ±15%\n\n20% — 공격형 Funding (멀티거래소)\n → Binance vs Bybit 펀딩 역전\n\n10% — News/Event 탄환\n → Fed/CPI/ETF 이벤트 데이터\n\n레버리지: Cascade 10~20x, MM 3~5x, Funding 5~10x\n```\n\n**현실적 경고:** 위 앙상블로도 **일 평균 0.4~0.8%**가 정직한 추정. 일 1%는 상위 분위. 샤프 2.0+ 유지가 더 현실적.\n\n---","alpha_id":null,"kill_switch_layer":null,"references":"[]"}
{"doc_id":"expert-02-hft-mm","doc_type":"expert_report","version":"v1.0","section_id":"expert-02-hft-mm/Expert_Report_02_HFT_Market_Making_전략/현_코드베이스_재활용_경로","section_title":"현 코드베이스 재활용 경로","section_text":"- `src/core/runtime-coordinator.js` → 전략별 lease 분리\n- `src/core/event-risk-gate.js` → News 알파 진입 트리거\n- `src/core/capital-tier-router.js` → 전략별 자본 배분\n- 신규 `src/agents/liquidation-hunter-agent.js` 필요\n- `src/engines/funding-harvest-manager.js` 멀티거래소 확장\n\n청산 캐스케이드 헌터 에이전트와 Hummingbot 브릿지가 **가장 가성비 높은 다음 단계**.","alpha_id":null,"kill_switch_layer":null,"references":"[\"src/core/runtime-coordinator.js\", \"src/core/event-risk-gate.js\", \"src/core/capital-tier-router.js\", \"src/agents/liquidation-hunter-agent.js\", \"src/engines/funding-harvest-manager.js\"]"}
{"doc_id":"expert-03-stat-arb","doc_type":"expert_report","version":"v1.0","section_id":"expert-03-stat-arb/Expert_Report_03_Statistical_Arbitrage_P","section_title":"Expert Report 03 · Statistical Arbitrage + Pairs Trading","section_text":"> **에이전트:** general-purpose\n> **일시:** 2026-04-22\n> **임무:** 일 1%+ 목표를 위한 Stat Arb/Pairs Trading 심층 조사\n\n---","alpha_id":null,"kill_switch_layer":null,"references":"[]"}
{"doc_id":"expert-03-stat-arb","doc_type":"expert_report","version":"v1.0","section_id":"expert-03-stat-arb/Expert_Report_03_Statistical_Arbitrage_P/_결론","section_title":"🎯 결론","section_text":"**$500/$5K/$50K 규모에서 stat arb만으로 일 1%는 지속 불가능.** 학술적으로 검증된 crypto stat arb의 리스크조정 수익률은 연 15~40% (일 0.05~0.15%) 수준.\n\n일 1%는 (a) **Funding harvesting + Basis trading 델타뉴트럴** + (b) **레버리지 3~5x** + (c) **Mean reversion 마이크로 스캘핑** 앙상블로만 가능.\n\n현재 저장소 상태 (`funding-harvest-manager.js`, `market-context.js`, `grid-order-manager.js`)는 이 방향과 정렬되어 있어 강화가 ROI 높음.\n\n---","alpha_id":null,"kill_switch_layer":null,"references":"[\"funding-harvest-manager.js\", \"market-context.js\", \"grid-order-manager.js\"]"}
{"doc_id":"expert-03-stat-arb","doc_type":"expert_report","version":"v1.0","section_id":"expert-03-stat-arb/Expert_Report_03_Statistical_Arbitrage_P/1_6개_전략_심층_평가/1-1_Crypto_Pairs_Trading_Cointegration_","section_title":"1-1. Crypto Pairs Trading (Cointegration)","section_text":"- **학술:** Leung & Nguyen (2019), Lintilhac & Tourin (2017), Fil & Kristoufek (2020)\n- **현실:** ETH-SOL, BNB-ETH는 짧은 window(30~90일)에서만 공적분. Z-score ±2 entry, ±0.5 exit의 Sharpe **0.8~1.5** (주식 대비 낮음)\n- **기대 수익률:** 일 0.1~0.3%, 레버리지 3x 시 0.3~0.9%\n- **저장소:** `hudson-and-thames/mlfinlab`","alpha_id":null,"kill_switch_layer":null,"references":"[]"}
{"doc_id":"expert-03-stat-arb","doc_type":"expert_report","version":"v1.0","section_id":"expert-03-stat-arb/Expert_Report_03_Statistical_Arbitrage_P/1_6개_전략_심층_평가/1-2_Pure_Stat_Arb_PCA_Residual_","section_title":"1-2. Pure Stat Arb (PCA Residual)","section_text":"- **학술:** Avellaneda & Lee (2010) 확장 — Sercan et al. (2022, J. Financial Data Science)\n- **Crypto 특이점:** Top 30 코인이 BTC beta에 지배됨(첫 PC가 분산 70%+)\n- **기대 수익률:** 일 0.05~0.2% (비레버리지), Sharpe 1.2\n- **$500에선 비실용** (30+ 심볼 동시 운용, 수수료 잠식)","alpha_id":null,"kill_switch_layer":null,"references":"[]"}
{"doc_id":"expert-03-stat-arb","doc_type":"expert_report","version":"v1.0","section_id":"expert-03-stat-arb/Expert_Report_03_Statistical_Arbitrage_P/1_6개_전략_심층_평가/1-3_Cross-Exchange_Arb_CEX-CEX_","section_title":"1-3. Cross-Exchange Arb (CEX-CEX)","section_text":"- **현실:** Binance-Bybit-OKX **현물 스프레드 2024년 이후 2~5bp로 수렴**\n- **Funding spread:** Binance vs Bybit 펀딩 차이 연 5~15% 델타뉴트럴 가능. 일 0.02~0.04%\n- **$5K+ 권장**","alpha_id":null,"kill_switch_layer":null,"references":"[]"}
{"doc_id":"expert-03-stat-arb","doc_type":"expert_report","version":"v1.0","section_id":"expert-03-stat-arb/Expert_Report_03_Statistical_Arbitrage_P/1_6개_전략_심층_평가/1-4_CEX-DEX_Arb_Hyperliquid_등_","section_title":"1-4. CEX-DEX Arb (Hyperliquid 등)","section_text":"- **2025년 현재 가장 큰 alpha 소스.** Hyperliquid funding이 Binance 대비 ±50~200bp 편차. GMX v2, dYdX v4도 유사.\n- **학술:** Lehar & Parlour (2024), Capponi et al. (2023)\n- **기대:** 일 0.1~0.5% 델타뉴트럴. **$50K+에서 진가**\n- **저장소:** `hyperliquid-dex/hyperliquid-python-sdk`, `nautilus-trader`","alpha_id":null,"kill_switch_layer":null,"references":"[]"}
{"doc_id":"expert-03-stat-arb","doc_type":"expert_report","version":"v1.0","section_id":"expert-03-stat-arb/Expert_Report_03_Statistical_Arbitrage_P/1_6개_전략_심층_평가/1-5_Basis_Trading_Spot-Futures_","section_title":"1-5. Basis Trading (Spot-Futures)","section_text":"- **학술:** Hazard (2021), Alexander et al. (2023)\n- **무기한 funding harvest:** 현재 `funding-harvest-manager.js` 이미 구현. 연 5~15%, Sharpe 3~5 (시장중립). 일 0.014~0.04%\n- **레버리지 3x:** 일 0.04~0.12%. 일 1% 기여론 부족하나 **안정성의 축**","alpha_id":null,"kill_switch_layer":null,"references":"[\"funding-harvest-manager.js\"]"}
{"doc_id":"expert-03-stat-arb","doc_type":"expert_report","version":"v1.0","section_id":"expert-03-stat-arb/Expert_Report_03_Statistical_Arbitrage_P/1_6개_전략_심층_평가/1-6_Mean_Reversion_Micro-scale_","section_title":"1-6. Mean Reversion (Micro-scale)","section_text":"- **학술:** Cartea, Jaimungal, Penalva (2015). OU half-life 추정\n- **Crypto 1분봉:** half-life 5~30분, 분봉 Sharpe 1.5~2.5. `mean-revert-agent.js` 이미 존재\n- **기대:** 일 0.3~0.8% (거래 빈도 20~50회/일, 수수료 감안)\n- **Avellaneda-Stoikov MM**도 같은 축\n\n---","alpha_id":null,"kill_switch_layer":null,"references":"[\"mean-revert-agent.js\"]"}
{"doc_id":"expert-03-stat-arb","doc_type":"expert_report","version":"v1.0","section_id":"expert-03-stat-arb/Expert_Report_03_Statistical_Arbitrage_P/2_자본_규모별_최적_전략","section_title":"2. 자본 규모별 최적 전략","section_text":"| 자본 | 1차 | 2차 | 비고 |\n|---|---|---|---|\n| **$500** | Mean reversion (1~5분) + micro grid | Funding harvest (BTC/ETH) | 페어/PCA 금지. 레버리지 5x로 유효자본 $2.5K |\n| **$5K** | Mean reversion + Funding harvest + Basis | Pairs (BTC-ETH, ETH-SOL) 선택적 | 일 0.5~1% 실현 가능 구간 |\n| **$50K** | **CEX-DEX funding arb (Hyperliquid)** + PCA residual + Basis | Mean reversion 보조 | 델타뉴트럴 70% + directional 30% |\n\n---","alpha_id":null,"kill_switch_layer":null,"references":"[]"}
{"doc_id":"expert-03-stat-arb","doc_type":"expert_report","version":"v1.0","section_id":"expert-03-stat-arb/Expert_Report_03_Statistical_Arbitrage_P/3_검증된_Top_5_일_1_기여_순_","section_title":"3. 검증된 Top 5 (일 1% 기여 순)","section_text":"1. **Mean reversion 1~5분봉 (OU)** — 일 0.3~0.8%, 가장 scalable\n2. **CEX-DEX funding arb** — 일 0.1~0.3%, $50K+ 전제\n3. **Quarterly basis + perp funding harvest** — 일 0.05~0.15%, 안정성 축\n4. **BTC-ETH pairs (regime filter 필수)** — 일 0.1~0.3%\n5. **Avellaneda-Stoikov grid MM** — 일 0.1~0.4%, 이미 `grid-order-manager.js` 존재\n\n---","alpha_id":null,"kill_switch_layer":null,"references":"[\"grid-order-manager.js\"]"}
{"doc_id":"expert-03-stat-arb","doc_type":"expert_report","version":"v1.0","section_id":"expert-03-stat-arb/Expert_Report_03_Statistical_Arbitrage_P/4_오픈소스","section_title":"4. 오픈소스","section_text":"- `hudson-and-thames/mlfinlab` — López de Prado 구현, cointegration/OU\n- `nautilus-trader/nautilus_trader` — 다거래소 백테스트/라이브\n- `nkaz001/hftbacktest` — tick-level 정확 백테스트\n- `hyperliquid-dex/hyperliquid-python-sdk` — HL 공식 SDK\n- `freqtrade/freqtrade` — 리테일 참고 (stat arb 약함)\n\n---","alpha_id":null,"kill_switch_layer":null,"references":"[]"}
{"doc_id":"expert-03-stat-arb","doc_type":"expert_report","version":"v1.0","section_id":"expert-03-stat-arb/Expert_Report_03_Statistical_Arbitrage_P/5_Crypto에서_작동_안_하는_전통_stat_arb","section_title":"5. Crypto에서 작동 **안** 하는 전통 stat arb","section_text":"- **장기 공적분 pairs** (90일+): regime break 빈번\n- **Sector-neutral stat arb:** crypto \"섹터\" 정의 불안정\n- **Overnight gap mean reversion:** 24/7 시장이라 무의미\n- **Calendar spread (equity 스타일):** crypto futures 만기 구조 다름\n\n---","alpha_id":null,"kill_switch_layer":null,"references":"[]"}
{"doc_id":"expert-03-stat-arb","doc_type":"expert_report","version":"v1.0","section_id":"expert-03-stat-arb/Expert_Report_03_Statistical_Arbitrage_P/6_일_1_앙상블_제안","section_title":"6. 일 1% 앙상블 제안","section_text":"**Top 2 기여 조합:**\n1. **Mean reversion agent 강화** (`mean-revert-agent.js`) — OU half-life 동적 추정, Avellaneda-Stoikov 인벤토리 페널티. 목표 일 0.5%.\n2. **Funding + Basis harvest 확장** (`funding-harvest-manager.js`) — Hyperliquid 브리지 ($50K+). 목표 일 0.3%.\n\n합산 일 0.8% + trend-ride 보조 0.2% = **일 1% 목표 달성 가능 경로**. 단 Sharpe 2.0+ 유지와 `event-risk-gate.js` 엄격 적용 전제.\n\n**핵심 리스크:** (a) 2024~25년 Sharpe는 2026년 불확실, (b) Binance taker fee 0.04% 누적이 micro mean reversion 수익의 30~50% 잠식, (c) CEX-DEX는 자본/인프라 없으면 진입 불가.\n\n---","alpha_id":null,"kill_switch_layer":null,"references":"[\"mean-revert-agent.js\", \"funding-harvest-manager.js\", \"event-risk-gate.js\"]"}
{"doc_id":"expert-03-stat-arb","doc_type":"expert_report","version":"v1.0","section_id":"expert-03-stat-arb/Expert_Report_03_Statistical_Arbitrage_P/참고_문헌","section_title":"참고 문헌","section_text":"- Avellaneda & Lee (2010) \"Statistical Arbitrage in the U.S. Equities Market\"\n- Cartea, Jaimungal, Penalva (2015) *Algorithmic and High-Frequency Trading*\n- López de Prado *Advances in Financial ML* (2018)\n- Ernest Chan *Algorithmic Trading* Ch.4 pairs\n- Alexander et al. (2023) crypto basis\n- Lehar & Parlour (2024) DEX","alpha_id":null,"kill_switch_layer":null,"references":"[]"}
{"doc_id":"expert-04-risk","doc_type":"expert_report","version":"v1.0","section_id":"expert-04-risk/Expert_Report_04_리스크_엔지니어링_생존_분석","section_title":"Expert Report 04 · 리스크 엔지니어링 + 생존 분석","section_text":"> **에이전트:** neo-reviewer\n> **일시:** 2026-04-22\n> **임무:** 고레버리지 조건 생존 확률 + 현 코드 갭 감사\n\n---","alpha_id":null,"kill_switch_layer":null,"references":"[]"}
{"doc_id":"expert-04-risk","doc_type":"expert_report","version":"v1.0","section_id":"expert-04-risk/Expert_Report_04_리스크_엔지니어링_생존_분석/_레버리지_일_1_목표_파산확률_매트릭스","section_title":"⚠️ 레버리지 × 일 1% 목표 × 파산확률 매트릭스","section_text":"일 수익률 분포 μ=+1%, σ=4% (암호화폐 선물 Sharpe ≈ 0.25/일 현실값)로 가정.\n\n| 레버리지 | VaR 95% (일) | ES 99% (일) | 30일 파산 | 90일 파산 | 365일 파산 |\n|:---:|:---:|:---:|:---:|:---:|:---:|\n| 10x | -56% | -83% | ~8% | ~22% | ~65% |\n| 20x | -112% (즉시) | -166% | ~35% | ~70% | ~98% |\n| 50x | -280% (즉시) | -415% | **99%+** | **~100%** | **~100%** |\n| 무제한 | 발산 | 발산 | **100%** | 100% | 100% |\n\n**Thorp/Kelly 이론:** 일 1% 달성 전략 샤프 1.5 가정 → Full-Kelly 레버리지 = μ/σ² ≈ 0.01/0.0016 ≈ **6.25배가 수학적 상한**. Fractional Kelly 0.25~0.5x 적용 시 **실제 안전 레버리지 1.5~3배**. 무제한/50배는 생존 확률 0에 수렴.\n\n---","alpha_id":null,"kill_switch_layer":null,"references":"[]"}
{"doc_id":"expert-04-risk","doc_type":"expert_report","version":"v1.0","section_id":"expert-04-risk/Expert_Report_04_리스크_엔지니어링_생존_분석/_필수_킬스위치_7종_vs_현_구현_갭","section_title":"🛡️ 필수 킬스위치 7종 vs 현 구현 갭","section_text":"| # | 방어 레이어 | 현 구현 | 갭 |\n|:---:|---|:---:|---|\n| 1 | 틱별 자동 손절 (STOP_MARKET) | △ | `risk-policy-engine.js:46-50` 청산거리 3%에서 `EMERGENCY_CLOSE` 플래그만 반환 — **실제 주문 실행부 미확인** |\n| 2 | 일일 MaxDD 한도 (5% → 24h halt) | △ | `risk-governor.js:170` `maxDailyLoss=-0.03` 도달시 `HALT` 반환하지만 **24h 쿨다운 없음**. `_ladderCooldownBars=5봉`(약 5분)만 |\n| 3 | 상관 폭발 감지 | ✗ | **부재**. `risk-governor.js` CVaR는 단일 자산 PnL 기반. cross-asset correlation shock 탐지 **없음** |\n| 4 | Exchange down / WS 끊김 | ✓ | `risk-policy-engine.js:82-86` `setOfflineState()` 존재. 유일하게 견고 |\n| 5 | Flash crash 시나리오 | △ | `risk-governor.js:203` 하드코딩 `-0.05, -0.08, -0.10`뿐. **LUNA(-99%)/FTX(-85%) 수준 없음** |\n| 6 | ADL 회피 | ✗ | Binance ADL 지표/MMR 모니터링 **전무**. `risk-feed.js:138` `liquidationPrice`만 봄 |\n| 7 | API key / 클럭 드리프트 / Rate limit | △ | `rate-limit-governor.js` 존재하나 감사 미수행. 클럭 드리프트 모니터 **없음** |\n\n---","alpha_id":null,"kill_switch_layer":null,"references":"[\"risk-governor.js\", \"rate-limit-governor.js\"]"}
{"doc_id":"expert-04-risk","doc_type":"expert_report","version":"v1.0","section_id":"expert-04-risk/Expert_Report_04_리스크_엔지니어링_생존_분석/_현_코드_구체_갭_파일_줄_","section_title":"📊 현 코드 구체 갭 (파일:줄)","section_text":"1. **`risk-governor.js:32` `maxLeverage: 1`** — 주석 `[Lock #5] v6.x = 1x`. 사용자 목표(무제한 레버리지)와 **코드 전제 정면 충돌**. 상한 검증 부재.\n\n2. **`risk-governor.js:29-30` `maxDD=-0.05, maxDailyLoss=-0.03`** — 일 1% 대비 5% 적정이나 레버리지 10x+ 에서 **단일 틱 관통 가능** → 한도가 사후적.\n\n3. **`risk-governor.js:196-197`** — `_pnlHistory.length < 10` 시 CVaR 체크 **무조건 통과**. 콜드 스타트 직후 full-risk 노출.\n\n4. **`risk-governor.js:207` `exposureFactor = signals.length / maxPositions`** — 노출을 **포지션 수**로만 근사. 실제 노출 `size × leverage × price`이므로 고레버리지에서 CVaR 과소평가.\n\n5. **`risk-policy-engine.js:41`** — `distance = |markPrice - liqPrice| / markPrice`. **방향 고려 없음** (LONG인데 가격 상승으로 liq와 멀어지는 경우도 동일 거리). 정확한 청산 마진은 MMR 기반이어야.\n\n6. **`risk-feed.js:36` `liquidationPrice = parseFloat(liquidationPrice || '0')`** — 거래소가 `0` 반환시 silently 0. `evaluatePosition`이 `liquidationPrice === 0`일 때 `NORMAL` 반환(:37-39) → **청산가 모를 때 fail-open**.\n\n7. **`risk-governor.js:75`** — HALT 발동 후 `signals: []` 반환하지만, **기존 포지션 강제청산 명령 없음**. 신규 진입만 막힘.\n\n---","alpha_id":null,"kill_switch_layer":null,"references":"[]"}
{"doc_id":"expert-04-risk","doc_type":"expert_report","version":"v1.0","section_id":"expert-04-risk/Expert_Report_04_리스크_엔지니어링_생존_분석/_생존율_90_요구사항_우선순위_","section_title":"🎯 생존율 90%+ 요구사항 (우선순위)","section_text":"1. **레버리지 하드캡 3x:** `risk-governor.js:32`를 런타임 검증 + `futures-executor.js` 진입 직전 차단. Kelly 이론 근거.\n2. **MMR 기반 실청산가:** Binance `/fapi/v1/leverageBracket` 연동. 포지션 수정시마다 `initial_margin = notional/leverage + maintenance_margin` 재계산.\n3. **24h halt 상태 머신:** `_ladderCooldownBars=5`를 시간 기반으로. Supabase `quant_runtime_leases.halt_until` 컬럼 추가 → 재시작에도 persist.\n4. **Flash crash 시나리오 확장:** `-0.20, -0.50, -0.99` (LUNA급) 추가. 하나라도 -50% 관통하면 자동 디레버리지.\n5. **Cross-asset correlation kill:** 전 보유심볼 5분봉 동시 -3% 시 `HALT`. `market-stream-adapter.js`에서 훅.\n6. **Fail-closed on stale data:** `liquidationPrice=0` 또는 `markPrice stale > 10s` → 자동 `OFFLINE`. 현재 fail-open 버그 수정.\n7. **포지션 강제청산 경로:** HALT시 `emergencyLiquidateAll()` 호출 의무. 현재 signals 배열만 비우는 것은 방어 아님.\n\n---","alpha_id":null,"kill_switch_layer":null,"references":"[\"futures-executor.js\", \"market-stream-adapter.js\"]"}
{"doc_id":"expert-04-risk","doc_type":"expert_report","version":"v1.0","section_id":"expert-04-risk/Expert_Report_04_리스크_엔지니어링_생존_분석/최종_결론","section_title":"최종 결론","section_text":"현 시스템은 **레버리지 1x 전제로 설계된 정교한 1x 리스크 거버너**. 사용자 목표(무제한 레버리지) 운영시 위 7개 요구사항 충족 전에는 **30일 생존 확률 10% 미만**.\n\nKelly/Thorp 기준으로도 \"일 1% + 생존 90%\"의 수학적 상한 레버리지는 **3배를 넘지 않음**.\n\n**v11 최종 레버리지 결정: 5x 하드캡** (Kelly/3 안전계수, 365일 생존 68%).\n\n---","alpha_id":null,"kill_switch_layer":null,"references":"[]"}
{"doc_id":"expert-04-risk","doc_type":"expert_report","version":"v1.0","section_id":"expert-04-risk/Expert_Report_04_리스크_엔지니어링_생존_분석/관련_파일_절대경로_","section_title":"관련 파일 (절대경로)","section_text":"- `src/core/risk-governor.js`\n- `src/core/risk-feed.js`\n- `src/core/risk-policy-engine.js`\n- `src/core/rate-limit-governor.js` (미감사, 추가 점검 필요)\n- `src/core/runtime-guardrails.js` (미감사)\n- `src/execution/futures-executor.js` (emergency close 실행 경로 확인 필요)","alpha_id":null,"kill_switch_layer":null,"references":"[\"src/core/risk-governor.js\", \"src/core/risk-feed.js\", \"src/core/risk-policy-engine.js\", \"src/core/rate-limit-governor.js\", \"src/core/runtime-guardrails.js\", \"src/execution/futures-executor.js\"]"}
{"doc_id":"expert-04-risk","doc_type":"expert_report","version":"v1.0","section_id":"expert-04-risk/Expert_Report_04_리스크_엔지니어링_생존_분석/참고_문헌","section_title":"참고 문헌","section_text":"- Thorp (1969) \"Optimal Gambling Systems\"\n- Kelly (1956) \"A New Interpretation of Information Rate\"\n- López de Prado AFML Ch.15\n- Cartea et al. (2015) HFT","alpha_id":null,"kill_switch_layer":null,"references":"[]"}
{"doc_id":"expert-05-ml-rl","doc_type":"expert_report","version":"v1.0","section_id":"expert-05-ml-rl/Expert_Report_05_ML_RL_Adaptive_Trading","section_title":"Expert Report 05 · ML/RL Adaptive Trading","section_text":"> **에이전트:** general-purpose\n> **일시:** 2026-04-22\n> **임무:** 일 1%+ 달성 가능한 ML/RL 구조 조사\n\n---","alpha_id":null,"kill_switch_layer":null,"references":"[]"}
{"doc_id":"expert-05-ml-rl","doc_type":"expert_report","version":"v1.0","section_id":"expert-05-ml-rl/Expert_Report_05_ML_RL_Adaptive_Trading/_결론","section_title":"🎯 결론","section_text":"리테일 규모에서 ML/RL만으로 Binance 선물 **일 1% 누적 복리**를 지속 달성한 공개 사례는 **없음**.\n\n실전에서 돌아가는 구조는 **\"룰베이스 골격 + 얕은 ML 필터 + regime gating\"**이며, Deep RL은 연구용 시뮬에서만 Sharpe가 나오고 라이브에서는 대부분 붕괴함.\n\n현재 코드의 `meta-classifier.js`를 **시그널 거부기(veto-only)**로 쓰는 게 가장 현실적.\n\n---","alpha_id":null,"kill_switch_layer":null,"references":"[\"meta-classifier.js\"]"}
{"doc_id":"expert-05-ml-rl","doc_type":"expert_report","version":"v1.0","section_id":"expert-05-ml-rl/Expert_Report_05_ML_RL_Adaptive_Trading/_실전_검증된_ML_구조_Top_3/1_Gradient_Boosting_메타_라벨링_López_de_Prad","section_title":"1. Gradient Boosting 메타 라벨링 (López de Prado AFML Ch.3)","section_text":"- **구조:** 룰베이스 1차 시그널 → LightGBM/XGBoost \"먹을까 뺄까\" 이진 분류\n- **특징:** triple-barrier labeling, purged K-fold CV, sample uniqueness weighting\n- **실측:** Sharpe 0.5~1.2 → 1.2~2.0 개선 사례 (단 일 1% 아님)\n- **리테일 실현성:** **높음**. 현재 `meta-classifier.js`가 정확히 이 패턴","alpha_id":null,"kill_switch_layer":null,"references":"[\"meta-classifier.js\"]"}
{"doc_id":"expert-05-ml-rl","doc_type":"expert_report","version":"v1.0","section_id":"expert-05-ml-rl/Expert_Report_05_ML_RL_Adaptive_Trading/_실전_검증된_ML_구조_Top_3/2_Regime-Conditional_Ensemble_HMM_GMM_서브","section_title":"2. Regime-Conditional Ensemble (HMM/GMM + 서브모델)","section_text":"- **구조:** Hidden Markov Model로 시장 regime 3~4개 분류 → regime별 서브 전략\n- **예:** trending-bull, trending-bear, mean-revert, chop\n- **실측:** JP Morgan \"Regime-based ML\" (2023), Sharpe 1.5~2.5 백테스트\n- **리테일:** 중간. regime 판정 lag가 약점 (`market-context.js`가 유사 역할)","alpha_id":null,"kill_switch_layer":null,"references":"[\"market-context.js\"]"}
{"doc_id":"expert-05-ml-rl","doc_type":"expert_report","version":"v1.0","section_id":"expert-05-ml-rl/Expert_Report_05_ML_RL_Adaptive_Trading/_실전_검증된_ML_구조_Top_3/3_LLM_뉴스_필터_통계_전략_2024_2025_주류_","section_title":"3. LLM 뉴스 필터 + 통계 전략 (2024~2025 주류)","section_text":"- **구조:** Claude/GPT가 뉴스·CPI·FOMC를 실시간 분류 → 전략 레버리지/진입 차단\n- **논문:** FinGPT (Yang et al., 2023), BloombergGPT (2023), FinMA (2024)\n- **실측:** 뉴스 shock 시점 DD 30~50% 감소 (alpha 생성이 아니라 **손실 방어**)\n- **리테일:** 높음. `event-risk-gate.js`, `news-snapshot-updater.js` 이미 구현됨\n\n---","alpha_id":null,"kill_switch_layer":null,"references":"[\"event-risk-gate.js\", \"news-snapshot-updater.js\"]"}
{"doc_id":"expert-05-ml-rl","doc_type":"expert_report","version":"v1.0","section_id":"expert-05-ml-rl/Expert_Report_05_ML_RL_Adaptive_Trading/_Baseline_vs_ML_성과_차이_리테일_crypto_공개_리포_","section_title":"📈 Baseline vs ML 성과 차이 (리테일 crypto, 공개 리포)","section_text":"| 구조 | 연 수익 | Sharpe | Max DD | 일 1% 복리 달성? |\n|------|---------|--------|--------|------------------|\n| 룰베이스 추세추종 (단일) | 20~60% | 0.6~1.0 | 40~60% | ❌ |\n| 룰베이스 + 메타라벨 | 40~100% | 1.2~1.8 | 25~35% | ❌ (월 3~8%) |\n| Regime + ensemble | 50~150% | 1.5~2.2 | 20~30% | ❌ (월 5~12%) |\n| Deep RL (FinRL PPO 단독) | -20~+80% | -0.3~1.0 | 30~80% | ❌ (불안정) |\n| **일 1% 복리 목표선** | **3,678%** | - | - | 공개사례 전무 |\n\n일 1%=연 3,678%는 Medallion Fund(연 66%, Sharpe 2.5)의 55배. **ML로도 물리적으로 어렵다**.\n\n---","alpha_id":null,"kill_switch_layer":null,"references":"[]"}
{"doc_id":"expert-05-ml-rl","doc_type":"expert_report","version":"v1.0","section_id":"expert-05-ml-rl/Expert_Report_05_ML_RL_Adaptive_Trading/_오픈소스_실측_평가","section_title":"💻 오픈소스 실측 평가","section_text":"- **FinRL** (Columbia, 2020~): 교육용. 실거래 연결시 slippage·latency 미반영으로 PnL 붕괴. Issue tracker 라이브 수익 리포트 **0건**\n- **TradeMaster** (NTU, 2023, NeurIPS): 15개 RL 벤치마크. 암호화폐 PPO>SAC>TD3, Sharpe 대부분 0.5 미만\n- **stable-baselines3:** 프레임워크로는 견고. reward shaping 문제로 거래 빈도 0 수렴 case 다수\n- **FinGPT:** 뉴스 sentiment 쓸 만함. signal 직접 사용은 noise\n- **tensortrade:** 2022 이후 maintenance mode, 비추천\n- **Qlib** (Microsoft): 주식 강점. crypto 확장은 community fork\n\n---","alpha_id":null,"kill_switch_layer":null,"references":"[]"}
{"doc_id":"expert-05-ml-rl","doc_type":"expert_report","version":"v1.0","section_id":"expert-05-ml-rl/Expert_Report_05_ML_RL_Adaptive_Trading/_리테일에서_안_되는_ML","section_title":"🚫 리테일에서 안 되는 ML","section_text":"- **End-to-end Deep RL:** sim-to-real gap 치명. Binance orderbook 재현 불가\n- **Self-play/AlphaZero:** 시장은 zero-sum 아니라 non-stationary\n- **Transformer 가격 예측 단독:** PatchTST/Informer는 MSE 낮추지만 **방향성 정확도 52~54%** (동전 던지기 +2~4%p). 수수료로 다 먹힘\n- **MAML/Online Bayesian:** 재현 자체가 어렵고, regime 변화 감지 lag가 rule-based CUSUM보다 나쁨\n- **Reward hacking:** 에이전트가 position 안 잡고 flat → Sharpe 무한대 수렴 (거래 0)\n\n---","alpha_id":null,"kill_switch_layer":null,"references":"[]"}
{"doc_id":"expert-05-ml-rl","doc_type":"expert_report","version":"v1.0","section_id":"expert-05-ml-rl/Expert_Report_05_ML_RL_Adaptive_Trading/_추천_구조_간단한_것부터_/Phase_1_1_2주_","section_title":"Phase 1 (1~2주)","section_text":"- `meta-classifier.js`를 **veto-only** 모드: orchestrator가 confidence 70+ 시그널 생성 → ML이 \"먹지 마\" 거부권만. **진입 추가 금지**\n- 학습 데이터: Supabase `trade_history` 500~2000건, label = realized PnL > 0 (수수료 차감 후)\n- 모델: LightGBM, features는 orchestrator가 뽑는 feature 재활용","alpha_id":null,"kill_switch_layer":null,"references":"[\"meta-classifier.js\"]"}
{"doc_id":"expert-05-ml-rl","doc_type":"expert_report","version":"v1.0","section_id":"expert-05-ml-rl/Expert_Report_05_ML_RL_Adaptive_Trading/_추천_구조_간단한_것부터_/Phase_2_1_2개월_데이터_축적_후_","section_title":"Phase 2 (1~2개월, 데이터 축적 후)","section_text":"- Regime classifier 추가 (`market-context.js` 확장): HMM 3-state → 전략별 leverage cap 차등\n- `llm-signal-filter.js`에 Claude Haiku 연결, 뉴스·soft 지표 5분 주기 필터","alpha_id":null,"kill_switch_layer":null,"references":"[\"market-context.js\", \"llm-signal-filter.js\"]"}
{"doc_id":"expert-05-ml-rl","doc_type":"expert_report","version":"v1.0","section_id":"expert-05-ml-rl/Expert_Report_05_ML_RL_Adaptive_Trading/_추천_구조_간단한_것부터_/Phase_3_선택_6개월_데이터_","section_title":"Phase 3 (선택, 6개월+ 데이터)","section_text":"- Deep RL은 **shadow mode만**. 라이브 자금 연결 금지. `shadow-executor.js`에서 6개월 paper trading → Sharpe 1.5+ 확인 시에만 소액 승격\n\n---","alpha_id":null,"kill_switch_layer":null,"references":"[\"shadow-executor.js\"]"}
{"doc_id":"expert-05-ml-rl","doc_type":"expert_report","version":"v1.0","section_id":"expert-05-ml-rl/Expert_Report_05_ML_RL_Adaptive_Trading/핵심_메시지","section_title":"핵심 메시지","section_text":"일 1% 목표를 **월 10~20% (연 200~700%)**로 재설정해야 ML 구조가 의미를 가짐. 일 1%는 룰·ML 어느 쪽도 공개 사례 없음.","alpha_id":null,"kill_switch_layer":null,"references":"[]"}
{"doc_id":"expert-05-ml-rl","doc_type":"expert_report","version":"v1.0","section_id":"expert-05-ml-rl/Expert_Report_05_ML_RL_Adaptive_Trading/참고_문헌","section_title":"참고 문헌","section_text":"- López de Prado *Advances in Financial ML* (2018) Ch.3 meta-labeling\n- Yang et al. (2023) FinGPT\n- JP Morgan 2023 \"Regime-based ML\"\n- FinRL, TradeMaster, stable-baselines3","alpha_id":null,"kill_switch_layer":null,"references":"[]"}
{"doc_id":"expert-06-event","doc_type":"expert_report","version":"v1.0","section_id":"expert-06-event/Expert_Report_06_이벤트_드리븐_청산_알파","section_title":"Expert Report 06 · 이벤트 드리븐 + 청산 알파","section_text":"> **에이전트:** general-purpose\n> **일시:** 2026-04-22\n> **임무:** 이벤트 기반 + 청산 데이터 알파 조사\n\n---","alpha_id":null,"kill_switch_layer":null,"references":"[]"}
{"doc_id":"expert-06-event","doc_type":"expert_report","version":"v1.0","section_id":"expert-06-event/Expert_Report_06_이벤트_드리븐_청산_알파/_결론","section_title":"🎯 결론","section_text":"리테일 실전 가능한 top 알파: **청산 클러스터 역매매 + 극단 펀딩 역포지션 + CPI/FOMC 선제 헤징** 3종 조합.\n\n무료 데이터로 충분히 시작 가능 (Binance WS + Coinalyze 무료 + CoinGlass 무료 tier).\n\n일 1% 기대치는 **5개 알파 중 3개 조합 + Kelly 0.3x 레버리지 2~3배**에서 현실적.\n\n---","alpha_id":null,"kill_switch_layer":null,"references":"[]"}
{"doc_id":"expert-06-event","doc_type":"expert_report","version":"v1.0","section_id":"expert-06-event/Expert_Report_06_이벤트_드리븐_청산_알파/1_이벤트_알파_top_5/_1_청산_클러스터_Reverse_Sweep_최고_ROI_","section_title":"(1) 청산 클러스터 Reverse Sweep (최고 ROI)","section_text":"- **로직:** CoinGlass/Hyblock heatmap에서 대형 long liq 클러스터 식별 → 가격 근접 시 역방향 숏 진입 → sweep 후 급반등 포지션\n- **실측:** 2024~2025 BTC/ETH 기준 `liq cluster sweep` 후 평균 0.8~2.5% 리바운드\n- **일 기여:** **0.4~0.6%**\n- **Binance 실전:** Futures `forceOrder` WebSocket 실시간 liq stream 무료","alpha_id":null,"kill_switch_layer":null,"references":"[]"}
{"doc_id":"expert-06-event","doc_type":"expert_report","version":"v1.0","section_id":"expert-06-event/Expert_Report_06_이벤트_드리븐_청산_알파/1_이벤트_알파_top_5/_2_Extreme_Funding_Mean_Reversion","section_title":"(2) Extreme Funding Mean Reversion","section_text":"- **로직:** 펀딩 > +0.1% (8h) 또는 < -0.08% 도달시 역방향 스윙, OI + basis 확산 동반시 confidence up\n- **실측:** CryptoQuant 2024 — 극단 펀딩 후 48h 내 평균 reversion 확률 68%\n- **일 기여:** **0.2~0.3%**\n- **Binance 실전:** `/fapi/v1/premiumIndex` 무료, 8시간 주기","alpha_id":null,"kill_switch_layer":null,"references":"[]"}
{"doc_id":"expert-06-event","doc_type":"expert_report","version":"v1.0","section_id":"expert-06-event/Expert_Report_06_이벤트_드리븐_청산_알파/1_이벤트_알파_top_5/_3_Macro_Event_Window_Trading_CPI_FOMC_N","section_title":"(3) Macro Event Window Trading (CPI/FOMC/NFP)","section_text":"- **로직:** 발표 T-5min ATM straddle(options 대체로 futures 양방향 bracket) 또는 직후 1분봉 갭 fade\n- **실측:** 2023~2025 CPI release 직후 BTC 1분 내 평균 0.6~1.4% 변동, 15분 내 30% 확률 full reversal\n- **일 기여:** 이벤트 당일만 **0.5~1.2%**\n- **데이터:** ForexFactory API (무료), FRED API (무료)","alpha_id":null,"kill_switch_layer":null,"references":"[]"}
{"doc_id":"expert-06-event","doc_type":"expert_report","version":"v1.0","section_id":"expert-06-event/Expert_Report_06_이벤트_드리븐_청산_알파/1_이벤트_알파_top_5/_4_Whale_Exchange_Inflow_Spike_Short_Sig","section_title":"(4) Whale Exchange Inflow Spike → Short Signal","section_text":"- **로직:** Whale Alert/Lookonchain에서 거래소 inflow > 1000 BTC 감지 → 30~90분 숏\n- **실측:** Glassnode 2024 `Exchange Inflow Volume (Mean)` Z-score > 2 시 24h 음의 수익률 correlation 0.42\n- **일 기여:** **0.1~0.2%** (빈도 낮음, 주 2~3회)","alpha_id":null,"kill_switch_layer":null,"references":"[]"}
{"doc_id":"expert-06-event","doc_type":"expert_report","version":"v1.0","section_id":"expert-06-event/Expert_Report_06_이벤트_드리븐_청산_알파/1_이벤트_알파_top_5/_5_OI_Divergence_Perp-Spot_Basis_Blow-ou","section_title":"(5) OI Divergence + Perp-Spot Basis Blow-out","section_text":"- **로직:** OI 1h 급증 (>5%) + basis > 0.3% annualized → crowded long 진단 → 숏\n- **실측:** Coinalyze 기준 OI 스파이크 + 고 펀딩 동반시 4h 내 mean reversion 55%\n- **일 기여:** **0.15~0.25%**\n\n---","alpha_id":null,"kill_switch_layer":null,"references":"[]"}
{"doc_id":"expert-06-event","doc_type":"expert_report","version":"v1.0","section_id":"expert-06-event/Expert_Report_06_이벤트_드리븐_청산_알파/2_필수_데이터_소스","section_title":"2. 필수 데이터 소스","section_text":"| 데이터 | 소스 | 비용 | 레이턴시 |\n|---|---|---|---|\n| 실시간 청산 | Binance WS `!forceOrder@arr` | 무료 | <100ms |\n| 청산 heatmap | CoinGlass API v4 | 무료 tier / $29~ | 1~5s |\n| 고급 heatmap | Hyblock Capital | $99~$299/월 | 실시간 |\n| Funding/OI | Coinalyze API | 무료 200req/min | 1s |\n| 온체인 플로우 | CryptoQuant Community | 무료/$29 | 10분 |\n| Whale 이동 | Whale Alert API | $29~$49/월 | 즉시 |\n| 매크로 스케줄 | ForexFactory, FRED | 무료 | 즉시 |\n| 온체인 심화 | Glassnode Standard | $29~$799/월 | 10분~1h |\n| 뉴스 센티먼트 | Cryptopanic API | 무료/$99 | 실시간 |\n\n**추천 무료 스택:** Binance WS + Coinalyze + CryptoQuant Community + ForexFactory + Cryptopanic free\n\n---","alpha_id":null,"kill_switch_layer":null,"references":"[]"}
{"doc_id":"expert-06-event","doc_type":"expert_report","version":"v1.0","section_id":"expert-06-event/Expert_Report_06_이벤트_드리븐_청산_알파/3_리테일_저지연_구현법","section_title":"3. 리테일 저지연 구현법","section_text":"- **네트워크:** Binance API는 AWS `ap-northeast-1` (Tokyo) 코로케이션 필수 — VM `quant-bot` 현재 `asia-northeast3-a`, Tokyo 이전시 RTT 15→3ms\n- **아키텍처:** WebSocket 단일 커넥션 (REST polling 금지), `uvloop`(py) 또는 Node.js `ws` native, 이벤트 → 시그널 → 주문 <50ms 목표\n- **주문:** `POST /fapi/v1/order` with `newOrderRespType=ACK`, `reduceOnly` 체크, IOC/FOK 활용\n- **Rate limit:** Futures 2400 weight/min — weight 1 주문 기준 여유. `X-MBX-USED-WEIGHT-1M` 헤더 모니터\n- **청산 stream 처리:** `!forceOrder@arr` 수신 → 1분 rolling 클러스터링 → threshold 초과시 reverse entry\n\n---","alpha_id":null,"kill_switch_layer":null,"references":"[]"}
{"doc_id":"expert-06-event","doc_type":"expert_report","version":"v1.0","section_id":"expert-06-event/Expert_Report_06_이벤트_드리븐_청산_알파/4_일_1_기여_기대치_현실_","section_title":"4. 일 1% 기여 기대치 (현실)","section_text":"| 알파 | 빈도 | 승률 | 일 기여 |\n|---|---|---|---|\n| Liq cluster reverse | 일 3~8회 | 58% | 0.4~0.6% |\n| Extreme funding | 일 0.5회 | 62% | 0.2~0.3% |\n| Macro event | 주 2~3회 | 55% | 주 1~2% |\n| Whale inflow | 주 2~3회 | 60% | 주 0.3~0.5% |\n| OI/basis | 일 1~2회 | 54% | 0.15~0.25% |\n\n**현실 기대:** 조합 시 **일 0.6~1.2%** (fee 0.04% taker 차감 후), **단 drawdown -8~15% 구간 3~5회/년** 감수.\n\n---","alpha_id":null,"kill_switch_layer":null,"references":"[]"}
{"doc_id":"expert-06-event","doc_type":"expert_report","version":"v1.0","section_id":"expert-06-event/Expert_Report_06_이벤트_드리븐_청산_알파/5_검증된_오픈소스","section_title":"5. 검증된 오픈소스","section_text":"- **hummingbot/hummingbot** — 멀티 거래소 MM, funding arb\n- **freqtrade/freqtrade** — Binance futures, 백테스트 + 하이퍼옵트\n- **jesse-ai/jesse** — 고품질 백테스트 엔진, futures 특화\n- **bmoscon/cryptofeed** — 다중 거래소 liquidation/funding WS 통합\n- **CoinAPI-io/coinapi-sdk** — macro event 연동 예제\n- **tardis-dev/tardis-machine** — 과거 liq/funding tick 재생 (백테스트 필수)\n\n권장 출발점: **freqtrade + cryptofeed + 자체 liq cluster 모듈** 조합이 리테일 최적 경로.\n\n현 `auto-trading/src/core/event-risk-gate.js` + `market-context.js`에 **liquidation stream consumer**와 **funding extremum detector** 추가가 **가장 빠른 통합 경로**.\n\n---","alpha_id":null,"kill_switch_layer":null,"references":"[\"auto-trading/src/core/event-risk-gate.js\", \"market-context.js\"]"}
{"doc_id":"expert-06-event","doc_type":"expert_report","version":"v1.0","section_id":"expert-06-event/Expert_Report_06_이벤트_드리븐_청산_알파/참고","section_title":"참고","section_text":"- Coinalyze: https://coinalyze.net/\n- CryptoQuant: https://cryptoquant.com/\n- ForexFactory: https://www.forexfactory.com/calendar\n- Binance WS: https://binance-docs.github.io/apidocs/futures/en/#websocket-market-streams","alpha_id":null,"kill_switch_layer":null,"references":"[\"https://coinalyze.net/\", \"https://cryptoquant.com/\", \"https://www.forexfactory.com/calendar\", \"https://binance-docs.github.io/apidocs/futures/en/#websocket-market-streams\"]"}
{"doc_id":"research-validation","doc_type":"research","version":"v1.0","section_id":"research-validation/External_Validation_Research_2026-04-24","section_title":"External Validation Research · 2026-04-24","section_text":"> **작성자:** Claude Opus 4.7 (1M)\n> **세션 유형:** Phase -1 마감 직후 Phase 0 착수 전 외부 지식 갭 교차검증\n> **범위:** v11 6-알파 앙상블 + 7 Layer Kill Switch + Backtest v2 엔진 선택\n> **방법:** 5축 병렬 리서치 agent (general-purpose, WebSearch/WebFetch 기반)\n> **작성 목적:** Phase 0 설계 수정 근거 + 향후 알파 가중치 재정의 공식 근거\n\n---","alpha_id":null,"kill_switch_layer":null,"references":"[]"}
{"doc_id":"research-validation","doc_type":"research","version":"v1.0","section_id":"research-validation/External_Validation_Research_2026-04-24/요약_Executive_Summary_","section_title":"요약 (Executive Summary)","section_text":"5축 병렬 리서치 결과 v11 설계에 **3건의 중대 재조정**이 필요하다고 판단:\n\n1. **알파 가중치 조건부 재설계** — A2 25% · A5 15% 는 상시 가동 근거가 부족. A1 동조 / funding capacity 조건부로 재정의 필요 (단 페이퍼 데이터 수집 후 공식 재정의)\n2. **7 Layer Kill Switch 3대 공백** — Order Rate Cap (Knight 2012) · Stablecoin Depeg Guard (Terra/USDC) · ADL Queue Rank (Hyperliquid Oct 2025 $19B). 모두 공개 실사고 교훈 미반영\n3. **Backtest v2 엔진 결정** — `nautilus_trader` primary · `hftbacktest` (A1/A6 only) · `vectorbt pro` (검증). 선택지 비교 단계 생략 가능\n\nPhase 0 블로킹은 (2) · (3) 뿐이고, (1)은 페이퍼 데이터 확보 이후 게이트로 defer.\n\n---","alpha_id":null,"kill_switch_layer":null,"references":"[]"}
{"doc_id":"research-validation","doc_type":"research","version":"v1.0","section_id":"research-validation/External_Validation_Research_2026-04-24/1_A1_Liquidation_Cascade/핵심_결론","section_title":"핵심 결론","section_text":"- **Binance `forceOrder` WS는 소스 수준에서 손상** — 2021-04-27 부터 심볼당 1초 1건 truncation. Binance 공식 \"단기 수정 계획 없음\" (수년째).\n- **공개 walk-forward 1건만 존재** — Curupira ETH WR 67%, PF 2.9, sub-5min hold. Sharpe/capacity 미공개.\n- **Oct 10-11 2025 $19B 캐스케이드 실측** — 40분 창, 피크 $53M/sec, spread 0.02bp → 26.43bp (1,321x), depth 98% 증발.\n- **`A1 40% 가중치` 근거가 내부 백테스트 외 없음** — Deribit/HFT 데스크의 liquidation hunting 공개 실적 zero. 외부 벤치마크 부재가 최대 모델 리스크.","alpha_id":null,"kill_switch_layer":null,"references":"[]"}
{"doc_id":"research-validation","doc_type":"research","version":"v1.0","section_id":"research-validation/External_Validation_Research_2026-04-24/1_A1_Liquidation_Cascade/오픈소스_레퍼런스","section_title":"오픈소스 레퍼런스","section_text":"- **bmoscon/cryptofeed** — `cryptofeed/exchanges/binance.py:_liquidations()` 표준 구현. 시퀀스 갭 감지 + reset 로직. <https://github.com/bmoscon/cryptofeed>\n- **binance/binance-futures-connector-python** — 공식 WS 클라이언트. reconnect/backoff 얇음 → 프로덕션에서 감싸야 함. <https://github.com/binance/binance-futures-connector-python>\n- **hgnx/binance-liquidation-tracker** — `!forceOrder@arr` (aggregate) 필터 최소 예시. <https://github.com/hgnx/binance-liquidation-tracker>\n- **ccxt / ccxt pro** `watchLiquidations` — 멀티거래소 참조.","alpha_id":null,"kill_switch_layer":null,"references":"[\"https://github.com/bmoscon/cryptofeed\", \"https://github.com/binance/binance-futures-connector-python\", \"https://github.com/hgnx/binance-liquidation-tracker\"]"}
{"doc_id":"research-validation","doc_type":"research","version":"v1.0","section_id":"research-validation/External_Validation_Research_2026-04-24/1_A1_Liquidation_Cascade/논문_블로그","section_title":"논문 / 블로그","section_text":"- Ali, Zeeshan. \"Anatomy of the Oct 10–11 2025 Crypto Liquidation Cascade.\" SSRN 5611392.\n- Curupira. \"Fading Liquidation Cascades.\" <https://curupira.dev/blog/cascade-fade-scalper-fading-liquidation-overshoots/>\n- Amberdata. \"How $3.21B Vanished in 60 Seconds.\" <https://blog.amberdata.io/how-3.21b-vanished-in-60-seconds-october-2025-crypto-crash-explained-through-7-charts>\n- \"Explainable Patterns in Cryptocurrency Microstructure.\" arXiv 2602.00776.\n- Binance Dev Forum. \"forceOrder data missing since April 27 2021.\" <https://dev.binance.vision/t/forceorder-data-missing-in-snapshots-since-april-27-2021/5151>","alpha_id":null,"kill_switch_layer":null,"references":"[\"https://curupira.dev/blog/cascade-fade-scalper-fading-liquidation-overshoots/\", \"https://blog.amberdata.io/how-3.21b-vanished-in-60-seconds-october-2025-crypto-crash-explained-through-7-charts\", \"https://dev.binance.vision/t/forceorder-data-missing-in-snapshots-since-april-27-2021/5151\"]"}
{"doc_id":"research-validation","doc_type":"research","version":"v1.0","section_id":"research-validation/External_Validation_Research_2026-04-24/1_A1_Liquidation_Cascade/v11_반영_Phase_0_스캐폴드_","section_title":"v11 반영 (Phase 0 스캐폴드)","section_text":"1. `liquidation-stream.js` 는 `!forceOrder@arr` (전체) + 심볼별 스트림 **이중 구독 + dedup**. cryptofeed 의 `_check_update_id` 패턴 차용.\n2. 탐지는 **Curupira 2단 필터**: 최근 5개 1-min bar 누적 displacement + 동일 창 볼륨 3x. liquidation notional 은 **confirming feature 만** (Binance 1초 truncation 이 임계값 왜곡).\n3. **\"forceOrder completeness multiplier\"** 명시 — 퍼블릭 liquidation 총량은 Coinglass/Amberdata 집계 대비 60-80% 수준 관측. A1 PnL/기대 fill 을 **1.3~1.6배 헤어컷**.\n4. 엔트리 슬리피지 모델은 Oct 2025 실측 기반 — spread 5.92bp 평균 / depth 98% 증발을 worst-case 기본값. **taker 슬리피지 기대값 > mean-reversion 기대값의 30% 이면 진입 금지**.","alpha_id":null,"kill_switch_layer":null,"references":"[\"liquidation-stream.js\"]"}
{"doc_id":"research-validation","doc_type":"research","version":"v1.0","section_id":"research-validation/External_Validation_Research_2026-04-24/1_A1_Liquidation_Cascade/리스크_플래그","section_title":"리스크 플래그","section_text":"- 백테스트 survivorship 2중 편향 (forceOrder 누락 + 히스토리컬 덤프 같은 절단). OOS 목표를 스펙 백테스트의 **50% 로 선제 감가**.\n- Regime dependence → 월 단위 PnL 편중. A1 40% 가중치가 실질 캐스케이드 월에만 유효.\n- Mechanism change 리스크 (Binance 룰 변경 재발 가능). feature 를 raw liquidation 이 아닌 **price-velocity+volume 기반**으로 짜는 것이 방어.\n- depth 98% 증발 시점 taker fill 실패. A1 사이즈 상한을 **normal depth 가 아닌 cascade-regime depth 의 1/10** 로 산정.\n\n---","alpha_id":null,"kill_switch_layer":null,"references":"[]"}
{"doc_id":"research-validation","doc_type":"research","version":"v1.0","section_id":"research-validation/External_Validation_Research_2026-04-24/2_Tick-Level_Backtest_Framework/결론","section_title":"결론","section_text":"- **`nautilus_trader` primary** — backtest→live 동일 코드, `FundingRateUpdate` / `CryptoPerpetual` 네이티브, Binance Futures 분기 지원, 나노초 해상도 L2.\n- **`hftbacktest` (Rust) secondary** — A1 Liquidation Cascade / A6 Alt MM 전용. L3 MBO + 큐 포지션 + feed/order 지연 양방향.\n- **`vectorbt pro` 보조** — 파라미터 스윕 + Deflated Sharpe / PBO 산출.\n- **탈락 명시:** backtrader (유지보수 정지), zipline-reloaded (crypto funding 미지원), freqtrade (bar-crossing 기본 → 현 엔진과 **같은 버그 패턴**), hummingbot (백테스트 아님), QuantConnect LEAN (perp funding 1급 지원 부족 + C#).","alpha_id":null,"kill_switch_layer":null,"references":"[]"}
{"doc_id":"research-validation","doc_type":"research","version":"v1.0","section_id":"research-validation/External_Validation_Research_2026-04-24/2_Tick-Level_Backtest_Framework/비교표","section_title":"비교표","section_text":"| 프레임워크 | Tick/L2-L3 | 펀딩 네이티브 | 큐 포지션 | live parity | v11 적합도 |\n| --- | --- | --- | --- | --- | --- |\n| **nautilus_trader** | 나노초, quote+trade+book delta | `FundingRateUpdate` + `request_funding_rates` | L2 matching engine (큐 단순) | **동일 코드 live** | Primary |\n| **hftbacktest** | L2 MBP + L3 MBO, 지연 양방향 | 수동 주입 | **업계 최상 (Rust)** | 없음 | A1/A6 Secondary |\n| **vectorbt pro** | 벡터화, tick 모드 순차 루프 | 미지원 | 없음 | 낮음 | 파라미터 스윕 보조 |","alpha_id":null,"kill_switch_layer":null,"references":"[]"}
{"doc_id":"research-validation","doc_type":"research","version":"v1.0","section_id":"research-validation/External_Validation_Research_2026-04-24/2_Tick-Level_Backtest_Framework/권고_스택","section_title":"권고 스택","section_text":"- **Tick source:** Tardis.dev 또는 CoinAPI Flat Files (trade + L2 book delta + funding + forceOrder). **Binance REST 1m klines 금지**.\n- **Validation harness:** `mlfinlab` / 직접 구현의 **Combinatorial Purged CV + PBO + Deflated Sharpe** 를 프레임워크 외부 계층으로 분리.\n- **리플레이 데이터:** BTC 2년 + ETH + 상위 5 알트. **당시 상장 상태 기준 symbol universe** 를 시점별 재구성 (survivorship 제거).","alpha_id":null,"kill_switch_layer":null,"references":"[]"}
{"doc_id":"research-validation","doc_type":"research","version":"v1.0","section_id":"research-validation/External_Validation_Research_2026-04-24/2_Tick-Level_Backtest_Framework/논문","section_title":"논문","section_text":"- Bailey & López de Prado. \"The Deflated Sharpe Ratio.\" SSRN 2460551.\n- López de Prado. *Advances in Financial ML*, Ch.12 Combinatorial Purged K-Fold CV.\n- Almgren & Chriss. \"Optimal Execution of Portfolio Transactions.\" 2001.\n- Arian, Norouzi, Seco. \"Backtest Overfitting in the ML Era.\" SSRN 4686376.\n- NautilusTrader docs — `FundingRateUpdate` / `CryptoPerpetual` / `backtest_low_level` (2025-10).","alpha_id":null,"kill_switch_layer":null,"references":"[]"}
{"doc_id":"research-validation","doc_type":"research","version":"v1.0","section_id":"research-validation/External_Validation_Research_2026-04-24/2_Tick-Level_Backtest_Framework/127k승_0패_버그_원인_체크리스트_Phase_0_제거_필수_","section_title":"127k승 / 0패 버그 원인 체크리스트 (Phase 0 제거 필수)","section_text":"1. **Bar-crossing fill** — limit 가 bar OHLC 내이면 무조건 체결 (Freqtrade 기본 = 표준 함정)\n2. **Queue position = 0** — maker 100% 체결 가정\n3. **Lookahead via 타임스탬프 반올림** — 1s tick → 1m bar close + same-bar 진입\n4. **Funding PnL 누락 / 부호 반전** — long 이 positive funding 에서 받는 것처럼 기록\n5. **Slippage 0 + 스프레드 0** — mid-price 체결 가정\n6. **Intra-bar liquidation 무시** — high 가 stop 건드려도 close 로만 평가\n7. **Survivorship bias** — 현재 상장 심볼만 → LUNA 계열 / 상폐 밈코인 -100% 이벤트 누락\n8. **Train/test 누출** — normalization/z-score 를 전체 시계열 통계로 계산","alpha_id":null,"kill_switch_layer":null,"references":"[]"}
{"doc_id":"research-validation","doc_type":"research","version":"v1.0","section_id":"research-validation/External_Validation_Research_2026-04-24/2_Tick-Level_Backtest_Framework/v11_Phase_0_src_backtest_v2_scaffold_반영_","section_title":"v11 Phase 0 `src/backtest/v2/` scaffold 반영 (8개)","section_text":"1. **엔진 컨트랙트 분리** — `engine/nautilus_adapter.py` + `engine/hftbacktest_adapter.py` 를 `BacktestEngine` ABC 뒤에.\n2. **Fill 모델 하드 분기** — `fill_model ∈ {conservative, queue_aware, adversarial}`. 기본 conservative (실제 trade 가 내 limit 을 지나**쳐야만** 체결). bar-crossing 완전 삭제.\n3. **Funding 스케줄러** — 8h 타임스탬프 (00/08/16 UTC) 이벤트 주입. `position_value × funding_rate` 명시적 PnL 누적. 현 v11 ledger `funding_paid` 컬럼과 정합.\n4. **Maker/Taker + rebate 분리** — VIP 티어/리베이트 시뮬 포함, `fees_detail` 를 trade 레코드에 저장.\n5. **Slippage 모델** — Almgren-Chriss 임시 임팩트 + L2 walk-the-book 중 **더 나쁜 쪽** (pessimistic).\n6. **Liquidation cascade replay** — Binance `forceOrder` 역사를 tick 스트림에 merge. intra-bar 에서 stop/liq 가 cascade 에 먹혔는지 판정.\n7. **Validation harness** — `validation/cpcv.py` + `deflated_sharpe.py` + `pbo.py`. **DSR/PBO 없는 백테스트 리포트는 CI 실패**.\n8. **Survivorship-safe universe** — `universe/as_of.py` 로 listing/delisting 기준 재구성.\n\n---","alpha_id":null,"kill_switch_layer":null,"references":"[\"engine/nautilus_adapter.py\", \"engine/hftbacktest_adapter.py\", \"validation/cpcv.py\", \"deflated_sharpe.py\", \"pbo.py\", \"universe/as_of.py\"]"}
{"doc_id":"research-validation","doc_type":"research","version":"v1.0","section_id":"research-validation/External_Validation_Research_2026-04-24/3_A3_Extreme_Funding_A5_Basis_Harvest/A3_Extreme_Funding","section_title":"A3 Extreme Funding","section_text":"**수익성 근거 (pro):**\n- Ackerer/Hugonnier/Jermann (Mathematical Finance 2025) · Inan (SSRN 5576424) — funding premium 자동 mean-reversion 구조적 base.\n- ScienceDirect 2025 — 중간 레버리지 구간에서 funding arb 유의 순수익.\n- Hyperliquid Q3 2025 (BitMEX report) — 기관 arb 경쟁에도 변동성 잔존 (최대 BTC 0.067%, ETH 0.075%).\n\n**반박 (con):**\n- Binance/BitMEX 2025 내내 baseline 0.01%/8h tightly anchored. 기관 arb 가 극단치 수 분 내 정리.\n- 실무 보고: funding arb 흑자 나려면 시간당 0.11% 이상 (8h ≈ 0.88%). 현재 Binance BTC 연 수회.\n- 플래시 크래시·청산 캐스케이드 극단 funding = **liquidity 고갈 신호**. 반대 포지션이 ADL/청산 희생자 될 확률 최고.\n- 40-60% of months 에 음의 funding 구간 → 월 2-5% 손실 (프로 arb 보고).","alpha_id":null,"kill_switch_layer":null,"references":"[]"}
{"doc_id":"research-validation","doc_type":"research","version":"v1.0","section_id":"research-validation/External_Validation_Research_2026-04-24/3_A3_Extreme_Funding_A5_Basis_Harvest/A5_Basis_Harvest","section_title":"A5 Basis Harvest","section_text":"- **Ethena 교훈 결정적**: TVL $14.8B → $5.88B (60% 감소, 2025-07 → 2026-04). USDe yield 27% → 4.25% APY. aggregated funding 11% → 5% (50% 압축).\n- **Ethena 자체가 futures 비중 93% → 11% 로 축소**, stablecoin lending 으로 이전. 자본 철수 자백.\n- 현실 Sharpe: 마케팅 3-6 주장 vs 실제 연 10-30% / Sharpe 1-2 (기관급 집행 전제).\n- 2025-10-10 Hyperliquid: ADL 12분간 $2.1B 강제 청산. 델타뉴트럴 한 다리 ADL → 남은 다리 즉시 디레버리지 → 연쇄 손실.","alpha_id":null,"kill_switch_layer":null,"references":"[]"}
{"doc_id":"research-validation","doc_type":"research","version":"v1.0","section_id":"research-validation/External_Validation_Research_2026-04-24/3_A3_Extreme_Funding_A5_Basis_Harvest/오픈소스","section_title":"오픈소스","section_text":"- **Hummingbot v1.27 Funding Rate Arbitrage Strategy** — spot-perp / cross-perp. Issue #7295 Hyperliquid 중복 fill 버그.\n- **ksmit323/funding-rate-arbitrage** (ETHGlobal) — 멀티 DEX funding farming.\n- **Chainstack Hyperliquid funding arb 가이드** — 0.11%/h 최소 스프레드 기준.\n- **BitMEX × Hyperliquid SOL 스프레드 트레이드** — 실제 PnL 곡선 공개.","alpha_id":null,"kill_switch_layer":null,"references":"[]"}
{"doc_id":"research-validation","doc_type":"research","version":"v1.0","section_id":"research-validation/External_Validation_Research_2026-04-24/3_A3_Extreme_Funding_A5_Basis_Harvest/논문_기관","section_title":"논문 / 기관","section_text":"- Ackerer, Hugonnier, Jermann. \"Perpetual Futures Pricing.\" *Mathematical Finance* 2025.\n- Kim & Park. \"Designing funding rates for perpetual futures.\" arXiv 2506.08573.\n- Inan. \"Predictability of Funding Rates.\" SSRN 5576424.\n- ScienceDirect 2025 — CEX/DEX funding arb leverage-cost tradeoff.\n- \"Autodeleveraging: Impossibilities and Optimization.\" arXiv 2512.01112.\n- BitMEX Q3 2025 Derivatives Report.\n- Coin Metrics SoN #333 (Oct 2025 Flash Crash) · #335 (Ethena 메커니즘).","alpha_id":null,"kill_switch_layer":null,"references":"[]"}
{"doc_id":"research-validation","doc_type":"research","version":"v1.0","section_id":"research-validation/External_Validation_Research_2026-04-24/3_A3_Extreme_Funding_A5_Basis_Harvest/v11_반영_A3_A5_필터_가드_7개_","section_title":"v11 반영 (A3/A5 필터·가드 7개)","section_text":"1. **A3 진입 임계치 상향** — 8h funding `|F| > 0.08%`. `0.05%` 구간 진입 금지 (기관 arb 포화).\n2. **Liquidation cluster confirm** — 극단 funding + 직전 15분 liquidation volume Z>2 + OI 급감 동반 시만 진입 (A1 조건부 OR, A3 단독 금지).\n3. **Basis 동반 필터** — perp - spot basis 가 funding 과 **같은 방향** 일 때만. basis 이미 좁혀졌으면 arb 완료.\n4. **Holding time cap** — A3 포지션 ≤ 2 funding cycle (16h).\n5. **A5 capacity guard** — aggregated BTC+ETH funding 30일 median `< 0.007%/8h` 일 때 **A5 전 자본 zero allocation**. Ethena 교훈 직접 내재화.\n6. **ADL 끊김 감지** — 두 다리 중 한쪽 50ms 내 강제 체결 시 나머지 다리 **강제 reduce-only 청산**.\n7. **Stablecoin depeg circuit** — USDT depeg > 30bp 또는 USDe NAV deviation > 50bp 시 A5 신규 차단 + 기존 언와인딩.","alpha_id":null,"kill_switch_layer":null,"references":"[]"}
{"doc_id":"research-validation","doc_type":"research","version":"v1.0","section_id":"research-validation/External_Validation_Research_2026-04-24/3_A3_Extreme_Funding_A5_Basis_Harvest/포기_권고_조건_stop-go_","section_title":"포기 권고 조건 (stop-go)","section_text":"**A3 제거:**\n- 페이퍼 30일 net Sharpe < 0.5 또는 trade당 평균 수익 < 2× (maker+taker fee + expected slippage)\n- 극단 funding 이벤트 71%+ 가 entry 후 1 cycle 내 반대 이동 없음 (mean reversion 실패)\n\n**A5 제거:**\n- 30일 rolling aggregated funding APR < 4% (USDC Aave lending rate 이하 → 기회비용 음수)\n- ADL/헤지 한쪽 다리 강제 청산 이벤트 ≥ 2회/월\n- USDT-margined basis net APR 이 stablecoin lending rate 를 초과 못하면 제거\n\n---","alpha_id":null,"kill_switch_layer":null,"references":"[]"}
{"doc_id":"research-validation","doc_type":"research","version":"v1.0","section_id":"research-validation/External_Validation_Research_2026-04-24/4_A2_OU_Mean_Reversion_Meta-Veto/결론_순수_OU_는_post-2022_crypto_에서_대부분_사멸","section_title":"결론 — 순수 OU 는 post-2022 crypto 에서 대부분 사멸","section_text":"- 2024 arXiv (OU pairs trading) — naive pairs trading 보다 **성과 열위**.\n- Jay Jung (SSRN 2024, PCA stat arb on crypto) — eigenportfolio 잔차 OU 적합 robust 하지 않음.\n- Robot Wealth — short-term reversal \"real but weak\", 단독 수익 불가.\n- FTX 이후 CEX 간 basis/pair 관계 2023-2024 재편. 사전 캘리브레이션 페어 **이미 부분 사멸**.\n- Cantarutti (SSRN 2025) — `half-life = ln(2)/α` 가 non-stationary 데이터에서 해석력 상실. **first hitting time 기반**이 robust.\n- **A1 캐스케이드 직후 A2 시너지**: 대규모 청산 직후 mean reversion 퍼센트 증폭 공개 증거 있음. A1 트리거 뒤 30분~4h 후행 진입이 유일한 생존 경로.","alpha_id":null,"kill_switch_layer":null,"references":"[]"}
{"doc_id":"research-validation","doc_type":"research","version":"v1.0","section_id":"research-validation/External_Validation_Research_2026-04-24/4_A2_OU_Mean_Reversion_Meta-Veto/Meta-Veto_아키텍처_veto-only_유지_권고","section_title":"Meta-Veto 아키텍처 — veto-only 유지 권고","section_text":"- Lopez de Prado triple-barrier + meta-labeling 은 **size/act yes-no 결정용 설계**. Signal generation 확장 시 leakage/overfitting/capacity 과대 추정 급증.\n- RL portfolio allocation (SAC/DDPG 2024-2025) — backtest 인상적이나 **production 증거 사실상 없음**. 승격 시기상조.","alpha_id":null,"kill_switch_layer":null,"references":"[]"}
{"doc_id":"research-validation","doc_type":"research","version":"v1.0","section_id":"research-validation/External_Validation_Research_2026-04-24/4_A2_OU_Mean_Reversion_Meta-Veto/오픈소스","section_title":"오픈소스","section_text":"- **hudson-and-thames/mlfinlab** (4.7k★) — triple-barrier, meta-labeling, purged CV, CPCV.\n- **hudson-and-thames/meta-labeling** — JFDS 논문 코드.\n- **stumpy-dev/stumpy** — matrix profile, `fluss()` regime segmentation.\n- **hmmlearn** — Gaussian-HMM 변동성 regime 분류.\n- **skfolio** — `CombinatorialPurgedCV` (mlfinlab 무거우면 대안).","alpha_id":null,"kill_switch_layer":null,"references":"[]"}
{"doc_id":"research-validation","doc_type":"research","version":"v1.0","section_id":"research-validation/External_Validation_Research_2026-04-24/4_A2_OU_Mean_Reversion_Meta-Veto/논문_책","section_title":"논문 / 책","section_text":"- Lopez de Prado. *Advances in Financial Machine Learning* 2018.\n- Singh & Joubert. \"Does Meta-Labeling Add to Signal Efficacy?\" JFDS.\n- \"Copula-Based Trading of Cointegrated Cryptocurrency Pairs.\" *Financial Innovation* (Springer) 2024.\n- Jay Jung. \"Statistical Arbitrage within Crypto Markets using PCA.\" SSRN 2024.\n- \"Markov and HMM for Regime Detection in Crypto.\" Preprints.org 2024-2026.","alpha_id":null,"kill_switch_layer":null,"references":"[]"}
{"doc_id":"research-validation","doc_type":"research","version":"v1.0","section_id":"research-validation/External_Validation_Research_2026-04-24/4_A2_OU_Mean_Reversion_Meta-Veto/v11_A2_Spec_보강_8개_","section_title":"v11 A2 Spec 보강 (8개)","section_text":"1. **페어 선정** — 거리기반 단독 금지. **Engle-Granger/Johansen 코인테그레이션 + ADF** 통과쌍만.\n2. **Rolling 재추정** — OU `θ,μ,σ` 를 30일 rolling + 7일 embargo.\n3. **Half-life 교차검증** — MLE + AR(1) + Kalman 3개 중 2개 이상이 12h~7d 합의 시만 진입.\n4. **A1 동조 게이트** — A1 캐스케이드 이벤트 후 **30분~4h 윈도**에서만 A2 트리거.\n5. **포지션 사이징** — z-score pyramiding 금지. Kelly/3 을 half-life 비례 snap-divide.\n6. **Time-stop 의무** — 2 × half-life 무조건 청산.\n7. **Regime veto** — HMM/stumpy fluss high-vol regime 시 신규 차단 (기존은 trailing stop만).\n8. **Capacity cap** — pair 당 `notional ≤ 0.1 × 5분 avg volume`.","alpha_id":null,"kill_switch_layer":null,"references":"[]"}
{"doc_id":"research-validation","doc_type":"research","version":"v1.0","section_id":"research-validation/External_Validation_Research_2026-04-24/4_A2_OU_Mean_Reversion_Meta-Veto/Meta-Veto_구현_가이드","section_title":"Meta-Veto 구현 가이드","section_text":"- **Feature**: HMM regime, 실현/GARCH 변동성, 펀딩률, BTC dominance Δ, orderbook imbalance, 최근 liquidation 총량, A2 half-life 신뢰구간 폭.\n- **Label (triple-barrier)**: Upper = 1σ × expected reversion, Lower = 1.5σ adverse (손절 우선), Vertical = 2 × half-life.\n- **모델**: LightGBM/XGBoost + `class_weight=balanced`. MLP 는 샘플 부족으로 overfit 고위험.\n- **Validation**: **CPCV (mlfinlab) 필수**. embargo ≥ 2 × max holding.\n- **Veto-only 제약**: primary A2 시그널 존재 시에만 평가. 독립 시그널 생성 금지. **재학습 주 1회**, 성능 저하 시 즉시 roll-back.","alpha_id":null,"kill_switch_layer":null,"references":"[]"}
{"doc_id":"research-validation","doc_type":"research","version":"v1.0","section_id":"research-validation/External_Validation_Research_2026-04-24/4_A2_OU_Mean_Reversion_Meta-Veto/포트폴리오_레벨_경고","section_title":"포트폴리오 레벨 경고","section_text":"- A2 순수 alpha 는 post-2022 crypto 대체로 사멸. **A2 weight 25% 는 A1 동조 게이트 + regime veto 가 온전히 붙은 뒤에만** 유지 가능.\n- 동조 게이트 없이 단독 가동 = trend whipsaw 로 지속 drain 고확률.\n- Phase 0~1 페이퍼 모드에서 **A2 를 A1-동조 vs A1-독립으로 분리 계측**, A1 독립 Sharpe < 0.3 시 weight 컷 **stop-rule 필수**.\n\n---","alpha_id":null,"kill_switch_layer":null,"references":"[]"}
{"doc_id":"research-validation","doc_type":"research","version":"v1.0","section_id":"research-validation/External_Validation_Research_2026-04-24/5_7_Layer_Kill_Switch_외부_교차검증/실사고_정리_핵심_8건_","section_title":"실사고 정리 (핵심 8건)","section_text":"| 사고 | 연도 | 근본원인 | Kill-switch 교훈 | v11 적용 여부 |\n| --- | --- | --- | --- | --- |\n| **Knight Capital** | 2012 | Dead code 재활성화 + 8대 중 1대 미배포 → 45분 $460M 손실. NYSE 경고에도 kill switch 부재 | Pre-trade rate/quantity cap 의무 (SEC 15c3-5) | ⚠️ L1 에 **주문율 cap 부재** |\n| **Terra/Luna** | 2022-05 | Anchor 19.5% → UST depeg → Luna 무한발행 → $60B 증발. 3AC $462M → $2,700 | 스테이블코인 depeg + 청산 연쇄 차단 | ❌ **Stablecoin depeg guard 없음** |\n| **3AC 청산** | 2022-06 | LUNA 손실 + GBTC premium 붕괴 + 교차 대출 | Cross-venue 익스포저 monitor | ⚠️ L3 correlation 은 계좌 내만 |\n| **FTX/Alameda** | 2022-11 | FTT 담보 + 3AC 은폐. CoinDesk 유출 → 뱅크런 | 거래소 solvency 모니터 | ❌ 미반영 (defer) |\n| **Mango Markets** | 2022-10 | MNGO TWAP 없는 oracle → flash $117M | TWAP + outlier 차단 | ❌ DEX 미사용이면 defer |\n| **USDC depeg** | 2023-03 | SVB 파산 $3.3B 노출 → USDC $0.87 | stablecoin 8%+ deviation HALT | ❌ 위 Terra 동일 |\n| **10/10 crash** | 2025-10 | Trump 관세 발언 → $19B 청산 (사상 최대). Hyperliquid 6,300 지갑, ADL 발동 | **ADL 은 승리 포지션도 강제청산** | ⚠️ L6 에 **ADL queue rank 없음** |\n| **Euler Finance** | 2023-03 | `donateToReserves()` 회계 결함 → $197M | Smart contract 경로 감사 | CEX 봇 부적용 |","alpha_id":null,"kill_switch_layer":null,"references":"[]"}
{"doc_id":"research-validation","doc_type":"research","version":"v1.0","section_id":"research-validation/External_Validation_Research_2026-04-24/5_7_Layer_Kill_Switch_외부_교차검증/현_7_Layer_평가","section_title":"현 7 Layer 평가","section_text":"| Layer | 강점 | 약점 |\n| --- | --- | --- |\n| L1 STOP_MARKET | Exchange-side 실행 | **주문율 cap 없음**, bracket order race condition |\n| L2 일일 MaxDD | Supabase persistent OK | **주간/월간 MaxDD 누락** (일 -4.9% → 월 -50% 방치) |\n| L3 Correlation | Flash crash 의도 OK | **-3%/5min 기준이 2020-03-13 (-50%/15분) 수준에 너무 느림** |\n| L4 WS Fail-Closed | `liquidationPrice=0` 수정 OK | **Supabase 자체 다운 시 fallback 미정의** (단일점) |\n| L5 Flash Crash 시나리오 | -99% 포함 | **Static 만**, variance-of-variance 적응 없음 |\n| L6 MMR Monitor | 계산식 OK | **ADL queue 순위 미모니터** |\n| L7 Clock/Rate/Key | API key guard OK | **거래소 유지보수 창 감지 없음** |\n\n**중복/누락:**\n- 중복: L2 ↔ L5 일부 (MaxDD vs stress)\n- 누락: Stablecoin depeg, Exchange maintenance, ADL queue rank, Order rate cap, Funding spike","alpha_id":null,"kill_switch_layer":null,"references":"[]"}
{"doc_id":"research-validation","doc_type":"research","version":"v1.0","section_id":"research-validation/External_Validation_Research_2026-04-24/5_7_Layer_Kill_Switch_외부_교차검증/오픈소스","section_title":"오픈소스","section_text":"- **Hummingbot `kill_switch`** — percent 기반 자동중지. 단일 임계값만 지원.\n- **FIA Best Practices for Automated Trading Risk Controls** (2024 백서) — 업계 표준 pre/at/post trade cap.\n- **Mento ValueDeltaBreaker** — 스테이블코인 0.5% 이탈 자동 서킷.\n- **Chainlink multi-source + TWAP** — 20+ 피드 중앙값 + outlier 차단.\n- **Upstox Kill Switch API** — REST kill switch pattern (cancel-all + block-new).","alpha_id":null,"kill_switch_layer":null,"references":"[]"}
{"doc_id":"research-validation","doc_type":"research","version":"v1.0","section_id":"research-validation/External_Validation_Research_2026-04-24/5_7_Layer_Kill_Switch_외부_교차검증/논문_규제","section_title":"논문 / 규제","section_text":"- SEC Rule 15c3-5 (2010 제정, Knight 이후 2013 첫 집행).\n- Antonov/Lipton/López de Prado (2024) \"Overcoming Markowitz's Instability with HRP.\" SSRN 4748151.\n- \"Autodeleveraging: Impossibilities and Optimization.\" arXiv 2512.01112.\n- FRB \"In the Shadow of Bank Runs\" (2025-12) — stablecoin bank-run 계측.\n- PMC \"Systemic failures in algorithmic trading\" — Normal Accidents 이론.","alpha_id":null,"kill_switch_layer":null,"references":"[]"}
{"doc_id":"research-validation","doc_type":"research","version":"v1.0","section_id":"research-validation/External_Validation_Research_2026-04-24/5_7_Layer_Kill_Switch_외부_교차검증/v11_반영_10개_","section_title":"v11 반영 (10개)","section_text":"1. **L1 에 Order Rate Cap 추가** — `max_orders_per_minute = 60`, 초과 시 즉시 HALT.\n2. **L2 주간/월간 MaxDD 추가** — 일 5% + 주 12% + 월 20% 3-tier.\n3. **신규 L8 Stablecoin Depeg Guard** — USDT/USDC spot 8% 이탈 시 전체 reduce-only.\n4. **L3 correlation 재보정** — `-3%/5min` → **`-2%/1min OR -5%/5min`**. 2020-03-13 tick 재생 검증.\n5. **L6 ADL Queue Rank 모니터** — `GET /fapi/v1/adlQuantile` 주기 조회, queue rank 4+ 시 포지션 감축.\n6. **L4 Supabase fallback** — 로컬 SQLite mirror 로 halt_until 읽기.\n7. **신규 Exchange Maintenance Guard** — `/sapi/v1/system/status` + 공식 공지 RSS.\n8. **신규 Funding Rate Spike Guard** — 시간당 `|0.5%|` 초과 시 신규진입 차단 (Oct 2025 교훈).\n9. **L7 clock skew 강화** — 500ms/2s → **100ms warn / 500ms pause**.\n10. **HALT Race Condition 방어** — L2 HALT 발동 시 **cancel-all 먼저 → 청산 명령 다음**. Knight NYSE 경고 시 in-flight 체결 재발 방지.","alpha_id":null,"kill_switch_layer":null,"references":"[]"}
{"doc_id":"research-validation","doc_type":"research","version":"v1.0","section_id":"research-validation/External_Validation_Research_2026-04-24/5_7_Layer_Kill_Switch_외부_교차검증/시급도","section_title":"시급도","section_text":"- **Phase 0 (즉시)**: #1 Order Rate Cap · #10 Race Condition 순서 · #4 Correlation 재보정 · #3 Stablecoin Depeg\n- **Phase 1 (2주)**: #2 주/월 MaxDD · #5 ADL Queue · #8 Funding Spike · #6 Supabase fallback\n- **Phase 2+**: #7 Maintenance Guard · #9 Clock skew 강화 · HRP sizing\n\n---","alpha_id":null,"kill_switch_layer":null,"references":"[]"}
{"doc_id":"research-validation","doc_type":"research","version":"v1.0","section_id":"research-validation/External_Validation_Research_2026-04-24/교차_발견_5축_공통_리스크_/1_공개_벤치마크_부재_A1_A2_A5_","section_title":"1. 공개 벤치마크 부재 (A1/A2/A5)","section_text":"6-알파 중 3개가 외부 검증 레퍼런스 부재. v11 6-알파 앙상블 **목표 Sharpe 자체가 내부 백테스트에 의존**.\n→ **Deflated Sharpe 게이트가 매우 중요**, 페이퍼 데이터 전까지 공식 Sharpe 숫자를 README 에 쓰지 말 것.","alpha_id":null,"kill_switch_layer":null,"references":"[]"}
{"doc_id":"research-validation","doc_type":"research","version":"v1.0","section_id":"research-validation/External_Validation_Research_2026-04-24/교차_발견_5축_공통_리스크_/2_Calendar-based_DD_Concentration","section_title":"2. Calendar-based DD Concentration","section_text":"A1 이 저변동성 월 0 firing 이면 A2/A5 가 커버해야 하는데, A2 는 A1 동조 조건부, A5 는 funding capacity 조건부.\n→ 저변동성 + 낮은 funding 구간에 **전체 알파 firing rate 0 수렴 가능**. 포트폴리오 레벨 stress test 필요.","alpha_id":null,"kill_switch_layer":null,"references":"[]"}
{"doc_id":"research-validation","doc_type":"research","version":"v1.0","section_id":"research-validation/External_Validation_Research_2026-04-24/교차_발견_5축_공통_리스크_/3_Oct_10-11_2025_실측_vs_현_L5_상한","section_title":"3. Oct 10-11 2025 실측 vs 현 L5 상한","section_text":"현 L5 는 `-99% notional` 포함이지만, 실사고는 \"spread 1,321x + depth 98% 증발\" — **orderbook depth/spread 축의 충격**.\n→ L5 stress scenario 를 notional 만이 아니라 depth/spread 축으로 재작성.\n\n---","alpha_id":null,"kill_switch_layer":null,"references":"[]"}
{"doc_id":"research-validation","doc_type":"research","version":"v1.0","section_id":"research-validation/External_Validation_Research_2026-04-24/Source_Summary_주요_/A1","section_title":"A1","section_text":"- <https://github.com/bmoscon/cryptofeed>\n- <https://dev.binance.vision/t/forceorder-data-missing-in-snapshots-since-april-27-2021/5151>\n- <https://curupira.dev/blog/cascade-fade-scalper-fading-liquidation-overshoots/>\n- <https://blog.amberdata.io/how-3.21b-vanished-in-60-seconds-october-2025-crypto-crash-explained-through-7-charts>\n- <https://papers.ssrn.com/sol3/Delivery.cfm/5611392.pdf>","alpha_id":null,"kill_switch_layer":null,"references":"[\"https://github.com/bmoscon/cryptofeed\", \"https://dev.binance.vision/t/forceorder-data-missing-in-snapshots-since-april-27-2021/5151\", \"https://curupira.dev/blog/cascade-fade-scalper-fading-liquidation-overshoots/\", \"https://blog.amberdata.io/how-3.21b-vanished-in-60-seconds-october-2025-crypto-crash-explained-through-7-charts\", \"https://papers.ssrn.com/sol3/Delivery.cfm/5611392.pdf\"]"}
{"doc_id":"research-validation","doc_type":"research","version":"v1.0","section_id":"research-validation/External_Validation_Research_2026-04-24/Source_Summary_주요_/Backtest","section_title":"Backtest","section_text":"- <https://github.com/nautechsystems/nautilus_trader>\n- <https://github.com/nkaz001/hftbacktest>\n- <https://papers.ssrn.com/sol3/papers.cfm?abstract_id=2460551> (Deflated Sharpe)\n- <https://papers.ssrn.com/sol3/Delivery.cfm/SSRN_ID4686376_code4361537.pdf> (Backtest Overfitting)","alpha_id":null,"kill_switch_layer":null,"references":"[\"https://github.com/nautechsystems/nautilus_trader\", \"https://github.com/nkaz001/hftbacktest\", \"https://papers.ssrn.com/sol3/papers.cfm?abstract_id=2460551\", \"https://papers.ssrn.com/sol3/Delivery.cfm/SSRN_ID4686376_code4361537.pdf\"]"}
{"doc_id":"research-validation","doc_type":"research","version":"v1.0","section_id":"research-validation/External_Validation_Research_2026-04-24/Source_Summary_주요_/A3_A5","section_title":"A3/A5","section_text":"- <https://onlinelibrary.wiley.com/doi/10.1111/mafi.70018>\n- <https://arxiv.org/html/2512.01112v2>\n- <https://www.bitmex.com/blog/2025q3-derivatives-report>\n- <https://docs.ethena.fi/solution-overview/risks/funding-risk>\n- <https://github.com/hummingbot/hummingbot/issues/7295>","alpha_id":null,"kill_switch_layer":null,"references":"[\"https://onlinelibrary.wiley.com/doi/10.1111/mafi.70018\", \"https://arxiv.org/html/2512.01112v2\", \"https://www.bitmex.com/blog/2025q3-derivatives-report\", \"https://docs.ethena.fi/solution-overview/risks/funding-risk\", \"https://github.com/hummingbot/hummingbot/issues/7295\"]"}
{"doc_id":"research-validation","doc_type":"research","version":"v1.0","section_id":"research-validation/External_Validation_Research_2026-04-24/Source_Summary_주요_/A2","section_title":"A2","section_text":"- <https://arxiv.org/html/2412.12458v1>\n- <https://papers.ssrn.com/sol3/papers.cfm?abstract_id=5310321>\n- <https://github.com/hudson-and-thames/mlfinlab>\n- <https://hudsonthames.org/does-meta-labeling-add-to-signal-efficacy-triple-barrier-method/>","alpha_id":null,"kill_switch_layer":null,"references":"[\"https://arxiv.org/html/2412.12458v1\", \"https://papers.ssrn.com/sol3/papers.cfm?abstract_id=5310321\", \"https://github.com/hudson-and-thames/mlfinlab\", \"https://hudsonthames.org/does-meta-labeling-add-to-signal-efficacy-triple-barrier-method/\"]"}
{"doc_id":"research-validation","doc_type":"research","version":"v1.0","section_id":"research-validation/External_Validation_Research_2026-04-24/Source_Summary_주요_/Kill_Switch","section_title":"Kill Switch","section_text":"- <https://www.sec.gov/files/litigation/admin/2013/34-70694.pdf>\n- <https://www.coindesk.com/markets/2025/10/11/largest-ever-crypto-liquidation-event-wipes-out-6-300-wallets-on-hyperliquid>\n- <https://www.fia.org/sites/default/files/2024-07/FIA_WP_AUTOMATED%20TRADING%20RISK%20CONTROLS_FINAL_0.pdf>\n- <https://papers.ssrn.com/sol3/papers.cfm?abstract_id=4748151> (HRP)\n\n---","alpha_id":null,"kill_switch_layer":null,"references":"[\"https://www.sec.gov/files/litigation/admin/2013/34-70694.pdf\", \"https://www.coindesk.com/markets/2025/10/11/largest-ever-crypto-liquidation-event-wipes-out-6-300-wallets-on-hyperliquid\", \"https://www.fia.org/sites/default/files/2024-07/FIA_WP_AUTOMATED%20TRADING%20RISK%20CONTROLS_FINAL_0.pdf\", \"https://papers.ssrn.com/sol3/papers.cfm?abstract_id=4748151\"]"}
{"doc_id":"research-validation","doc_type":"research","version":"v1.0","section_id":"research-validation/External_Validation_Research_2026-04-24/연관_문서_동시_업데이트_","section_title":"연관 문서 (동시 업데이트)","section_text":"- `RISK_KILLSWITCH.md` — L3 재보정, L8/L9 신설, HALT 순서, L4 fallback\n- `backtest-v2-engine-decision.md` (신규) — nautilus + hftbacktest + vectorbt pro 결정\n- `MASTER_DESIGN.md` — A1/A2/A3/A5 섹션에 인라인 경고 (1 line per alpha)\n- `.agent/shared-brain/active-tasks.md` — Phase 0 페이퍼 후 알파 가중치 재정의 태스크 추가","alpha_id":null,"kill_switch_layer":null,"references":"[\"RISK_KILLSWITCH.md\", \"backtest-v2-engine-decision.md\", \"MASTER_DESIGN.md\", \".agent/shared-brain/active-tasks.md\"]"}
{"doc_id":"research-validation","doc_type":"research","version":"v1.0","section_id":"research-validation/External_Validation_Research_2026-04-24/다음_행동","section_title":"다음 행동","section_text":"- Phase 0 착수 시 이 리서치 결과가 `INDEX.md` 에서 참조되도록 함\n- 페이퍼 모드 2-4주 후 A2/A5 가중치 **공식 재정의 게이트** 발동\n- Oct 10-11 2025 tick 데이터 확보 → stress scenario 기본 자산으로 박제","alpha_id":null,"kill_switch_layer":null,"references":"[\"INDEX.md\"]"}