Skip to content

Home / Glossary / Inflation Rate (CPI)

Economics

Inflation Rate (CPI)

Year-over-year percentage rise in a basket of consumer prices.

The Consumer Price Index tracks the cost of a fixed basket over time; inflation is its rate of change. Central banks typically target ~2%. Year-over-year comparison removes seasonality and is the standard reporting convention.

Formula / theory

Inflation_t = (CPI_t / CPI_{t−12}) − 1

In Python

macro["yoy_inflation"] = macro["cpi"].pct_change(periods=12)

In SQL

SELECT date,
       cpi / LAG(cpi, 12) OVER (ORDER BY date) - 1 AS yoy_inflation
FROM macro_indicators
ORDER BY date;

Related terms