Consumer Price Index
Implementation details
Class names
Model name | Parameters class | Data class |
---|---|---|
ConsumerPriceIndex | ConsumerPriceIndexQueryParams | ConsumerPriceIndexData |
Import Statement
from openbb_core.provider.standard_models.consumer_price_index import (
ConsumerPriceIndexData,
ConsumerPriceIndexQueryParams,
)
Parameters
- standard
- fred
- oecd
country
: Union[str, list[str]]
The country to get data. Multiple items allowed for provider(s): fred, oecd.
• Default: united_states
• Optional: True
transform
: Literal['index', 'yoy', 'period']
Transformation of the CPI data. Period represents the change since previous. Defaults to change from one year ago (yoy).
• Default: yoy
• Optional: True
frequency
: Literal['annual', 'quarter', 'monthly']
The frequency of the data.
• Default: monthly
• Optional: True
harmonized
: bool
If true, returns harmonized data.
• Default: False
• Optional: True
start_date
: Union[date, str]
Start date of the data, in YYYY-MM-DD format.
• Optional: True
end_date
: Union[date, str]
End date of the data, in YYYY-MM-DD format.
• Optional: True
country
: Union[Literal['australia', 'austria', 'belgium', 'brazil', 'bulgaria', 'canada', 'chile', 'china', 'croatia', 'cyprus', 'czech_republic', 'denmark', 'estonia', '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'], str]
The country to get data.
• Default: united_states
• Optional: True
transform
: Literal['index', 'yoy', 'period']
Transformation of the CPI data. Period represents the change since previous. Defaults to change from one year ago (yoy).
• Default: yoy
• Optional: True
frequency
: Literal['annual', 'quarter', 'monthly']
The frequency of the data.
• Default: monthly
• Optional: True
harmonized
: bool
If true, returns harmonized data.
• Default: False
• Optional: True
start_date
: Union[date, str]
Start date of the data, in YYYY-MM-DD format.
• Optional: True
end_date
: Union[date, str]
End date of the data, in YYYY-MM-DD format.
• Optional: True
country
: str
Country to get CPI for. This is the list of OECD supported countries
• Default: united_states
• Optional: True
transform
: Literal['index', 'yoy', 'period']
Transformation of the CPI data. Period represents the change since previous. Defaults to change from one year ago (yoy).
• Default: yoy
• Optional: True
frequency
: Literal['annual', 'quarter', 'monthly']
The frequency of the data.
• Default: monthly
• Optional: True
harmonized
: bool
If true, returns harmonized data.
• Default: False
• Optional: True
start_date
: Union[date, str]
Start date of the data, in YYYY-MM-DD format.
• Optional: True
end_date
: Union[date, str]
End date of the data, in YYYY-MM-DD format.
• Optional: True
expenditure
: Literal['total', 'all', 'actual_rentals', 'alcoholic_beverages_tobacco_narcotics', 'all_non_food_non_energy', 'clothing_footwear', 'communication', 'education', 'electricity_gas_other_fuels', 'energy', 'overall_excl_energy_food_alcohol_tobacco', 'food_non_alcoholic_beverages', 'fuels_lubricants_personal', 'furniture_household_equipment', 'goods', 'housing', 'housing_excluding_rentals', 'housing_water_electricity_gas', 'health', 'imputed_rentals', 'maintenance_repair_dwelling', 'miscellaneous_goods_services', 'recreation_culture', 'residuals', 'restaurants_hotels', 'services_less_housing', 'services_less_house_excl_rentals', 'services', 'transport', 'water_supply_other_services']
Expenditure component of CPI.
• Default: total
• Optional: True
Data
- standard
- fred
- oecd
date
: Union[date, str]
The date of the data.
country
: str
None
value
: float
CPI index value or period change.
date
: Union[date, str]
The date of the data.
country
: str
None
value
: float
CPI index value or period change.
date
: Union[date, str]
The date of the data.
country
: str
None
value
: float
CPI index value or period change.
expenditure
: str
Expenditure component of CPI.