feat: cross-market date fix and strategic context selector (issue #88)
Some checks failed
CI / test (pull_request) Has been cancelled

KR planner now reads US scorecard from previous day (timezone-aware),
and generate_playbook uses STRATEGIC context selection.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
agentson
2026-02-14 23:20:24 +09:00
parent 692cb61991
commit 86c94cff62
2 changed files with 44 additions and 9 deletions

View File

@@ -8,7 +8,7 @@ from __future__ import annotations
import json
import logging
from datetime import date
from datetime import date, timedelta
from typing import Any
from src.analysis.smart_scanner import ScanCandidate
@@ -145,7 +145,8 @@ class PreMarketPlanner:
other_market = "US" if target_market == "KR" else "KR"
if today is None:
today = date.today()
timeframe = today.isoformat()
timeframe_date = today - timedelta(days=1) if target_market == "KR" else today
timeframe = timeframe_date.isoformat()
scorecard_key = f"scorecard_{other_market}"
scorecard_data = self._context_store.get_context(