Making AI Financial Models Deterministic: A Skill That Generates Editable DCF Excel Workbooks
From the publisher’s feed, collected in the ZeroLabs newsroom.
AI can already write a discounted cash flow model.That is not the hard part.The hard part is trusting it.A DCF model is not just a calculation. It is a chain of assumptions, formulas, source data, formatting conventions, and judgment calls. If an AI assistant gives you a fair value estimate in chat, you still have to ask: where did the data come from, which formula did it use, what assumptions were applied, and can I change them?That is why I built defeatbeta-dcf, a skill for generating fully editable DCF valuation spreadsheets from structured market data.The goal is simple: let AI do the mechanical work, but keep the model transparent, deterministic, and under the user’s control.The Problem With Free-Form AI Financial ModelsMost AI-generated financial models have the same weakness: the model lives inside the conversation.The assistant explains the logic, maybe prints a table, maybe writes some formulas, and gives you an intrinsic value estimate. But the final result is often difficult to audit. You cannot easily trace every output cell back to its assumption. You cannot comfortably hand it to another analyst. You cannot tweak WACC or terminal growth and watch the valuation update like a real model.For financial work, that is a serious limitation.Finance users do not just need an answer. They need a model.And a model should be:editableformula-drivenauditablereproduciblebased on real dataclear about assumptionsThat is the design philosophy behind defeatbeta-dcf.The Core Design: AI as an Operator, Not the Model AuthorThe key idea is to avoid letting the AI freely invent the model.Instead, the skill gives the AI a narrow, deterministic workflow:Call the defeatbeta MCP tool to fetch structured DCF data.Save the returned payload as JSON.Run a fixed Python script to build the Excel workbook.Write formulas into the spreadsheet instead of hard-coded projections.Optionally recalculate the workbook with LibreOffice so previews show cached values.Return the finished .xlsx file to the user.In other words, the AI is not trusted to improvise the financial model.The AI orchestrates the workflow. The data layer provides the inputs. The script controls the workbook structure. Excel formulas perform the calculations.That separation matters.It makes the output far more predictable than asking an LLM to “build a DCF model” from scratch every time.What the Skill GeneratesThe skill creates a single-sheet Excel workbook with four main sections.The first section estimates the discount rate, including market cap, beta, debt, interest expense, risk-free rate, expected market return, cost of debt, cost of equity, and WACC.The second section shows growth estimates, including historical revenue, EPS snapshots, revenue CAGR, EPS CAGR, and Treasury yield averages.The third section is the DCF template. It includes near-term growth, longer-term growth, terminal growth, discount rate, TTM revenue, base free cash flow, and 10-year projected free cash flows.The fourth section calculates enterprise value, equity value, fair price, margin of safety, and a simple buy/sell recommendation.The important part is that projections and valuation outputs are not pasted as static numbers. They are live Excel formulas.That means the user can open the workbook, change assumptions, and immediately see the valuation update.Why Formula-Driven Excel Still MattersA chat answer is useful for explanation.An Excel model is useful for analysis.This skill intentionally outputs Excel because financial users already understand the workflow: change the assumptions, inspect the formulas, compare the result, and challenge the model.Editable input cells are visually marked with light grey fill and blue font. Formula cells use standard formatting. Key totals such as WACC and fair price are highlighted.That small design choice makes the workbook usable. Users can quickly tell which cells are assumptions and which cells are derived outputs.For example, the default discount rate links to WACC. But if the user wants to test a 10% discount rate, they can replace the linked formula with 10% and watch fair price recalculate.The model does not disappear when the AI conversation ends. It becomes a normal spreadsheet that can be reviewed, modified, and reused.Real Data, Standard DCF LogicThe skill uses structured DCF inputs from defeatbeta-api, including financial statement data, market data, growth estimates, WACC components, cash, debt, share count, and current price.The DCF logic follows the standard structure:estimate free cash flowproject future cash flowscalculate terminal valuediscount projected values back to present valueadjust enterprise value for cash and debtdivide by shares outstandingcompare fair price with current priceThe model is not meant to remove judgment. DCF never removes judgment.Growth rates, WACC, terminal assumptions, and normalized free cash flow still require human review. The point is not to pretend valuation is objective. The point is to make the assumptions visible and editable.That is where AI is most useful: not replacing judgment, but removing repetitive work around judgment.A Better Pattern for AI SkillsThe most interesting part of this project is not the DCF itself.It is the pattern.A good AI skill should not simply give the model more instructions. It should give the model a reliable procedure and deterministic tools.For this skill, the pattern looks like this:LLM orchestration ↓structured financial data ↓deterministic Python generation ↓formula-driven Excel workbook ↓human review and adjustmentThis is a safer architecture than asking the LLM to generate an entire financial model directly.It also makes failures easier to reason about. If the data is missing, the MCP tool returns an error. If formulas are wrong, the script can be tested. If assumptions are too aggressive, the user can edit them.Each layer has a clear responsibility.ExampleA user can run:/defeatbeta-dcf do a DCF for AAPLThe skill then fetches structured financial data, builds the workbook, recalculates the formulas, and returns the result directly in the chat.Claude chat responseThe generated workbook is not a static report. It is a live Excel model with editable assumptions and formula-driven valuation outputs.Generated DCF workbook for AAPL, with editable assumptions and live Excel formulas.The skill then generates an editable workbook such as AAPL_DCF.xlsx.The output includes key DCF inputs, valuation summary, and the Excel file itself.From there, the user can change assumptions like:near-term growth rateterminal growth ratediscount ratecash and short-term investmentscurrent share priceshare countThe valuation updates through spreadsheet formulas.Why This MattersAI financial tools often fail in one of two ways.Some are too conversational. They produce impressive explanations but weak artifacts.Others are too black-box. They produce outputs, but users cannot see or challenge the mechanics.This skill tries to sit in the middle.It uses AI to automate the boring parts, but it produces a transparent spreadsheet that a human can inspect.That is the direction I think AI financial modeling should move toward: deterministic workflows, real data, editable outputs, and human-controlled assumptions.AI should not be the final authority in valuation.It should be the assistant that builds the model cleanly enough for you to disagree with it.LinksExample walkthrough: https://github.com/defeat-beta/defeatbeta-api/blob/main/skills/examples/defeatbeta-dcf.mdSkill source: https://github.com/defeat-beta/defeatbeta-api/tree/main/skills/defeatbeta-dcfDefeat Beta API: https://github.com/defeat-beta/defeatbeta-apiMaking AI Financial Models Deterministic: A Skill That Generates Editable DCF Excel Workbooks was originally published in Towards AI on Medium, where people are continuing the conversation by highlighting and responding to this story.