AI for Investing
AI for investing: what agents can and can't do
Why an LLM on its own invents numbers, when you actually need an agent, and the architecture that makes one reliable enough to go near money.
Someone will try to sell you an LLM that manages your money: a chatbot that picks your stocks, sizes your positions, and tells you whether your portfolio is diversified. It will sound confident. Some of it will be invented, and it will not tell you which parts. This page is about why that happens, and about the fix, which is not a smarter model. It is the right architecture.
I come at this from two sides. I did a PhD building AI models for financial markets, and I spent years inspecting models at a financial regulator and writing Singapore's first AI risk management guidelines for the financial sector. So I have built the thing, and I have been the person asking whether the thing should be trusted.
Why a chatbot invents the numbers
An LLM is good at two things: taking in language and producing fluent language. It parses what you asked and writes a readable answer. Natively it is not a database and not a calculator. It cannot see today's prices and it cannot run a computation. So ask it to "build a low-volatility portfolio" and, when it cannot fetch the prices, compute the volatilities, and check the correlations, it fills the gap with text that reads as if it did, and it does not flag which parts are guesses. A portfolio that sounds low-volatility might be three correlated tech stocks.
LLMs work best as buns, not meat.
That is the one idea to carry. The buns are what you interact with: parsing your question, turning the output into something readable. The meat is the real work, and it is ordinary computation: historical returns from an API, volatility from a library, a correlation matrix, an optimiser. Consistent, explainable, checkable. The mistake I have seen over and over is treating the LLM as the meat, asking it to know facts and run calculations. That is when it invents things. Let the LLM handle the interface and let ordinary computation handle the core.
The fix: give the LLM tools
The problem is not what the LLM can say. It is what it cannot do natively: fetch data, run calculations, take actions. So give it tools that can. A tool is a function it can call, such as get this stock's volatility, or fetch its price history. Hand the LLM those functions and it becomes an AI agent: an LLM that can act, not just respond. It receives your request, decides which tools to call, reads the results, and goes round again until it has what it needs. The LLM still does the language. It is no longer guessing the numbers.
An agent is four parts: the model, the tools, the instructions, and the memory of the conversation so far. Its tools come in three kinds, and the difference is the whole risk picture: read-only market-data tools, pure calculation tools, and action tools that change the world, such as placing an order. The first two are safe to let the agent call freely. Anything that changes the world, a human looks at first.
Most tasks don't need an agent
Reaching for an agent when a simpler thing works is driving a Formula 1 car to the grocery store. If you can write down the steps before running, you probably do not need one: one step is a single tool call, several fixed steps are a workflow, and only a task that has to adapt to what it finds needs an agent. Break "AI portfolio assistant" down and four of five features turn out to be a tool call or a workflow. Build those first.
The demo is not the product
Everything impressive you see in a notebook lives in a sandbox, on read-only data with no consequences. Production adds real money, clients, and liability, and with them input validation, risk classification of every tool, execution limits, output checks, human approval for high-risk actions, and audit logs. The patterns do not change on the way there. Everything around them does. Knowing this is a working detector for nonsense: when someone shows you an AI that manages portfolios, ask whether it called a real tool or generated a confident paragraph, whether you can see the steps, where the numbers came from, and who approves a trade.
Read more
- The trust problem: why you can't just ask a chatbot to invest for you.
- When you need an agent, not a prompt: the complexity ladder.
- What an AI investing agent is made of: model, tools, instructions, memory.
- The four agent patterns for investing: tool calling, ReAct, CodeAct, orchestration.
- From demo to real: the production gap, and why finance AI projects stall.
For the PDF, go to the AI Agents for Investing book, which builds all of it in code: the tools, the four patterns, and a working portfolio assistant with runnable notebooks. See also the sibling guide on AI for forecasting.
The research behind this
Before Quaintitative I was head of investment risk management at the MAS, and my PhD research built AI models for investment and risk management, published in peer-reviewed venues:
- Learning Knowledge-Enriched Company Embeddings for Investment Management - ICAIF 2021.
- Investment and Risk Management with Online News and Heterogeneous Networks - ACM Transactions on the Web.
- Temporal Implicit Multimodal Networks for Investment and Risk Management - ACM Transactions on Intelligent Systems and Technology, 2024.
More on Google Scholar.
Get more
I am publishing more on AI in investing and finance in the coming weeks. Subscribe to get it.