From 2015 to 2024 the effective federal funds rate sat below its baseline Taylor-rule prescription in 33 of 40 quarters, by as much as 8.3 pp in Q1 2022, and the gap carries statistically significant predictive content for core PCE inflation one to two quarters ahead.

Note
Needs R 4.0 or later and a free FRED API key. Sample window 2015 Q1 to 2024 Q4, FRED vintage 2026-09-08 (pinned in R/config.R). The published figures predate that pin; see Data availability.
This is the replication package for the deep dive Discretion Over Rules: Federal Reserve Policy Departures and the Inflation Surge of 2021–2022. R pulls quarterly macroeconomic series from FRED, computes three Taylor-rule specifications and an ECB comparison, and tests for Granger causality and cross-correlation between the deviations and core PCE inflation. It exports Chart.js widgets and static PNG fallbacks.
- Clone:
git clone https://github.com/nik110403/taylor-rule.git && cd taylor-rule - Get a free FRED API key at https://fredaccount.stlouisfed.org/apikeys, then
cp .Renviron.example .Renvironand setFRED_API_KEY=to your key. R loads.Renvironfrom the project root. - Run everything from the repo root:
Rscript run_all.R. Missing packages (fredr,dplyr,vars,tseries,lmtest,zoo,lubridate) install on first run throughR/setup.R. - Check the result: the run ends with a checklist of every expected output file. PNG figures are in
output/figures/, widgets inoutput/widgets/.
| Exhibit | Script | Output |
|---|---|---|
| Hook: policy gap and core PCE inflation | R/04_hook_figure.R, R/04_pngs.R |
output/figures/fig0_hook.png, output/widgets/fig0_hook.html |
| Three Taylor-rule variants against the funds rate | R/03_figures.R, R/04_pngs.R |
output/figures/fig1_taylor_vs_actual.png, output/widgets/fig1_taylor_vs_actual.html |
| Baseline deviation by quarter | R/03_figures.R, R/04_pngs.R |
output/figures/fig2_deviation.png, output/widgets/fig2_deviation.html |
| Deviation against core PCE two quarters later | R/03_figures.R, R/04_pngs.R |
output/figures/fig3_scatter.png, output/widgets/fig3_scatter.html |
| ECB deviation against euro area HICP | R/03_figures.R, R/04_pngs.R |
output/figures/fig4_ecb.png, output/widgets/fig4_ecb.html |
| Cross-correlation across lags | R/03_figures.R, R/04_pngs.R |
output/figures/fig5_ccf.png, output/widgets/fig5_ccf.html |
| VAR(4) assumption diagnostics | R/05_assumption_checks.R |
output/assumption_report.md |
The paper numbers its figures in reading order, so its Figure 1 is the hook and its Figure 2 is fig1_taylor_vs_actual, and so on.
Three US variants, all floored at zero:
| Rule | Formula | r* | Notes |
|---|---|---|---|
| Baseline | r* + π + 0.5(π − π*) + 0.5·y_gap | 0.5% | Post-GFC Laubach-Williams |
| Alternative | same | 1.0% | Robustness |
| Inertial | 0.75·r_{t−1} + 0.25·baseline | 0.5% | Partial adjustment |
π is core PCE year-over-year %, π* is 2%, and y_gap = 100·(GDPC1 − GDPPOT)/GDPPOT.
The ECB comparison (fig4) uses r* = 1.0%, euro area HICP for π and no output-gap term, because euro area potential output is not available on FRED. It is prescribed against ECBDFR.
R/02_analysis.R runs ADF stationarity tests on inflation and the deviation series, bivariate Granger causality at lags 1 to 4 in both directions, VAR(4) Granger causality (vars::causality), and a cross-correlation of the baseline deviation against core PCE at lags 0 to 8 quarters. R/05_assumption_checks.R reports normality, serial-correlation and heteroskedasticity diagnostics for the VAR(4).
All data come from FRED and are subject to its terms. They are public. They are not covered by the code licence.
| Series ID | Description | Transformation |
|---|---|---|
FEDFUNDS |
Effective federal funds rate | levels |
PCEPILFE |
Core PCE deflator | YoY % (pc1) |
PCEPI |
Headline PCE deflator | YoY % (pc1) |
GDPC1 |
Real GDP | levels |
GDPPOT |
CBO potential real GDP | levels |
UNRATE |
Unemployment rate | levels |
NROU |
Natural rate of unemployment (CBO) | levels |
ECBDFR |
ECB deposit facility rate | levels |
CP0000EZ19M086NEST |
Euro area HICP | YoY % (pc1) |
Monthly series convert to quarterly by taking the last observation of each quarter. The raw pulls are not committed to this repository (data-raw/ is git-ignored); R/01_data.R writes them locally.
Vintage and revisions:
- FRED revises historical series, including
GDPPOT(CBO potential output), with each CBO Budget and Economic Outlook. Results reproduce exactly only against the vintage retrieved for the published piece. Later pulls shift the output-gap series and therefore every Taylor prescription. - The sample window is locked at 2015 Q1 to 2024 Q4 in
R/config.R(START_DATE,END_DATE). R/config.RpinsFRED_VINTAGE(2026-09-08), passed asrealtime_startandrealtime_endon every FRED pull, with the raw response archived underdata-raw/fred/<FRED_VINTAGE>/. The published figures predate this pin and reflect whatever FRED reported at publication time. Re-runningR/01_data.Rreproduces the FRED state as ofFRED_VINTAGE, which diverges from the published numbers as FRED revisesGDPPOTand other series.- The paper documents the vintage used and the direction of any revisions.
taylor-rule/
├── run_all.R # runs the pipeline in order, then lists expected outputs
├── R/
│ ├── config.R # sample window, π*, r* assumptions, FRED key
│ ├── setup.R # package management
│ ├── 01_data.R # FRED pull, quarterly conversion -> output/data/df_quarterly.rds
│ ├── 02_analysis.R # Taylor variants, ECB rule, ADF/Granger/CCF -> df_analysis.rds, df_ccf.rds
│ ├── 03_figures.R # Chart.js widgets, figures 1 to 5
│ ├── 04_hook_figure.R # hook widget (fig0)
│ ├── 04_pngs.R # static PNG export
│ └── 05_assumption_checks.R # VAR(4) diagnostics -> output/assumption_report.md
├── output/
│ ├── figures/ # PNG figures
│ ├── widgets/ # Chart.js fragments (*.html)
│ └── assumption_report.md
├── assets/ # banner and social preview (made by tools/banner)
├── .Renviron.example # template for the FRED API key
├── CITATION.cff
├── LICENSE # MIT (code)
└── LICENSE-docs # CC BY 4.0 (text and figures)
The *.rds files are written to output/data/ at run time and are not committed. The widgets load Chart.js 4.4.1 from jsDelivr and follow the author's site embed contract (theme set by the is-light class on <body>). To reuse one, paste the HTML fragment into a page that serves Chart.js from the same CDN.
Archived on Zenodo: doi:10.5281/zenodo.23404665 (all versions). GitHub shows a "Cite this repository" button from CITATION.cff. BibTeX:
BibTeX
@misc{taylor_rule2026,
author = {Khosravipour, Nik},
title = {Discretion Over Rules: Federal Reserve Policy Departures and the Inflation Surge of 2021--2022},
year = {2026},
doi = {10.5281/zenodo.23404665},
url = {https://github.com/nik110403/taylor-rule}
}Code: MIT. Text and figures: CC BY 4.0. Third-party data (FRED, CBO) is not covered by either licence and stays subject to its source terms.