Constructing a Portfolio Optimization Benchmark Framework for Evaluating Large Language Models

This paper introduces a novel benchmark framework using mathematically explicit portfolio optimization problems to evaluate the quantitative reasoning capabilities of large language models, revealing distinct performance patterns among GPT-4, Gemini 1.5 Pro, and Llama 3.1-70B in handling risk-based objectives, return-based tasks, and investment constraints.

Hanyong Cho, Jang Ho Kim

Published Wed, 11 Ma
📖 4 min read☕ Coffee break read

Imagine you are hiring a new financial advisor. You have three candidates: GPT, Gemini, and Llama. You want to know who is actually good at managing money, not just who is good at writing essays about money.

Most previous tests for these AI "brains" were like asking them to read a news article and summarize it. They passed those tests easily. But in the real world, investing isn't just about reading; it's about doing complex math to figure out the perfect mix of stocks to get the most money with the least risk.

This paper introduces a new, tougher test called PortBench. Think of it as a "driving test" for AI, but instead of steering a car, they have to steer a portfolio of investments.

The Test: A Math Puzzle, Not a Reading Quiz

The researchers built a massive question bank with 9,500 puzzles. Each puzzle looks like a multiple-choice question:

  • The Scenario: "Here are 5 stocks. You want to minimize risk (or maximize profit). Here are the rules (e.g., you can't put more than 20% in one stock)."
  • The Options: The AI must pick the one mathematically perfect answer from four choices.
  • The Trap: Three of the choices are "distractors." They look plausible but are mathematically wrong. Some are slightly off, while others are wildly incorrect.

The beauty of this test is that there is one single, mathematically correct answer. There's no guessing or "maybe." It's like a math problem where you can check the answer key with a ruler.

The Results: Who Passed the Driving Test?

The researchers ran the test on three popular AI models. Here is how they performed, using some everyday analogies:

1. GPT-4 (The Cautious Risk Manager)

  • Performance: The clear winner, especially when the goal was to avoid losing money (minimizing risk).
  • Analogy: Imagine GPT is a prudent captain steering a ship through a storm. When the goal is "don't crash," GPT is incredibly steady. It understands the math of safety very well and doesn't get confused by the rules (constraints).
  • Weakness: It struggled a bit with the most complex puzzles that required balancing both high speed (return) and safety (risk) at the same time, like the "Sharpe Ratio."

2. Gemini 1.5 Pro (The High-Roller Gambler)

  • Performance: Did very well when the goal was simply to make the most money (maximizing return).
  • Analogy: Think of Gemini as a race car driver who loves speed. If the track is clear and the goal is "go fast," it wins. But as soon as you add obstacles (constraints) or ask it to drive carefully, it starts to panic. It often ignores the rules to chase a higher number, leading to mistakes.
  • Weakness: It fell apart when the rules got complicated or when the "wrong" answers looked very similar to the "right" ones.

3. Llama 3.1 (The Student Who Needs More Study)

  • Performance: The lowest scores overall.
  • Analogy: Llama is like a student who memorized the textbook but hasn't learned how to apply the math to real life. It struggled with almost everything, especially when the rules got strict. It often picked the wrong answer even when the math was simple.

The Big Takeaway

The study reveals a surprising truth about current AI:

  • They are great at reading and talking about finance.
  • They are still learning how to do finance.

When the task was simple (like "pick the safest option"), GPT was reliable. But when the task required juggling multiple goals (high return + low risk + strict rules), all three models started to make mistakes.

Why Does This Matter?

If you are building an app that uses AI to manage your retirement fund, this paper says: "Be careful."

  • You can trust these AIs to help you analyze news or explain concepts.
  • You cannot yet trust them to automatically pick your stocks without a human expert double-checking the math, especially for complex strategies.

The researchers hope this new "driving test" will help developers build better, safer AI tools for the future, ensuring that when we let robots manage our money, they don't crash the car.