Files
Bithumb/docs/reference/SIMULATION.md
dsyoon 5842cc9fa3 GT 총자산 비율 매수·leg 티어 배분과 시뮬/실거래 포지션 사이징을 통합한다.
타점·비중을 gt_model로 일반화하고, amount_krw 시각순 배분·EV/WF·상위 leg 대형 매수를
position_sizing과 시뮬 HTML(고정 ₩/회 비교)에 반영한다.

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-05-31 16:11:49 +09:00

55 lines
1.9 KiB
Markdown
Raw Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
# 1단계 — 시뮬레이션
## 목적
`monitor_rules`가 과적합이 아닌지 검증하고, **Ground Truth와 동일한 자본 배분 원칙**으로 holdout 체결 수익을 비교합니다.
## 실행
```bash
python scripts/04_match_rules.py # 선행
python scripts/04_simulation_report.py
```
## 산출물
| 파일 | 내용 |
|------|------|
| `docs/04_matching/simulation_report.json` | Go/No-Go, `portfolio_compare`, `gt_model` |
| `docs/04_matching/simulation_report.html` | 카드 3줄: **GT · 시뮬(총자산%) · 시뮬(고정₩/회)** |
## 포트폴리오 비교 (`portfolio_compare`)
| 키 | 설명 |
|----|------|
| `ground_truth_chrono` | GT 타점 + `amount_krw` 시각순 체결 |
| `sim_sized` | holdout 발화 + **총자산×비중×EV/WF·leg상위** (`position_sizing`) |
| `sim_fixed_order` | 동일 발화 + **고정 `LIVE_ORDER_KRW`/회** (baseline) |
## 시뮬 매수 배분 (GT와 동일 원칙)
- **통과 규칙만** 대형: holdout EV·PF, walk-forward, 수수료 2× 스트레스 (`load_ev_wf_approved_rule_ids`)
- **leg 상위** `GT_LARGE_LEG_TOP_PCT` + 근접 GT leg 매칭 → `LIVE_BUY_PCT_LARGE`
- 그 외 → `LIVE_BUY_PCT_SMALL`
- 일한도·일최대거래: `select_capped_fires` (동적 planned 원화로 `LIVE_DAILY_KRW_MAX` 적용)
## 검증 항목
| 항목 | 설명 |
|------|------|
| Holdout | EV≥0, PF≥1 |
| Walk-forward | 양수 월 비율 ≥ `SIM_GO_WF_POSITIVE_RATIO` |
| 수수료 스트레스 | 수수료 2× 후 EV≥0 |
| 실거래 한도 | 동적 매수액 기준 일한도 시뮬 |
## Go/No-Go
- **GO**: monitor_rules 전 규칙 checks 통과
- **NO-GO**: 04 재선별 후 재실행
## 환경 변수
- `SIM_GO_*`, `SIM_WALK_FORWARD_MIN_MONTHS`, `SIM_FEE_STRESS_MULT`
- `LIVE_ORDER_KRW`, `LIVE_DAILY_KRW_MAX` (고정 baseline·한도)
- `LIVE_BUY_PCT_LARGE`, `LIVE_BUY_PCT_SMALL` (시뮬·실거래 비율 매수)