Total Consumption
Get the Total Consumption for a variety of countries over time from the Global Macro Database (GMDB). Total Consumption is final consumption expenditure: the goods and services bought by households and the non-profit institutions serving them (household consumption) and by the government (government consumption). Select either part with the component parameter.
The level is annual and expressed in millions of national currency, so levels are not comparable across countries with different currencies, but growth rates are; with usd=True the levels are in millions of US dollars. With inflation_adjusted=True the level is in 2015 prices: the nominal level divided by the GDP deflator.
Data comes from the Global Macro Database (GMDB), further information about the variable can be found within https://www.globalmacrodata.com/documentation.html
Also known as: final consumption expenditure, household consumption, private consumption, government consumption.
Total Consumption in Python or via the MCP
Install the Finance Toolkit with:
pip install financetoolkit -U
Then call get_total_consumption as shown below.
from financetoolkit import Economics
economics = Economics(start_date='2018-01-01', end_date="2025-12-31")
total_consumption = economics.get_total_consumption()
total_consumption.loc[:, ['Netherlands', 'France', 'Poland']]
Or, after setting up the Finance Toolkit MCP, ask:
How large was total consumption in the Netherlands, France and Poland, in national currency, from 2018 to 2025?
Which returns:
| Netherlands | France | Poland | |
|---|---|---|---|
| 2018 | 543044 | 1.84623e+06 | 1.64263e+06 |
| 2019 | 566526 | 1.88924e+06 | 1.75019e+06 |
| 2020 | 558421 | 1.82884e+06 | 1.78274e+06 |
| 2021 | 606447 | 1.94983e+06 | 1.99473e+06 |
| 2022 | 679151 | 2.08811e+06 | 2.36421e+06 |
| 2023 | 734728 | 2.22836e+06 | 2.61398e+06 |
| 2024 | 776762 | 2.30127e+06 | 2.85179e+06 |
| 2025 | 813178 | 2.33891e+06 | 3.08623e+06 |
Parameters
get_total_consumption accepts the following parameters.
| Parameter | Type | Description | Example |
|---|---|---|---|
countries | list[str] | str | None | A list of countries or a single country to include in the results. Defaults to None. | ["United States", "Germany"] |
inflation_adjusted | bool | Whether to return the inflation adjusted data. Defaults to False. | True |
component | str | The part of final consumption expenditure: “total”, “household” (households and the non-profit institutions serving them) or “government”. Defaults to “total”. | "household" |
usd | bool | Whether to return the values in millions of US dollars, converted by the Global Macro Database, instead of millions of national currency. Cannot be combined with inflation_adjusted. Defaults to False. | True |
rolling | int | The rolling window size to use for smoothing the data (simple moving average). Defaults to None. | 4 |
trailing | int | The trailing window size to use for summing the data over trailing periods (e.g. a trailing-4-quarter sum). Defaults to None. | 4 |
growth | bool | Whether to return the growth data or the actual data. Defaults to False. | True |
lag | int | The number of periods to lag the growth data. Defaults to 1. | 4 |
standardize | bool | Whether to standardize (Z-Score) the result. When combined with growth=True, standardizes the growth values instead of the raw values. Defaults to False. | True |
rounding | int | None | The number of decimals to round the results to. Defaults to None. | 2 |
gmdb_forecasts | bool | Whether to include the years the Global Macro Database projects, from the IMF’s World Economic Outlook, up to five years ahead. Only applies to data from the Global Macro Database. Defaults to False, which ends a series with its last observation. | True |