imf_commodity: Primary commodity prices

View source: R/databases.R

imf_commodityR Documentation

Primary commodity prices

Description

Commodity price levels or indices, from the IMF PCPS data flow (Primary Commodity Price System). Prices are global, so no country is required.

Usage

imf_commodity(
  indicator = "PALLFNF",
  measure = c("index", "usd", "pch_year", "pch"),
  freq = "M",
  start = NULL,
  end = NULL
)

Arguments

indicator

A PCPS commodity code, for example "PALLFNF" (all non-fuel commodities index), "POILWTI" (WTI crude), "POILBRE" (Brent crude) or "POILAPSP" (average crude).

measure

"index" (2016 = 100), "usd" (US dollars, for price series), "pch_year" (year-on-year percent change) or "pch" (period percent change).

freq

Frequency code ("M", "Q" or "A").

start, end

Optional first and last year to keep.

Value

An object of class imf_tbl (a data frame).

See Also

imf_data()

Examples


imf_commodity("POILWTI", measure = "usd", start = 2015)
imf_commodity("PALLFNF", measure = "index")


readimf documentation built on June 15, 2026, 5:07 p.m.