AT Think

The case for an AI financial modeling agent

The software development world has been transformed by AI-powered coding assistants such as Cursor and Claude Code, which have changed how engineers write and debug code. 

These tools can generate contextually relevant code based on user prompts, accelerating the software development process and enabling engineers to be multiple times more productive. Is it time for a similar AI-powered financial modeling assistant in Excel?

Financial modeling, much like coding, involves numerous interconnected spreadsheet tabs, complex logical structures built through Excel formulas and links, and specialized domain knowledge. An ideal solution would be an AI modeling agent tool where it can understand the context of spreadsheet tabs and generate models while financial analyst prompts, much like a Cursor for Excel. However, the current general-purpose tools, like Excel Copilot, fall short when asked to generate financial models and we might need more specialized solutions.

The demand across financial disciplines

As a valuation analyst and former investment banking professional, I frequently use Excel to build valuation models such as Discounted Cash Flow and Option Pricing Models. As an Excel power user, I would eagerly subscribe to such an AI modeling tool. The potential application of an AI financial modeling agent spans across accounting firms, investment banks, and financial and risk consulting firms, etc. With a short prompt, finance professionals can generate detailed models and collaborate with AI financial modeling agents throughout the workflow.

How to build the AI Financial Modeling Tool

I haven't been able to discover any similar tool currently available on the market. The most straightforward approach would be to develop a web application as an Excel add-in, similar to how Claude Code functions as an extension for VS Code. Alternatively, developers can choose to build an AI-native spreadsheet solution much like Cursor, where both the traditional spreadsheet and AI solution are integrated into a unified platform. 

The difference between coding files (e.g., .py) and Excel files (.xlsx) might be that there's an extra visualization layer on top of the code. This means an AI modeling agent might need to generate and execute code live based on human prompts, effectively simulating the modeling behavior of humans in real-time. Fortunately, Excel provided some scripting language tools such as Script Lab where it can interact with Excel via APIs. Below is an experiment where I tried to create a mini discounted cash flow model through prompting a Generative AI model and Microsoft Script Lab.

DCF model with Claude and Script Lab

The general setup involved prompting Claude to create a mini discounted cash flow model in Excel, then transferring the generated TypeScript and HTML code into the Script Lab Excel add-in for execution. The process looks like this:

ai-flowchart.png

First, I prompted Claude to create a DCF model:

claude-dcf-model.png

Then, Claude generated TypeScript and HTML code containing the DCF model logic and structure.

claude-typescript.png

In Script Lab, I pasted over and executed the AI generated code, which automatically generated a draft DCF calculation in the spreadsheet.

script-lab-claude.png

Admittedly, debugging the Script Lab code with Claude's assistance took longer than building this simple model from scratch. However, as AI systems learn and continuously self-train, I anticipate it would take way less effort to create a larger and complex model across multiple spreadsheet tabs. Imagine having a junior analyst who exists on a cloud server and can self-train financial modeling 24/7? The productivity gains would be substantial.

Financial modeling is overdue for its own specialized AI assistant, much like how engineers now rely on tools like Cursor. A dedicated AI modeling agent could dramatically streamline the workflow for analysts, auditors and bankers alike. The opportunity is clear: an AI-native financial modeling assistant will transform how finance professionals work, and I'm excited for the day when it becomes an indispensable part of every finance professional's toolkit.

For reprint and licensing requests for this article, click here.
Technology Artificial intelligence Data modeling
MORE FROM ACCOUNTING TODAY