Inspiration

"Should I put 30% of my portfolio in Tesla?" A chatbot either says yes or refuses everything. A good advisor checks whether the request fits this investor (horizon, risk limits, exclusions, current holdings), shows the evidence, and says what would change the answer. We built that advisor as a courtroom: AI agents argue, code enforces the investor's own limits, and a judge rules on evidence.

What it does

The investor picks a stock or ETF and an allocation, using a fictional example profile or their own holdings. VERDICT then holds a hearing:

  • Defense (AI agent): states the investor's goal and proposes sizes that serve it.
  • Prosecutor (AI agent): names the risks that matter for this person, from market data and recent news.
  • Bailiff (code): checks the request and every option against the investor's limits: cap per holding, volatility, drawdown, speculative and crypto caps, sector caps, ESG exclusions.
  • Judge (AI agent): weighs both sides and rules. It can never accept a size that breaks a limit.
  • Clerk (code): writes the record. Any number without evidence behind it is removed.

The result is a short decision: the verdict, the largest size within the investor's limits, why, the portfolio before and after, and what would change the answer. Every number links to its evidence: period, currency, securities and method.

Simulation only. Not financial advice, no predictions, no orders.

Why a tribunal: arguing for and against reduces bias

A single AI assistant asked one question tends to give one-sided answers. It agrees with the user, latches onto the first argument it finds, and sounds more certain than the evidence allows. VERDICT is built so that no single voice decides:

  • Both sides are always heard. The Defense must make the best case for the investment, and the Prosecutor the best case against it. The Judge rules only after hearing both, so a request is never approved because it sounds exciting, or refused just because it looks risky.
  • The AI does not just tell investors what they want to hear. Chat assistants tend to agree with the person asking. Here one agent's job is to disagree, so the investor always sees the strongest objection to their own idea.
  • No anchoring on the requested size. The investor asks for 30%, but the code computes the largest size that fits their limits on its own. The Defense proposes alternatives, so the answer is not just "yes" or "no" to the number typed.
  • Headlines do not drive the decision. Recent news is shown as context, but it never changes a limit or a calculation. Those come only from historical market data.
  • Rules cannot be argued away. The investor's limits are checked by code. No argument from any agent, however convincing, can override them.
  • Every claim must be backed. A statement without evidence is removed from the record, so persuasion without facts does not count.

The benchmark below shows the effect: a single agent with the same model reached the expected verdict in 5 of 30 runs; the tribunal did in 30 of 30.

How we built it

Everything runs on AWS:

  • Amazon Bedrock AgentCore Runtime hosts the tribunal (agents plus code checks).
  • Amazon Bedrock (Claude Sonnet 5.5) powers the three agents, behind Bedrock Guardrails (prompt-attack filter on user text and on every news snippet).
  • AgentCore Web Search brings recent news from press, wires and regulators. It is shown as cited context and never used in a calculation.
  • S3 + Glue + Athena hold immutable dataset snapshots (SHA-256 manifest, validated at ingestion).
  • DynamoDB stores session state; API Gateway + Lambda serve it, with per-browser session isolation, daily caps and throttling.
  • Amplify Hosting serves the React app; CloudWatch handles logs and metrics; the infrastructure is defined in CDK.

Data: the organizers' starter set (Yahoo Finance prices, Bank of Canada USD/CAD rate, FRED), Nov 2021 to Nov 2026, all in CAD, using adjusted prices. Annualised volatility is \( \sigma_{ann} = \sigma_{daily}\sqrt{252} \). A new position of weight \( w \) is funded by scaling every current holding by \( (1-w) \), so weights still sum to 100%.

Results

Benchmark on the deployed system, 6 cases × 5 runs, against a single agent with the same model and guardrail:

VERDICT Single agent
Expected verdict 30/30 5/30
Offers a smaller size that fits instead of only refusing 20/20 0/20
Numbers without evidence 0 several per answer

Five runs per case is indicative, not a statistical claim.

Challenges

  • Making agents argue without letting them invent numbers. We added a citation check that removes any figure not backed by evidence.
  • Keeping a one-minute hearing readable: live progress, arguments as they arrive, then a short decision with optional detail.
  • Honest data limits: survivorship bias (the 31 securities exist today), a five-year window, and no company fundamentals or ETF holdings. Every ruling states them.

What we learned

Agents are most useful when they argue and code decides what is allowed. Opposing roles make an AI's answer more balanced than asking one model to be balanced. Explainability means linking every number to its source, not writing longer explanations.

What's next

Company fundamentals (SEDAR+, EDGAR), ETF holdings for real diversification analysis, a longer price history for stress tests, and a French interface.

Team 52, PolyFinances Datathon 2026, AlphaForge AI case.

Built With

Share this project:

Updates

Submission history