test(stock): Phase 3 커버리지 보강 (volume Z경로·외인매도·severity경계·빈포트)

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
This commit is contained in:
2026-05-31 22:09:05 +09:00
parent 3056e8d35f
commit c3a3055060
2 changed files with 48 additions and 1 deletions

View File

@@ -152,7 +152,7 @@ def market_events(ticker: str, ticker_prices: "pd.DataFrame",
last_vol = vol.iloc[-1]
if mu > 0 and (
(sd and (last_vol - mu) / sd >= p["vol_z"])
or (not sd and last_vol >= mu * p["vol_z"]) # sd=0 fallback: plain ratio
or (not sd and last_vol >= mu * p["vol_z"]) # sd=0 (평탄 기준선): vol_z를 Z-score가 아닌 단순 배수로 사용
):
z_txt = f"{(last_vol - mu) / sd:.1f}" if sd else f"ratio={last_vol / mu:.1f}x"
events.append({