All work
MSc

LLM Financial Analyst

My MSc dissertation at the University of Bath. A team of AI agents reads company financials and news, then holds an investment committee debate to make a BUY, SELL or HOLD call on Dow Jones stocks.

2025 · AI · Finance

  • Python
  • LangGraph
  • LangChain
  • AWS Bedrock
  • Claude
  • Llama
  • Pydantic
  • Bloomberg BQuant

The idea

An equity analyst reads the statements and the news, writes a view, and then defends it in an investment committee. I wanted to know if a team of AI agents could do the same work with the same data. The dissertation compared open-source and frontier models, a fine-tuned model and a multi-agent system against Wall Street consensus ratings, on Dow Jones stocks from 2020 to 2025. I finished the MSc with a Distinction in July 2025.

The analyst

  1. Read the statementsLlama 3.1 70B analyses point-in-time financial statements from Bloomberg.
  2. Hide the companyLlama 3.1 8B removes company names from the news headlines, so the model cannot lean on what it already knows about the company.
  3. Read the newsThree months of Bloomberg News headlines become a view on the sector’s revenue drivers and the likely direction of earnings.
  4. Senior analystOne more agent weighs the statement report against the news report.
  5. Make a structured callClaude 3.5 Haiku turns the result into a direction, a size, a reason and a confidence.
LangGraph runs the steps as a state graph. The models run on AWS Bedrock, and Pydantic defines each structured output.

The investment committee

From the senior analyst: the report, the statement analysis and the stock prices

  1. BUYArgues the case to buy
  2. HOLDArgues the case to wait
  3. SELLArgues the case to sell
Each turn

A classifier records the speaker’s vote. The debate stops when the votes narrow to two, or after nine turns.

The chair

Claude 3.5 Haiku writes the final call with a reason and a confidence, and breaks a tie.

The committee is a loop in LangGraph. Three agents take turns, each arguing one call. A classifier node records each speaker’s vote, and the debate ends early once the votes narrow. That stopping rule keeps the time and the cost of each decision bounded.

What it produces

DateSecurityCallConfidenceEarnings view
28 Apr 2022AAPL UQ EquityBUYhighIncrease, small
4 Nov 2022AMGN UW EquitySELLhighIncrease, small
20 Dec 2022NKE UN EquitySELLhighIncrease, small
24 Jan 2023MSFT UQ EquityHOLDhighDecrease, small
2 Aug 2024JPM UN EquityBUYhighIncrease, 5–7%
Five of the 893 calls from the run with Claude, April 2020 to April 2025. The securities use Bloomberg tickers. Two SELL calls sit beside an earnings view of 'increase': the committee does not always follow the analyst.

A backtester built on Bloomberg Signal Lab turned the calls into trades over the five years.

What I found

  • Open-source models on their own did not beat the analyst consensus on the Dow Jones.
  • The full agent system ran end to end through the five-year backtest, with both Claude and Llama.
  • In this setup, Llama did better than Claude.

What I learned

  • Remove what the model already knows. A model that recognises the company can recall what happened next. Hiding the names in the headlines is a cheap guard against that.
  • A debate needs a stopping rule. Without a vote classifier and a turn limit, a debate has no natural end, and every turn costs time and money.
  • Check structured output, even with a schema. The confidence field still came back as “high”, “medium”, “medium-low”, “75%” and “70”. Validate everything that a model returns.

The system runs on Bloomberg BQuant Enterprise. It builds on work by Kim et al. (2024), Xu et al. (2025) and Zhang, Zhao et al. (2024).