Skip to main content

Consumer Price Index


Implementation details​

Class names​

Model nameParameters classData class
ConsumerPriceIndexConsumerPriceIndexQueryParamsConsumerPriceIndexData

Import Statement​

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

Parameters​

NameTypeDescriptionDefaultOptional
countriesList[Literal['australia', 'austria', 'belgium', 'brazil', 'bulgaria', 'canada', 'chile', 'china', 'croatia', 'cyprus', 'czech_republic', 'denmark', 'estonia', 'euro_area', 'finland', 'france', 'germany', 'greece', 'hungary', 'iceland', 'india', 'indonesia', 'ireland', 'israel', 'italy', 'japan', 'korea', 'latvia', 'lithuania', 'luxembourg', 'malta', 'mexico', 'netherlands', 'new_zealand', 'norway', 'poland', 'portugal', 'romania', 'russian_federation', 'slovak_republic', 'slovakia', 'slovenia', 'south_africa', 'spain', 'sweden', 'switzerland', 'turkey', 'united_kingdom', 'united_states']]The country or countries to get data.False
unitsLiteral['growth_previous', 'growth_same', 'index_2015']The unit of measurement for the data.
Options:
- growth_previous: Percent growth from the previous period.
If monthly data, this is month-over-month, etc
- growth_same: Percent growth from the same period in the previous year.
If looking at monthly data, this would be year-over-year, etc.
- index_2015: Rescaled index value, such that the value in 2015 is 100.
"growth_same"True
frequencyLiteral['monthly', 'quarter', 'annual']The frequency of the data.
Options: monthly, quarter, and annual.
"monthly"True
harmonizedboolWhether you wish to obtain 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']The provider to use for the query, by default None. If None, the provider specified in defaults is selected or 'fred' if there is no default."fred"True

Data​

NameTypeDescription
datedateThe date of the data.