[2026-06-04] 운영 문서 최신화

This commit is contained in:
2026-06-04 10:39:01 +09:00
parent 5a06b5779b
commit d8690355e8
3 changed files with 168 additions and 65 deletions
+36 -10
View File
@@ -1,13 +1,13 @@
# 단타 자동매매 시스템 v3.0
기획서 v3.0 기준 / KIS Open API / Synology NAS Docker
AI: Claude Code headless (장 전 분석 + 장 후 피드백)
AI: Claude Code/Codex headless (장 전 분석 + 장중 점검 + 장 후 피드백)
## 운영 모드
| KIS_MOCK | DRY_RUN | 동작 |
|----------|---------|------|
| true | true | 신호 확인만 (주문 없음) ← 처음 시작 |
| true | true | 신호 확인만 (주문 없음) ← 현재 |
| true | false | 모의투자 실제 주문 ← 3개월 검증 |
| false | false | 실거래 ← 조건 충족 후 |
@@ -47,7 +47,8 @@ docker-compose --profile emergency up kill-switch
# 또는
python kill_switch/kill.py
```
# StockBot Current Status - 2026-05-28
# StockBot Current Status - 2026-06-04
This project is currently a paper-trading scalping bot with an AI training
pipeline in observation mode.
@@ -55,8 +56,23 @@ pipeline in observation mode.
Active:
- Windows Task Scheduler operation for morning, midday, evening, watchdog, and training jobs.
- Approved `ENTRY_START = "09:20"` after the 2026-05-28 evening review.
- Applied `MAX_HOLD_MIN = 90`.
- `FORCE_EXIT = "14:50"` remains unchanged.
- `avoid_sectors` filtering is active in runtime entry checks.
- Re-entry controls are active:
- TIME/FORCE cooldown is measured from final exit time.
- TP final exits block same-day ticker re-entry.
- Re-entry control state is restored from today's DB rows after restart.
- Duplicate bot startup guards are active:
- `app/main.py` uses `logs/stockbot.lock`.
- `scripts/start_bot.py` kills existing `app/main.py` processes before starting one new bot.
- `scripts/run_morning.ps1` is the only post-morning bot startup owner.
- `/morning` must not call `/start-bot` or `scripts/start_bot.py`.
- KIS stability hardening is active:
- Mode-specific request spacing.
- Retry for transient KIS timeout/rate-limit price errors.
- DRY_RUN simulated fills reuse the current quote to reduce extra KIS calls.
- Daily settlement has a duplicate-summary guard.
- Entry snapshots for model training.
- Post-entry snapshots at 1m, 3m, 5m, and 10m.
- Bot-data export to `data/training_dataset.csv`.
@@ -65,21 +81,28 @@ Active:
- KIS minute collection excludes ETF/ETN by default and collects multiple windows from 09:30 to 14:00.
- RandomForest-based training engine.
- Optional AI entry scoring when `models/scalping_model.joblib` exists.
- Latest verified training run: 2026-05-28 20:24.
- Latest training rows: 3,156 total, including 3,146 external pretraining rows and 10 bot-trade rows.
- Latest metrics: `label_stop_loss` ROC-AUC 0.851, `label_win` ROC-AUC 0.719.
- Latest successful training run: 2026-06-02 18:36.
- Latest training rows: 5,773 total, including 5,720 external pretraining rows and 53 bot-trade rows.
- Latest metrics: `label_stop_loss` ROC-AUC 0.896, `label_win` ROC-AUC 0.715.
- Latest daily review/proposal files exist through 2026-06-02; 2026-06-03 was a market holiday.
Not active yet:
- AI does not block buys.
- AI does not change position size.
- AI does not override exits.
- ML model scores do not block buys.
- ML model scores do not change position size.
- ML model scores do not override exits.
- Real-cash trading is not ready until fill, unfilled-order, and partial-fill handling is hardened.
Current operational notes:
- On 2026-06-04, duplicate morning execution happened before the `/morning` instruction fix. The next scheduled morning run should show one context run and one `scripts/start_bot.py` startup.
- KIS rate limits can still happen when multiple scripts/processes call KIS concurrently.
- The 2026-06-03 holiday training run logged a failure at the holiday-check step instead of a clean skip; inspect before relying on holiday automation noise level.
- Keep secrets out of tracked files and remote URLs. Prefer environment variables for Discord webhooks and credentials.
Daily schedule:
| Time | Task | Purpose |
|---|---|---|
| 08:15 | `StockBot_Morning` | Run `/morning`, build context, start bot |
| 08:15 | `StockBot_Morning` | Run `/morning`, build context, then `scripts/start_bot.py` starts exactly one bot |
| 09:00-15:10 | `StockBot_Watchdog` | Check/restart bot every 5 minutes |
| 11:20 | `StockBot_Midday` | Midday review and context update |
| 15:30 | `StockBot_Evening` | Daily review and proposal report |
@@ -91,9 +114,12 @@ Useful commands:
python -m pip install -r requirements.txt
powershell -ExecutionPolicy Bypass -File scripts\install_dependencies.ps1
powershell -ExecutionPolicy Bypass -File scripts\setup_scheduler.ps1
python scripts\start_bot.py
powershell -ExecutionPolicy Bypass -File scripts\run_training_pipeline.ps1
python scripts\export_training_dataset.py
python scripts\train_ai_model.py
Get-Content logs\morning.log -Tail 80
Get-Content logs\stockbot.log -Tail 80
```
Dependency portability: