This repository contains the data and code for the analyses by Richard W. Evans (@rickecon) and Ike Brannon in the June 2025 article, "Microeconomic and Macroeconomic Effects of Restoring Full R&D Expense Deductibility in Section 174".
We have created a Google Colab notebook RDcredit2025.ipynb
with code almost exactly the same as the code in the Jupyter Notebook rdcredit_ccc.ipynb.ipynb
decribed in the next section. This notebook only runs the Cost-of-Capital-Calculator analyses and not the macroeconomic simulations from the `` Python script. The Google Colab notebook RDcredit2025.ipynb
has the advantage of using a distribution of Python and corresponding packages that run in the cloud on remote servers instead of on your local machine. This allows you to use the notebook from any kind of device with a browser. You can execute the code, see the results, and save output to a temporary cloud folder from which you can download anything you want to keep.
This repository contains a Jupyter Notebook rdcredit_ccc.ipynb
that can be run locally on your own machine to replicate the Cost-of-Capital-Calculator analyses in the article. The macroeconomic simulations in the article using the open source OG-USA macroeconomic model of US fiscal policy can be run by executing the rdcredit_ogusa.ipynb
Python script. You can also modify the notebook and Python script to use for other analyses you might want to experiment with. To run this notebook and Python script locally on your machine, do the following steps:
- Fork and clone (or download) the https://github.com/OpenSourceEcon/RDcredit2025 repository
- In your computer's terminal, navigate to the directory of the
RDcredit2025
repository on your local machine. - Create the conda environment
rdcredit-dev
by typing the following command:conda env create -f ./code/environment.yml
- Activate the
rdcredit-dev
conda environment by typing the following command:conda activate rdcredit-dev
- This should allow your
rdcredit_ccc.ipynb
notebook to run while this conda environment is activated. And you should be able to run therdcredit_ogusa.py
Python script for the macroeconomic simulations.
This repository contains the following items:
/data/
directory. This directory contains the data used in the analyses in the article./data/OECD_RDTAX_DB2025_1.xlsx
. Excel file with OECD data for rankings in “R&D tax expenditure and direct government funding of BERD”.
/papers/
directory. This directory contains PDFs of two papers cited in the article./papers/BloomEtAl2019.pdf
. Bloom, Nicholas, John Van Reenen, and Heidi Williams, “A Toolkit of Policies to Promote Innovation”, Journal of Economic Perspectives, 33 (3): 163–84 (Summer 2019)./papers/CowxEtAl2024.pdf
. Cowx, Mary, Rebecca Lester, and Michelle Nessa, “The Consequences of Limiting the Tax Deductibility of R&D”, Working Paper No. 4192, Stanford Business (July 2024).
/code/
directory. This folder contains the code for and output from the analyses in the article./code/environment.yml
. Condaenvironment.yml
file for creating conda environmentrdcredit-dev
./code/rdcredit_ccc.ipynb
Jupyter notebook. An executable notebook you can use to replicate all the Cost-of-Capital-Calculator analyses in the article. A corresponding Google Colab notebookRDcredit2025.ipynb
that can be run on your browser and executed in the cloud is available at the link in this sentence./code/rdcredit_ogusa.py
Python script. A Python script with the code to replicate the macroeconomic analysis from the article with the corresponding figures./code/RDcreditOutput/
directory. This folder contains the code, output Python objects, and figures from the macroeconomic analyses from the article using the OG-USA model./code/RDcreditOutput/OUTPUT_BASELINE
directory. This folder contains the steady state and transition path output from the baseline (current law) macroeconomic simulation./code/RDcreditOutpu/OUTPUT_BASELINE/SS/SS_vars.pkl
. Steady state output Python pickle file object from baseline simulation./code/RDcreditOutpu/OUTPUT_BASELINE/TPI/TPI_vars.pkl
. Transition path output Python pickle file object from baseline simulation.
/code/RDcreditOutput/OUTPUT_REFORM_NORETRO
directory. This folder contains the steady state and transition path output from the reform macroeconomic simulation with no retroactivity./code/RDcreditOutpu/OUTPUT_REFORM_NORETRO/SS/SS_vars.pkl
. Steady state output Python pickle file object from reform simulation with no retroactivity./code/RDcreditOutpu/OUTPUT_REFORM_NORETRO/TPI/TPI_vars.pkl
. Transition path output Python pickle file object from reform simulation with no retroactivity.
/code/RDcreditOutput/OUTPUT_REFORM_RETRO
directory. This folder contains the steady state and transition path output from the reform macroeconomic simulation with retroactivity back to 2022./code/RDcreditOutpu/OUTPUT_REFORM_RETRO/SS/SS_vars.pkl
. Steady state output Python pickle file object from reform simulation with retroactivity back to 2022./code/RDcreditOutpu/OUTPUT_REFORM_RETRO/TPI/TPI_vars.pkl
. Transition path output Python pickle file object from reform simulation with retroactivity back to 2022.
/code/RDcreditOutput/figs_for_doc
directory. This folder contains the.png
image files for the four figures in the article./code/RDcreditOutput/figs_for_doc/fig1_macro.png
. Figure 1. Percent change in macroeconomic variables from Section 174 reform allowing full R&D expensing deductibility, retroactive to 2022 versus no retroactivity: 2025-2035./code/RDcreditOutput/figs_for_doc/fig2_fiscal.png
. Figure 2. Percent change in fiscal variables from Section 174 reform allowing full R&D expensing deductibility, retroactive to 2022 versus no retroactivity: 2025-2035./code/RDcreditOutput/figs_for_doc/fig3_debt_gdp.png
. Figure 3. Change in government debt-to-GDP from Section 174 reform allowing full R&D expensing deductibility, retroactivity to 2022 versus no retroactivity: 2026-2035./code/RDcreditOutput/figs_for_doc/fig4_indiv_save.png
. Figure 4. Average annual percent change in household savings by lifetime income group from Section 174 reform allowing full R&D expensing deductibility, retroactivity to 2022: 2026-2035.