Retrieves the World Bank’s monthly commodity prices from 1960 (The Pink Sheet): the average price of each month in US dollars of around seventy commodities, among which crude oil (Brent, WTI, Dubai), natural gas, coal, gold, silver, platinum, copper, aluminum, iron ore, nickel, zinc, grains, softs and fertilizers. Futures prices from exchanges reach back to 2000 at most, which leaves out the commodity booms and busts of the 1970s and 1980s, such as gold’s peak of January 1980 and the oil shocks.

With deflate_with, the prices are in real terms: in the money of the latest month of that country’s consumer price index up to the end date (see get_consumer_price_index), so that the gold price of 1980 can be compared with today’s. A month after the latest month of the consumer price index, which is published a few weeks late, keeps its nominal price, and a month the consumer price index skipped has no real price.

The formula is as follows:

\[\text{Real Price} (t) = \text{Price} (t) \cdot \text{CPI} (\text{latest month}) / \text{CPI} (t)\]

The units are those of the World Bank: US dollars per barrel ($/bbl) for crude oil, per million British thermal units ($/mmbtu) for natural gas, per troy ounce ($/troy oz) for gold, silver and platinum, per metric ton ($/mt) for coal, base metals, grains, oils and fertilizers, per kilogram ($/kg) for cocoa, coffee, tea, sugar, meat, fruit, cotton and rubber, per dry metric ton unit ($/dmtu) for iron ore, per cubic meter for logs and sawnwood and cents per sheet for plywood. The Natural gas index is an index (2010=100).

Also known as: Pink Sheet, commodity price history, long-run gold price, real gold price, real oil price, inflation-adjusted commodity prices.

Commodity Prices in Python or via the MCP

Install the Finance Toolkit with:

pip install financetoolkit -U

Then call get_commodity_prices as shown below.

from financetoolkit import Economics

economics = Economics(start_date="1979-01-01", end_date="2026-10-31")

prices = economics.get_commodity_prices(commodity="Gold", deflate_with="United States")
prices.loc[["1980-01", "2011-09", "2026-01"]]

Or, after setting up the Finance Toolkit MCP, ask:

What was the gold price in today's dollars in January 1980, September 2011 and January 2026?

Which returns:

  Gold
1980-01 2923.32
2011-09 2631.5
2026-01 4923.8

Parameters

get_commodity_prices accepts the following parameters.

ParameterTypeDescriptionExample
commoditystr | list[str] | NoneThe commodities, e.g. “Gold” or [“Gold”, “Crude oil Brent”], as named by the World Bank without commas (“Crude oil, Brent” is “Crude oil Brent”), in any casing. Defaults to None, which returns all of them."Gold"
deflate_withstr | NoneThe country whose consumer price index the prices are deflated with, e.g. “United States” for US dollar prices. Defaults to None, which returns nominal prices.None, which returns nominal prices
roundingint | NoneThe number of decimals to round the results to. Defaults to None, which uses the rounding of the Economics class.2
growthboolWhether to calculate the growth. Defaults to False.True
lagintThe lag in months for the growth, e.g. 12 for the change over a year. Defaults to 1.4
standardizeboolWhether to standardize (Z-Score) the result. Defaults to False.True
show_columnsstr | list[str] | NoneThe columns to keep, a name or a list of names, matched on every column level, or the rows when no column has those names (such as the line items of a financial statement). Names that do not exist are logged, and when none exist the result is returned in full. Defaults to None, which keeps every column.None, which keeps every column
Share