diff --git a/agents/stock/workspace/scripts/behive_web.py b/agents/stock/workspace/scripts/behive_web.py index 3c4a707..c642b1d 100644 --- a/agents/stock/workspace/scripts/behive_web.py +++ b/agents/stock/workspace/scripts/behive_web.py @@ -5108,8 +5108,7 @@ def _compute_adr_ma_latest(symbol: str, today_raw_adr: float | None, today_date: return (None, 0, False) used = base[-window:] used_live = any(r.get('is_live') for r in used) - if len(used) < window: - return (None, len(used), used_live) + # 확장 윈도우: window 미만이어도 가용한 만큼의 평균을 돌려준다(차트와 동일 정책). count로 누적 여부 표기. avg = sum(r['adr'] for r in used) / len(used) return (avg, len(used), used_live) @@ -5143,13 +5142,19 @@ def _render_adr_summary_block(rows: list[dict] | None) -> str: bd = r.get('bizdate') today_iso = f'{bd[:4]}-{bd[4:6]}-{bd[6:]}' if (bd and len(bd) == 8) else None ma, count, _used_live = _compute_adr_ma_latest(r['symbol'], raw_adr, today_iso) + full = count >= ADR_MA_WINDOW adr_cls, adr_tag = _adr_class(ma) - if ma is not None: + if ma is None: + adr_str = '—' + sub_html = '