Skip to content

The Data Scientist

Financial Model

Generating a Financial Model Is the Easy Half. Moraton Is Built for the Other Half.

Ask almost any AI tool aimed at finance to build you a three statement model and it will do something impressive. It will lay out the schedule, wire the revenue build to the drivers, tie the balance sheet, and hand it back faster than a first year could open the template. This is genuinely hard engineering and it now mostly works.

It is also the wrong thing to be proud of.

The errors that cost real money in investment analysis are almost never blank cells. They are filled cells. Capex entered as a positive number so the cash flow builds instead of drains. A reference pointing at last quarter’s tab because somebody duplicated a sheet and half the links followed. A growth assumption a partner overrode by typing 4.5% directly into a cell that used to hold a formula, at eleven at night, with every intention of putting the formula back.

Nobody put the formula back. That is the genre.

Why Checking Is Harder Than Writing

Generation has a forgiving property: you know what you were trying to produce. Verification does not. A checker has to look at a workbook it did not write, infer what each block was supposed to mean, and then find the places where the intent and the arithmetic have quietly diverged. There is no answer key. The only signal is internal inconsistency.

That is a different computational problem and it rewards different design. You need to walk the dependency graph rather than the visual grid, because the cell that breaks a model is rarely near the cell where the number looks wrong. You need to distinguish a deliberate hardcode from an accidental one, which means reading the surrounding convention rather than pattern matching on “this cell has no formula.” You need to know that a sign flip in a working capital line is catastrophic and a sign flip in a memo row is cosmetic.

None of that demos as well as watching a model appear from nothing. All of it is what an analyst actually needs at one in the morning.

Reading the Workbook Back

Moraton runs inside Excel, where the analysis already lives, and it is deliberately organised around the second pass. It writes formulas, then it reads the workbook back looking for the named failure modes: sign flips, dead links, circular references, and hardcoded overrides sitting where a calculation used to be. The output is not a verdict on whether the model is right. It is a list of what was checked and what looked wrong, with the row.

That distinction matters more than it sounds. A tool that told an analyst the model was correct would be making a claim it cannot support and creating a liability the analyst would end up owning personally. A tool that says row 118 has capex entered positive is making a claim it can support completely. The analyst still decides.

The architecture follows the same logic elsewhere. Market data comes from the firm’s own licensed subscription rather than being supplied or redistributed by the vendor, which removes an entire category of licensing argument before it starts. And a person signs off every output before it leaves. The software is software, not research and not investment advice.

What This Says About Applied AI Generally

There is a pattern worth naming here that reaches past finance. In any domain where the cost of a confident wrong answer is high, the product surface that matters is not the generator. It is the auditor. Code review outlives autocomplete. Test suites outlive scaffolding. The generative layer goes commodity fast, and the verification layer is where the difficult, unglamorous, domain-specific work piles up.

Finance is a good early case because the failure is so legible. A sign flip either is or is not on row 118. You can build a checker against that. You cannot build a checker against “is this essay any good,” which is why the essay tools all still ship a confident paragraph and hope.

There is a second reason the checking pass is the one to build. An analyst who has been burned once does not want a faster model. They want to walk into the room knowing what has been looked at. The anxiety is not about speed, it is about exposure, and those two problems have completely different products attached to them. Most of this category is still solving the first one.

The firms that adopt this well will be the ones that stop asking whether the machine can build the model and start asking what it looked at. The per seat pricing is published, which in a category that hides everything behind a sales call is its own small signal about what the product expects to be judged on.

Build fast. Then read it back. The second part is the job.

Technical Implementation: Auditing Workbook Read-Back Flags with Python and pandas

To illustrate how row-level read-back verification logs can be summarized across deal workbooks, analysts can export flagged cell records into Python using pandas. In our classroom walkthrough dataset below, we construct an explicit 6-row DataFrame in pandas covering the four named failure modes across three workbook sheets: two sign_flip flags on the Bridge sheet (row 118 with cell H118 at 4800.0 and FCF impact 9.6, and row 119 with cell H119 at 1250.0 and FCF impact 2.5), two hardcoded_override flags on the Comps sheet (row 86 with cell F86 at 0.045 and FCF impact 3.2, and row 124 with cell H124 at 0.92 and FCF impact 1.8), one dead_link flag on the Debt sheet (row 41 with cell H41 at 0.0 and FCF impact 4.0), and one circular_reference flag on the Debt sheet (row 44 with cell D64 at 0.0 and FCF impact 5.5). Using pandas groupby aggregation in Python, we compute Flag Count \(flag_count\), First Flagged Row \(first_row\), and Total FCF Impact \(total_fcf_impact_k\) per Failure Mode \(failure_mode\):

import pandas as pd

# Construct an explicit 6-row dataset in pandas of workbook read-back flags
audit_df = pd.DataFrame([
    {"sheet": "Bridge", "row_num": 118, "cell_ref": "H118", "failure_mode": "sign_flip", "entered_val": 4800.0, "fcf_impact_k": 9.6},
    {"sheet": "Bridge", "row_num": 119, "cell_ref": "H119", "failure_mode": "sign_flip", "entered_val": 1250.0, "fcf_impact_k": 2.5},
    {"sheet": "Comps", "row_num": 86, "cell_ref": "F86", "failure_mode": "hardcoded_override", "entered_val": 0.045, "fcf_impact_k": 3.2},
    {"sheet": "Comps", "row_num": 124, "cell_ref": "H124", "failure_mode": "hardcoded_override", "entered_val": 0.92, "fcf_impact_k": 1.8},
    {"sheet": "Debt", "row_num": 41, "cell_ref": "H41", "failure_mode": "dead_link", "entered_val": 0.0, "fcf_impact_k": 4.0},
    {"sheet": "Debt", "row_num": 44, "cell_ref": "D64", "failure_mode": "circular_reference", "entered_val": 0.0, "fcf_impact_k": 5.5}
])

flag_summary = (
    audit_df.groupby("failure_mode", as_index=False)
    .agg(
        flag_count=("row_num", "count"),
        first_row=("row_num", "min"),
        total_fcf_impact_k=("fcf_impact_k", "sum")
    )
)
print(flag_summary)

Running the aggregation script above on our 6-row walkthrough dataset produces four grouped summary rows across the four failure modes with columns Failure Mode \(failure_mode\), Flag Count \(flag_count\), First Flagged Row \(first_row\), and Total FCF Impact \(total_fcf_impact_k\): circular_reference with 1 flag, first row 44, and total FCF impact 5.5k; dead_link with 1 flag, first row 41, and total FCF impact 4.0k; hardcoded_override with 2 flags, first row 86, and total FCF impact 5.0k; and sign_flip with 2 flags, first row 118, and total FCF impact 12.1k:

Failure Mode \(failure_mode\) Flag Count \(flag_count\) First Flagged Row \(first_row\) Total FCF Impact \(total_fcf_impact_k\)
circular_reference 1 44 5.5k
dead_link 1 41 4.0k
hardcoded_override 2 86 5.0k
sign_flip 2 118 12.1k

References

Free Agentic Course • Beyond Machine

Building Autonomous AI & Data Agents with Python

Learn to architect, evaluate, and deploy autonomous LLM agents with Python and LangChain.