Get the Real Gross Domestic Product expressed in cross-country comparable US Dollars for a variety of countries over time from the Global Macro Database (GMDB). This is the inflation-adjusted GDP of a country converted into US Dollars, which makes it possible to directly compare the economic output of countries that use different currencies without having to perform the currency conversion or inflation adjustment yourself.

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: real GDP in USD, cross-country comparable GDP.

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

Calculate the Real GDP (USD) in Python

The Real GDP (USD) is available in the Economics module of the open-source Finance Toolkit. Install it with:

pip install financetoolkit -U

Then call get_real_gross_domestic_product_usd as shown below.

from financetoolkit import Economics

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

economics.get_real_gross_domestic_product_usd(countries=['United States', 'Japan', 'Germany'])

Which returns:

  Germany Japan United States
2020 3.52029e+06 4.3728e+06 1.97236e+07
2021 3.6495e+06 4.49117e+06 2.09179e+07
2022 3.6994e+06 4.54319e+06 2.14434e+07
2023 3.68964e+06 4.61947e+06 2.20626e+07
2024 3.6899e+06 4.63432e+06 2.26726e+07

Parameters

get_real_gross_domestic_product_usd 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