Skip to main content

Consumer Price Index


Implementation details​

Class names​

Model nameParameters classData class
ConsumerPriceIndexConsumerPriceIndexQueryParamsConsumerPriceIndexData

Import Statement​

from openbb_core.provider.standard_models.consumer_price_index import (
ConsumerPriceIndexData,
ConsumerPriceIndexQueryParams,
)

Parameters​

NameTypeDescriptionDefaultOptional
countryUnion[str, List[str]]The country to get data. Multiple items allowed for provider(s): fred, oecd.united_statesTrue
transformLiteral['index', 'yoy', 'period']Transformation of the CPI data. Period represents the change since previous. Defaults to change from one year ago (yoy).yoyTrue
frequencyLiteral['annual', 'quarter', 'monthly']The frequency of the data.monthlyTrue
harmonizedboolIf true, returns harmonized data.FalseTrue
start_dateUnion[date, str]Start date of the data, in YYYY-MM-DD format.NoneTrue
end_dateUnion[date, str]End date of the data, in YYYY-MM-DD format.NoneTrue
providerLiteral['fred', 'oecd']The provider to use, by default None. If None, the priority list configured in the settings is used. Default priority: fred, oecd.NoneTrue

Data​

NameTypeDescription
datedateThe date of the data.
countrystrNone
valuefloatCPI index value or period change.