Get the Total Consumption to GDP Ratio for a variety of countries over time from the Global Macro Database (GMDB). The Total Consumption to GDP Ratio is the ratio of the total amount of money spent by households on consumer goods and services to the Gross Domestic Product (GDP).

Data comes from the Global Macro Database (GMDB), further information about the variable can be found within https://www.globalmacrodata.com/documentation.html

The ratio is expressed as a decimal fraction (0.8100 for 81.00% of GDP).

Changed in v2.2.0: this used to be returned in percentage points. It is now a decimal fraction, matching every other ratio in the Finance Toolkit.

Also known as: consumption share of GDP.

No programming experience? With the Finance Toolkit MCP server, AI assistants such as Claude and ChatGPT can calculate the Consumption to GDP for you. Just ask in plain English.

Calculate the Consumption to GDP in Python

The Consumption to GDP is available in the Economics module of the open-source Finance Toolkit. Install it with:

pip install financetoolkit -U

Then call get_total_consumption_to_gdp_ratio as shown below.

from financetoolkit import Economics

economics = Economics(start_date='2018-01-01')

total_consumption_to_gdp_ratio = economics.get_total_consumption_to_gdp_ratio()

total_consumption_to_gdp_ratio.loc[:, ['Netherlands', 'France', 'Poland']]

Which returns:

  Netherlands France Poland
2018 0.6897 0.7835 0.7653
2019 0.6828 0.7762 0.7565
2020 0.684 0.7892 0.7555
2021 0.6806 0.7776 0.7499
2022 0.6836 0.7859 0.7626
2023 0.6887 0.7885 0.7672
2024 0.6981 0.7891 0.7675
2025 0.7002 0.7899 0.772

Parameters

get_total_consumption_to_gdp_ratio accepts the following parameters:

  • countries (list[str] | str | None, optional): A list of countries or a single country to include in the results. Defaults to None.
  • rolling (int, optional): The rolling window size to use for smoothing the data (simple moving average). Defaults to None.
  • trailing (int, optional): The trailing window size to use for summing the data over trailing periods (e.g. a trailing-4-quarter sum). Defaults to None.
  • growth (bool, optional): Whether to return the growth data or the actual data. Defaults to False.
  • lag (int, optional): The number of periods to lag the growth data. Defaults to 1.
  • standardize (bool, optional): Whether to standardize (Z-Score) the result. When combined with growth=True, standardizes the growth values instead of the raw values. Defaults to False.
  • rounding (int | None, optional): The number of decimals to round the results to. Defaults to None.

The Economics module page introduces the module, and the sidebar lists all of its functions.

Share