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
Name | Type | Description | Default | Optional |
---|---|---|---|---|
country | Union[str, List[str]] | The country to get data. Multiple items allowed for provider(s): fred, oecd. | united_states | 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). | yoy | True |
frequency | Literal['annual', 'quarter', 'monthly'] | The frequency of the data. | monthly | True |
harmonized | bool | If true, returns harmonized data. | False | True |
start_date | Union[date, str] | Start date of the data, in YYYY-MM-DD format. | None | True |
end_date | Union[date, str] | End date of the data, in YYYY-MM-DD format. | None | True |
Name | Type | Description | Default | Optional |
---|---|---|---|---|
country | str | The country to get data. | united_states | 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). | yoy | True |
frequency | Literal['annual', 'quarter', 'monthly'] | The frequency of the data. | monthly | True |
harmonized | bool | If true, returns harmonized data. | False | True |
start_date | Union[date, str] | Start date of the data, in YYYY-MM-DD format. | None | True |
end_date | Union[date, str] | End date of the data, in YYYY-MM-DD format. | None | True |
Name | Type | Description | Default | Optional |
---|---|---|---|---|
country | str | Country to get CPI for. This is the list of OECD supported countries | united_states | 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). | yoy | True |
frequency | Literal['annual', 'quarter', 'monthly'] | The frequency of the data. | monthly | True |
harmonized | bool | If true, returns harmonized data. | False | True |
start_date | Union[date, str] | Start date of the data, in YYYY-MM-DD format. | None | True |
end_date | Union[date, str] | End date of the data, in YYYY-MM-DD format. | None | 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. | total | True |
Data
- standard
- fred
- oecd
Name | Type | Description |
---|---|---|
date | Union[date, str] | The date of the data. |
country | str | None |
value | float | CPI index value or period change. |
Name | Type | Description |
---|---|---|
date | Union[date, str] | The date of the data. |
country | str | None |
value | float | CPI index value or period change. |
Name | Type | Description |
---|---|---|
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. |