On the “number of periods” variable in financial models.

Why move cells when you could change one variable? For an AI, it’s one change instead of hundreds of formulas across a thousand cells — each one a chance to hallucinate.

A
Aidos Adilkhanov
|October 7, 2026|2 min read

Ask a programmer to build a forecast, and I’d bet most of them would make the number of periods a single variable: change it, and the whole forecast recalculates.

Now picture that programmer getting into financial modeling. Financial models are mostly forecasts and plans for future periods — so they’d be surprised to find there’s usually no such variable, and that extending a model means real work, not just adding new inputs (which they’d probably automate too, even if only with a simple regression). It certainly surprised me when I got into the field.

We think a new discipline is taking shape — financial model engineering — and we wrote a manifesto about it six months ago. When financial models are built with engineering practices, “the number of periods is one variable — change it and everything recalculates” is at the very least possible, and may well become the standard.

It’s the smallest example we could think of, and a first step in showing how we think financial modeling is going to change.

You can already build models like this in Modeleon: you write the model in Python with our open-source library, and you get an Excel file with every formula intact. It’s free on the platform, or you can run it locally from GitHub.

Here’s a real example, shared publicly: its horizon is one input, “Number of periods” on the Time-independent sheet. These are the lines of its code that make it so — the input, and the line that turns it into the model’s horizon:

Python
setup.periods = mo.Variable(15, display_name="Number of periods", unit="#",
                            description="Periods from the model start; must reach the lease end")
...
lakeshore.default_periods = int(lakeshore.ti.setup.periods.value)  # the horizon: one input

Change the number of periods from 15 to 22 in Modeleon and press Run: every sheet now runs to 2045, every check stays green, and every calculation stays a live Excel formula. Nothing copied, nothing moved by hand.

Try the model yourself — open it and download the Excel without an account. Its “Sign up to edit” button gives you a free copy of your own to change and Run.

From financial model engineering to the company’s brain.

Python and Excel go straight into one live model — the company brain you can open.

Try the model