feat: market regime, self-learning journal, AI investment committee
- regime.py: computed SPY/VIX/sector-momentum snapshot injected into every kickoff - journal.py: each agent sees its own past picks marked-to-market (learns from wins/losses) - committee.py: Chief-Risk-Officer LLM pass over the whole book — approve/reduce/veto per pick with reasons; memo lands in reports; executor enforces verdicts at open Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_016DvdRZkyCy9NJpHYDdPqmS
This commit is contained in:
1 parent
6b1c461a80
commit
4beee3dc82
6 files changed
+323
-2
No files matched your search
@@ -24,6 +24,7 @@ from execution import broker as broker_mod # noqa: E402
|
||||
from execution import reconcile as reconcile_mod # noqa: E402
|
||||
from execution.guardrails import plan_orders # noqa: E402
|
||||
from orchestration.budget import next_market_trade_date # noqa: E402
|
||||
from orchestration.committee import load_verdicts # noqa: E402
|
||||
from reporting import email_report, report_writer # noqa: E402
|
||||
from state import db # noqa: E402
|
||||
from tools.market_data import latest_price # noqa: E402
|
||||
@@ -69,6 +70,22 @@ def main(force: bool = False, date: str | None = None) -> int:
|
||||
if not outputs:
|
||||
logger.warning("no agent outputs to act on.")
|
||||
return 0
|
||||
|
||||
# enforce Investment Committee verdicts: veto = drop, reduce = halve size
|
||||
verdicts = load_verdicts(trade_date)
|
||||
if verdicts:
|
||||
for o in outputs:
|
||||
kept = []
|
||||
for p in o.picks:
|
||||
v = verdicts.get((o.persona_id, p.ticker))
|
||||
if v and v["verdict"] == "veto":
|
||||
logger.info("committee VETO {} {} — {}", o.persona_id, p.ticker, v["reason"])
|
||||
continue
|
||||
if v and v["verdict"] == "reduce":
|
||||
p.requested_weight_pct = round(p.requested_weight_pct / 2, 4)
|
||||
logger.info("committee REDUCE {} {} — {}", o.persona_id, p.ticker, v["reason"])
|
||||
kept.append(p)
|
||||
o.picks = kept
|
||||
by_persona = {o.persona_id: o for o in outputs}
|
||||
|
||||
# 3. fresh prices — equity by ticker, options by contract premium (per share)
|
||||
|
||||
Reference in new issue
Block a user