INNER CODE UNIT · Python
initial_state
simonlin1212/vibe-astock · main.py:23
def initial_state(trade_date: str) -> dict:
return {
"trade_date": trade_date,
"sentiment_report": "",
"capital_report": "",
"theme_report": "",
"dragon_tiger_report": "",
"leader_report": "",
"macro_sector_report": "",
"emotion_metrics": {}, "market_facts": {}, # 派生情绪指标(情绪面分析师写入)
"tomorrow_focus": "",
"focus_struct": None,
"past_context": reflection.get_past_context(end=trade_date), # 反思闭环:注入历史命中回看
}
def run(trade_date: str) -> tuple[dict, dict]:
"""跑一场复盘。返回 (图的产物, 体检结果)。