Detecting Inflationary Regimes via Producer–Consumer Price Divergence
Abstract
This paper formalises a rule-based indicator of inflationary pressure that exploits divergence between the Producer Price Index (PPI) and the Consumer Price Index (CPI). Year-on-year rates are transformed into a differential series and standardised using a rolling median and median absolute deviation (MAD) to obtain a robust z-score. Thresholds applied to the robustised differential, conditional on the absolute level of CPI, yield categorical regimes—HOT, NEUTRAL, and COOL. The specification is designed for operational use in macro monitoring and portfolio overlays.
1. Data
- CPI: Consumer Price Index for All Urban Consumers (
CPIAUCSL), monthly, not seasonally adjusted. - PPI: Producer Price Index for All Commodities (
PPIACO), monthly, not seasonally adjusted. - USREC: NBER Recession Indicator (
USREC), monthly indicator (optional for contextual overlays).
Observations are merged on Date using an outer join, restricted to 2005‑01‑01 onwards to focus on the modern inflation regime. Where higher-frequency irregularities occur, the series are conformed to month-end by last observation carried forward within the month.
2. Methodology
- Convert
Dateto timezone-naïve monthly timestamps; sort ascending. - Compute year-on-year inflation rates:
CPIYoY,t = 100 × (CPIt − CPIt−12)/CPIt−12PPIYoY,t = 100 × (PPIt − PPIt−12)/PPIt−12
- Calculate divergence and robust z‑score:
Dt = PPIYoY,t − CPIYoY,tzt = (Dt − Median(Dt−w+1:t)) / (1.4826 × MAD(Dt−w+1:t))
- Apply classification rules:
- HOT: zt ≥ 1.0 or (zt ≥ 0.75 and CPIYoY,t ≥ 3.0%)
- COOL: zt ≤ −1.0 or (zt ≤ −0.5 and CPIYoY,t ≤ 1.5%)
- NEUTRAL: otherwise
The robust standardisation uses a 60‑month rolling window to balance responsiveness and stability. Windows with MAD = 0 are excluded from classification.
3. Sensitivity and Limitations
- Thresholds (±1.0, ±0.75, ±0.5) approximate 75th/25th percentile cut‑offs; these can be recalibrated to adjust signal frequency.
- Energy and food price shocks may distort short‑term readings; the robust approach mitigates but does not eliminate this effect.
- Pass‑through from producer to consumer prices is not instantaneous; interpret signals as directional indicators.
4. Implementation Notes
def _robust_zscore(s, window=60):
s = s.astype(float)
med = s.rolling(window, min_periods=1).median()
mad = (s - med).abs().rolling(window, min_periods=1).median()
z = (s - med) / (mad.replace(0, float('nan')) * 1.4826)
return z
monthly['CPI_YoY'] = monthly['CPIAUCSL_Value'].pct_change(12) * 100
monthly['PPI_YoY'] = monthly['PPIACO_Value'].pct_change(12) * 100
monthly['PPI_minus_CPI_YoY'] = monthly['PPI_YoY'] - monthly['CPI_YoY']
monthly['divergence_z'] = _robust_zscore(monthly['PPI_minus_CPI_YoY'], window=60)
# Classification
def map_inflation_signal(row):
if pd.isna(row['CPI_YoY']) or pd.isna(row['PPI_YoY']) or pd.isna(row['divergence_z']):
return 'NEUTRAL'
if (row['CPI_YoY'] >= 3.0 and row['divergence_z'] >= 0.75) or row['divergence_z'] >= 1.0:
return 'HOT'
if (row['CPI_YoY'] <= 1.5 and row['divergence_z'] <= -0.5) or row['divergence_z'] <= -1.0:
return 'COOL'
return 'NEUTRAL'
5. Reproducibility
- Record data provenance (
CPIAUCSL,PPIACO,USREC) and revision dates. - Fix window size, threshold, and software environment for deterministic results.
- Persist panel output and categorical signals with timestamps for traceability.
6. Applications
This indicator can be integrated into macroeconomic dashboards, inflation‑linked asset overlays, and multi‑factor allocation models. Combining it with recession overlays and survey price expectations enhances signal validation.