Harden scheduler and stale breakout reentry

This commit is contained in:
whdwo
2026-06-15 18:52:42 +09:00
parent eac4ece01e
commit 901243348e
16 changed files with 181 additions and 61 deletions
+42
View File
@@ -1,5 +1,32 @@
# Implementation Log
## 2026-06-10
- Enabled wake-from-sleep behavior for Scheduler tasks:
- `scripts/setup_scheduler.ps1` now registers stock tasks with `WakeToRun`.
- Re-registered tasks and verified `WakeToRun=True` and `StartWhenAvailable=True`.
- Hardened KIS request throttling:
- Mock request spacing default: 1.7s.
- Real request spacing default: 0.35s, rate limit default: 3/sec.
- Added local `.env` override support for request spacing/rate limits.
- Added global cooldown after rate-limit responses.
- Updated the 2026-06-10 daily report to reflect repeated KIS rate-limit retries.
## 2026-06-09
- Re-registered all Windows Scheduler tasks from the live project path:
- `C:\Users\whdwo\Desktop\coding\stockbot_v3`
- Verified every task action script exists at that path.
- Fixed watchdog end-of-day behavior:
- `StockBot_Watchdog` now runs 09:00-15:05 every 5 minutes.
- `scripts/_watchdog.py` excludes 15:10 so normal daily settlement shutdown is not restarted.
- `scripts/run_watchdog.ps1` skips after 15:09:59.
- Hardened target calculation:
- Targets are cleared before recalculation.
- `open=0` is ignored before market open.
- Delayed restarts after 08:50 recalculate targets immediately.
- Updated operational docs and the 2026-06-09 daily report.
## 2026-05-28
- Applied the approved 2026-05-28 strategy update:
@@ -120,3 +147,18 @@ Open risks:
- Verification:
- Python compile check passed.
- Runtime import confirmed `ENTRY_START == "09:15"`.
## 2026-06-15
- Applied a stale breakout re-entry guard after reviewing the Samsung Electronics `TIME` re-entry.
- Changed `app/strategy/volatility_breakout.py`:
- `TIME` and `FORCE` final exits now mark the ticker as requiring a fresh breakout.
- While that marker is active, a ticker is blocked with `재돌파 대기` if it remains above the same volatility breakout target.
- The marker clears only after price moves back below the target, allowing a later fresh breakout entry.
- Rationale:
- The existing `current_price >= target` condition is the normal volatility breakout entry rule.
- The bug was reusing a still-active same-day breakout signal after `TIME/FORCE` cooldown, not the first breakout itself.
- This would have blocked the 2026-06-15 Samsung Electronics second entry after the first `TIME` exit.
- Updated docs:
- `reports/daily/2026-06-15.md`
- `reports/proposals/2026-06-15_strategy_proposal.md`