Analysis of the relationship between the NY Fed Global Supply Chain Pressure Index (GSCPI) and US Consumer Price Index (CPI) inflation, including a Streamlit dashboard and VAR forecast model.
The data pipeline ingests monthly GSCPI readings from the NY Fed and CPI sub-indices from FRED, merges the dataset, and executes the following statistical procedures:
- Augmented Dickey-Fuller stationarity tests
- Granger causality tests (lags 1-12 months)
- Lagged cross-correlation analysis
- VAR(p) forecast 12 months ahead
Results are displayed via an interactive Streamlit dashboard featuring four analytics tabs: historical comparison, lagged correlations, Granger causality, and VAR forecast.
A GitHub Actions workflow automatically updates the underlying datasets on the 5th of each month.
| Series | Source | Frequency |
|---|---|---|
| CPI (all items, core, food, energy, vehicles, shelter) | FRED (St. Louis Fed) | Monthly |
| Global Supply Chain Pressure Index | NY Federal Reserve | Monthly |
.
├── data_pipeline.py # Fetches and merges CPI + GSCPI data
├── statistical_analysis.py # Stationarity, Granger, lagged correlation, VAR forecast
├── app.py # Streamlit dashboard
├── forecast_model.py # Standalone VAR forecast script
├── requirements.txt
├── Dockerfile
├── .github/
│ └── workflows/
│ └── update_data.yml # Monthly cron job
├── cpi_data.csv # Raw CPI series (auto-updated)
├── gscpi_data.csv # Raw GSCPI series (auto-updated)
├── merged_data_for_bi.csv # Merged dataset used by the dashboard
└── forecast_data.csv # 12-month VAR forecast output
Clone the repository and install dependencies:
git clone https://github.com/atharvasathaye/Supply-chain.git
cd Supply-chain
pip install -r requirements.txtRefresh the data (optional, as the repository contains updated data):
python data_pipeline.py
python statistical_analysis.pyRun the dashboard:
streamlit run app.pyRun using Docker:
docker build -t supply-chain .
docker run -p 8501:8501 supply-chain- GSCPI Granger-causes CPI at all lags 1-12 months (p < 0.0001 at lag 1).
- Peak lagged correlation occurs at r = 0.63 with a 10-month lag.
- The VAR model forecasts YoY CPI inflation at approximately 3-4% through mid-2027.
These empirical results align with economic literature indicating that supply chain disruptions impact consumer prices with a 6-12 month lag.
The workflow defined in .github/workflows/update_data.yml executes on the 5th of every month. It retrieves the latest CPI and GSCPI data, regenerates the merged dataset and forecasts, and commits the updated CSV files back to the repository. Business intelligence tools such as Power BI or Tableau can connect directly to the raw GitHub CSV URLs.
- Python 3.10+
- Dependencies listed in
requirements.txt
Atharva Sathaye
