Producer Price Index
Get the Producer Price Index (PPI) for a variety of countries over time from the OECD. The PPI measures the average change over time in the prices received by domestic producers (manufacturing) for their output. Because producers tend to pass rising input costs on to their customers with a lag, the PPI is generally seen as a leading, upstream indicator of cost pressure that later shows up in the Consumer Price Index (CPI).
The index covers manufacturing output only, is not seasonally adjusted, and is set to 100 in the base year, which can vary per country.
The OECD stopped updating this series in its Key Economic Indicators dataset during 2023: annual values end in 2022, and monthly and quarterly values end in early 2023 for all but a couple of countries. A start_date after that point returns an empty DataFrame.
See definition: https://www.oecd.org/en/data/indicators/producer-prices-ppi.html
Also known as: PPI, wholesale prices, factory gate prices, upstream inflation.
No programming experience? With the Finance Toolkit MCP server, AI assistants such as Claude and ChatGPT can calculate the Producer Price Index for you. Just ask in plain English.
Calculate the Producer Price Index in Python
The Producer Price Index is available in the Economics module of the open-source Finance Toolkit. Install it with:
pip install financetoolkit -U
Then call get_producer_price_index as shown below.
from financetoolkit import Economics
economics = Economics(start_date='2018-01-01', end_date='2022-01-01')
economics.get_producer_price_index(
countries=['United States', 'Germany'],
period='yearly'
)
Which returns:
| United States | Germany | |
|---|---|---|
| 2018 | 106.059 | 102.758 |
| 2019 | 106.068 | 103.65 |
| 2020 | 103.849 | 103.15 |
| 2021 | 116.511 | 108.241 |
| 2022 | 134.46 | 122.75 |
Parameters
get_producer_price_index accepts the following parameters:
- countries (list[str] | str | None, optional): The countries to include in the data. Defaults to None.
- period (str | None, optional): Whether to return the monthly, quarterly or the annual data.
- rolling (int, optional): The rolling window size to use for smoothing the data (simple moving average). Defaults to None.
- trailing (int, optional): The trailing window size to use for summing the data over trailing periods (e.g. a trailing-4-quarter sum). Defaults to None.
- growth (bool, optional): Whether to return the growth data or the actual data.
- lag (int, optional): The number of periods to lag the data by.
- standardize (bool, optional): Whether to standardize (Z-Score) the result. When combined with growth=True, standardizes the growth values instead of the raw values. Defaults to False.
- rounding (int | None, optional): The number of decimals to round the results to. Defaults to None.
Related Economy
The Economics module page introduces the module, and the sidebar lists all of its functions.