Tax Foundation: Modularizing the Model That Informs Federal Tax Policy
Tax Foundation: Modularizing the Model That Informs Federal Tax Policy
| CLIENTTax Foundation | PILLAREngineering | SERVICESPython / VBA Migration / Version Control / CI/CD / Agile |
Highlights
- Replaced the Tax Foundation’s 30-year-old Taxes and Growth Model backend, translating thousands of lines of Excel and VBA into Python, giving economists an extensible, version-controlled codebase they can run on their laptops
- The model processes hundreds of thousands of anonymized IRS tax filings representing hundreds of millions of American taxpayers, simulating the revenue and distributional impact of proposed changes to federal tax law
- Implemented GitHub-based version control for both models and datasets, enabling analysts to run, compare, and reproduce simulations more reliably
- Built a CI/CD pipeline using CircleCI
- Delivered using an Agile approach with iterative releases, allowing the Tax Foundation team to validate results and adjust priorities throughout development
Challenge
The Tax Foundation is a leading independent tax policy nonprofit, and its research shapes federal tax policy debates at the highest levels. At the center of that work is the Taxes and Growth Model and its Individual Tax Calculator, a macroeconomic modeling engine that simulates how proposed changes to the tax code would affect revenues, GDP, wages, employment, and the distribution of the tax burden across American households. The model had been built and extended over roughly 30 years.
The model was built in Microsoft Excel and VBA: thousands of lines of code, with additional logic embedded directly in spreadsheet formulas. It worked, but it was fragile in ways that compounded over time. It took a lot of time and extensive training to make updates. There was no version control. Analysts could not run different model variants simultaneously. Simulations could not be reliably reproduced by someone other than the analyst who ran them. When a parameter changed, tracking what changed, when, and why was manual. And the model’s dependence on a proprietary platform limited who could work with it and how.
The Tax Foundation needed to move the model to Python: a language with strong support for scientific computing, readable enough for economists who are not primarily software engineers, and compatible with the team’s existing version control and collaboration workflows on GitHub. The goal was not just a translation. It was a new operational model for how the research team would develop, run, and share economic simulations going forward.
Action
V! Studios assigned two senior Python engineers to begin a technical deep dive into the legacy system, working alongside Tax Foundation analysts to understand the models, datasets, and workflows analysts actually used day to day. A key output of that analysis was a prioritized plan: rather than attempting a wholesale migration in one pass, V! Studios worked with the Tax Foundation team to sequence the work so that the highest-value improvements would arrive first, maximizing the return on the client’s budget at each stage. That understanding also shaped the skill profile for the junior developer who would join the team as translation work scaled up.
The four primary data sources, including the CBO Baseline projections and the IRS Public Use File of hundreds of thousands of anonymized tax returns, were each brought under version control in separate GitHub repositories. This structure allowed any combination of model version and data version to be specified, run, and reproduced by any analyst on the team.
Translation proceeded iteratively. V! Studios began with one of the more tractable models, establishing a working pattern before tackling the more complex Excel formula logic, where reverse-engineering was sometimes not straightforward and required working directly with Tax Foundation staff to understand the intent behind specific calculations. Test suites were written using the pytest framework, capturing existing output for a representative sample of calculations and running automatically against each new implementation to catch regressions before they propagated. The CI/CD pipeline was built on CircleCI with configuration stored alongside the code, so it evolved with the model rather than being maintained separately.
The engagement was structured to give Tax Foundation analysts offline capability throughout: simulations could be run on a laptop without a cloud connection. All code and tooling were open source. Documentation was written and committed to the repository alongside the code.
A deliberate strategic priority throughout the engagement was to build the Tax Foundation’s internal capacity, not just to deliver a finished system. V! Studios worked to equip the Tax Foundation’s economists and analysts with software engineering practices they could carry forward independently: version-control discipline, test-driven development, CI/CD workflows, and Python skills to extend and maintain the model themselves. The goal was a team that could own the system after the engagement concluded and train others within the organization as the model evolved.
Result
The Tax Foundation received a modern, maintainable Python codebase replacing a legacy Excel and VBA system that had accumulated significant operational risk over years of use. Analysts could run simulations simultaneously, save and share model variants, and reproduce results reliably, none of which had been straightforward before.
The model that emerges from this work continues to inform the Tax Foundation’s analysis of proposed federal tax legislation, including estimates cited in congressional testimony, mainstream media coverage, and policy debates affecting the tax treatment of hundreds of millions of American households. The infrastructure V! Studios built to run and version those simulations is part of what makes that analysis credible and reproducible.
Why It Matters
The VBA-to-Python migration for the Tax Foundation was not a line-by-line conversion. It required working with economists to understand which formulas were being computed, why, and how to implement them correctly in a new environment where the toolchain behaved differently. This kind of engagement sits at a meaningful intersection: translating scientific and mathematical logic from one computational environment to another, where the translation requires understanding the underlying math rather than just the code.
The stakes are significant. An economic model that produces incorrect results can influence federal tax policy affecting hundreds of millions of people. V! Studios treated the Tax Foundation’s model with the rigor it deserves: test suites written before translation begins, iterative validation with subject matter experts throughout, and an architecture designed for long-term maintainability rather than just initial delivery.