[2026-05-28] 운영 문서 최신화
This commit is contained in:
@@ -100,6 +100,32 @@ midday 이후 기존 보유 2종목(흥아해운, SFA반도체)만 정리.
|
||||
|
||||
## 내일 운영 참고
|
||||
|
||||
- ENTRY_START 제안(09:20) 승인 대기 → 미승인 시 현행 09:15 유지
|
||||
- 섹터 필터 버그 수정 승인 대기 → 미수정 시 avoid_sectors 비작동 지속
|
||||
- ENTRY_START 제안(09:20) 승인 후 적용 완료.
|
||||
- 섹터 필터 버그 수정 승인 후 적용 완료. `avoid_sectors`가 `check_entry()`에 전달됨.
|
||||
- 오전 신호 신뢰 낮음 — L3-B 0.3× 상태로 출발 (전날 연속손절 미회복 시)
|
||||
|
||||
---
|
||||
|
||||
## 사후 적용 내역 - 2026-05-28
|
||||
|
||||
사용자 승인 후 다음 변경을 적용함.
|
||||
|
||||
- `app/config.py`: `ENTRY_START` 09:15 → 09:20.
|
||||
- `app/main.py`: `ticker_sectors` 캐시 추가, `check_entry()`에 `sector` 전달.
|
||||
- `app/main.py`: KIS 랭킹 row에 섹터 필드가 없을 때를 위한 보수적 종목명 기반 회피 섹터 힌트 추가.
|
||||
- `FORCE_EXIT = "14:50"` 유지 확인.
|
||||
- 외부 데이터 기반 AI 사전학습 파이프라인 복구 및 end-to-end 검증.
|
||||
- 학습 feature에서 미래/결과 누수 컬럼 제거: `price_*`, `ret_*`, `mfe_*`, `mae_*`, `pnl`, `exit_price`.
|
||||
- 미사용 `scripts/_send_midday_discord.py` 삭제.
|
||||
|
||||
학습 결과:
|
||||
- `data/external_training_dataset.csv`: 3,146 rows.
|
||||
- `data/training_dataset.csv`: 10 rows.
|
||||
- `models/scalping_model.joblib`: 생성 완료.
|
||||
- `models/scalping_model.metrics.json`: 2026-05-28 20:24 생성.
|
||||
- `label_stop_loss`: ROC-AUC 0.851, accuracy 0.750.
|
||||
- `label_win`: ROC-AUC 0.719, accuracy 0.635.
|
||||
|
||||
주의:
|
||||
- AI는 계속 observation-only.
|
||||
- 현재 모델은 외부 사전학습 row 비중이 높고 실제 봇 row는 10개뿐이므로 진입 차단/비중 조절에 사용하지 않음.
|
||||
|
||||
@@ -1,5 +1,47 @@
|
||||
# Implementation Log
|
||||
|
||||
## 2026-05-28
|
||||
|
||||
- Applied the approved 2026-05-28 strategy update:
|
||||
- `ENTRY_START` changed from `"09:15"` to `"09:20"`.
|
||||
- `FORCE_EXIT = "14:50"` was verified unchanged.
|
||||
- Fixed the `avoid_sectors` runtime bug:
|
||||
- `app/main.py` now passes `sector` into `VolatilityBreakout.check_entry()`.
|
||||
- Added `ticker_sectors` cache support from ranking rows when sector fields exist.
|
||||
- Added conservative name-based avoid-sector hints for cases such as construction names when no sector field is available.
|
||||
- Repaired the external-data pretraining path:
|
||||
- `scripts/collect_daily_features.py` now falls back to KIS daily OHLCV when pykrx fails.
|
||||
- `scripts/collect_minute_data.py` excludes ETF/ETN by default and collects multiple intraday windows from 09:30 to 14:00.
|
||||
- `scripts/build_external_training_dataset.py` now uses prior daily OHLCV rows for breakout targets instead of same-day OHLCV.
|
||||
- `scripts/run_training_pipeline.ps1` builds external rows with `--all-minutes` for pretraining.
|
||||
- Removed model leakage:
|
||||
- Excluded future/outcome columns from training features: `price_*`, `ret_*`, `mfe_*`, `mae_*`, `pnl`, and `exit_price`.
|
||||
- Fixed PowerShell training pipeline execution:
|
||||
- Replaced `$Args` parameter usage with `$StepArgs` to avoid PowerShell automatic-variable collision.
|
||||
- Prevented nonzero stderr output from stopping required exit-code handling.
|
||||
- Normalized Python step logging to UTF-8 append.
|
||||
- Removed unused helper:
|
||||
- `scripts/_send_midday_discord.py`.
|
||||
|
||||
Validation performed:
|
||||
- `python -m compileall app scripts` passed.
|
||||
- Manual external daily collection passed through KIS fallback.
|
||||
- Manual KIS minute collection saved 11 regular-stock CSV files for 2026-05-28.
|
||||
- `data/external_training_dataset.csv` generated 3,146 rows.
|
||||
- `data/training_dataset.csv` generated 10 bot-trade rows.
|
||||
- `python scripts/train_ai_model.py` generated `models/scalping_model.joblib` and metrics.
|
||||
- `powershell -ExecutionPolicy Bypass -File scripts\run_training_pipeline.ps1` passed end-to-end.
|
||||
|
||||
Latest training metrics:
|
||||
- `label_stop_loss`: rows 3,156, accuracy 0.750, precision 0.450, ROC-AUC 0.851.
|
||||
- `label_win`: rows 3,156, accuracy 0.635, precision 0.492, ROC-AUC 0.719.
|
||||
|
||||
Open risks:
|
||||
- AI remains observation-only and must not block entries, resize trades, or override exits.
|
||||
- Training is still dominated by external pretraining rows; actual bot-labeled rows are only 10.
|
||||
- Same-day pykrx data may fail; KIS fallback is active but index rows can be empty.
|
||||
- Real-cash trading remains unapproved.
|
||||
|
||||
## 2026-05-27
|
||||
|
||||
- Reviewed the stock scalping bot structure and moved it toward an AI-training-ready paper-trading platform.
|
||||
|
||||
@@ -1,8 +1,15 @@
|
||||
# 전략 파라미터 변경 제안 — 2026-05-28
|
||||
|
||||
**상태: 승인 대기 (수동 검토 필요)**
|
||||
**상태: 승인 후 적용 완료 (2026-05-28)**
|
||||
**작성: Claude Evening / 2026-05-28**
|
||||
|
||||
적용 결과:
|
||||
- 제안 1 적용: `ENTRY_START = "09:20"`.
|
||||
- 제안 2 적용: `app/main.py`에서 `check_entry()` 호출 시 `sector` 전달.
|
||||
- `ticker_sectors` 캐시와 보수적인 종목명 기반 회피 섹터 힌트 추가.
|
||||
- `FORCE_EXIT = "14:50"` 변경 없음.
|
||||
- 검증: compile check, 대우건설/건설업 섹터 추론 확인, 학습 파이프라인 end-to-end 실행 통과.
|
||||
|
||||
---
|
||||
|
||||
## 제안 1: ENTRY_START 추가 지연 — 09:15 → 09:20
|
||||
@@ -104,8 +111,8 @@ signal = self.strategy.check_entry(
|
||||
**버그 확인됨.** 코드 레벨 확증. 수정 즉시 효과 발휘.
|
||||
|
||||
### 리스크
|
||||
- main.py 수정이 필요하므로 별도 승인 필요
|
||||
- 섹터 데이터 미확보 시 여전히 공백 — ticker_sectors 빌드 로직 추가 필요
|
||||
- main.py 수정은 사용자 승인 후 적용 완료.
|
||||
- 섹터 데이터 미확보 시 공백이 될 수 있어 `ticker_sectors` 캐시와 보수적 종목명 기반 힌트를 함께 적용함.
|
||||
|
||||
---
|
||||
|
||||
@@ -113,15 +120,16 @@ signal = self.strategy.check_entry(
|
||||
|
||||
| 순위 | 제안 | 난이도 | 즉시 적용 |
|
||||
|------|------|--------|-----------|
|
||||
| 1 | 섹터 필터 버그 수정 | 중간 (main.py) | X (승인 필요) |
|
||||
| 2 | ENTRY_START → 09:20 | 낮음 (config.py) | O |
|
||||
| 1 | 섹터 필터 버그 수정 | 중간 (main.py) | 적용 완료 |
|
||||
| 2 | ENTRY_START → 09:20 | 낮음 (config.py) | 적용 완료 |
|
||||
|
||||
버그 수정이 더 중요하나 승인 필요. ENTRY_START는 바로 반영 가능.
|
||||
두 제안 모두 사용자 승인 후 반영 완료.
|
||||
|
||||
---
|
||||
|
||||
## 검토 항목 (승인 전)
|
||||
## 검토 항목 (적용 후)
|
||||
|
||||
- [ ] `ticker_sectors` 데이터를 어디서 채울지 확인 (KIS 종목 마스터 API 또는 universe fetch 시)
|
||||
- [ ] 옵션 A vs B 선택
|
||||
- [ ] ENTRY_START 09:20 적용 후 최소 3거래일 관찰
|
||||
- [x] `ticker_sectors` 캐시 추가.
|
||||
- [x] `check_entry()`에 sector 전달.
|
||||
- [x] ENTRY_START 09:20 적용.
|
||||
- [ ] ENTRY_START 09:20 적용 후 최소 3거래일 관찰.
|
||||
|
||||
Reference in New Issue
Block a user