feat(graph): accept the caller's portfolio as run input (#1304, #1166)

- PortfolioContext input, rendered once into state and read by the trader, risk and portfolio agents
- --portfolio JSON file on the CLI
- a run without it is never treated as a flat book
- the checkpoint signature keys on the portfolio
This commit is contained in:
Yijia-Xiao
2026-09-16 20:19:49 +00:00
parent dffff22951
commit 6436d1ff30
14 changed files with 391 additions and 21 deletions

View File

@@ -69,7 +69,7 @@ class _FakeGraph:
self.graph = self
self.propagator = self
def create_run_state(self, ticker, trade_date, asset_type="stock"):
def create_run_state(self, ticker, trade_date, asset_type="stock", portfolio=None):
self.calls.append(("create_run_state", ticker, trade_date))
return {"messages": [], "company_of_interest": ticker}