Account Balance to GDP
Get the Current Account Balance to GDP Ratio for a variety of countries over time from the Global Macro Database (GMDB). The Current Account Balance to GDP Ratio is the ratio of the sum of the balance of trade (exports minus imports of goods and services), net factor income (such as interest and dividends) and net transfer payments (such as foreign aid) to the Gross Domestic Product (GDP).
The ratio shows whether a country saves more than it invests (a surplus) or relies on foreign financing (a deficit). Persistent deficits are not a problem in themselves, but they leave a country exposed when capital inflows stop, which is why emerging markets with large deficits are watched closely for currency stress. The European Union’s macroeconomic imbalance procedure uses a three-year average between -4% and +6% of GDP as its threshold.
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.0211 for -2.11% of GDP).
The ratio is the Global Macro Database’s own figure, published in percent and divided by 100 here.
The formula is as follows:
\[\text{Current Account Balance to GDP Ratio} = (\text{Exports} - \text{Imports of Goods and Services} + \text{Net Primary Income} + \text{Net Secondary Income}) / \text{Nominal GDP}\]Also known as: current account to GDP.
Account Balance to GDP in Python or via the MCP
Install the Finance Toolkit with:
pip install financetoolkit -U
Then call get_current_account_balance_to_gdp_ratio as shown below.
from financetoolkit import Economics
economics = Economics(start_date='2015-01-01', end_date="2025-12-31")
economics.get_current_account_balance_to_gdp_ratio(countries=[
'Poland', 'Turkey', 'United Kingdom'])
Or, after setting up the Finance Toolkit MCP, ask:
How did the current account balance as a share of GDP compare in Poland, Turkey and the United Kingdom from 2015 to 2025?
Which returns:
| Poland | Turkey | United Kingdom | |
|---|---|---|---|
| 2015 | -0.013 | -0.0245 | -0.0478 |
| 2016 | -0.0105 | -0.0254 | -0.0525 |
| 2017 | -0.0117 | -0.0408 | -0.0338 |
| 2018 | -0.0197 | -0.0132 | -0.0372 |
| 2019 | -0.0027 | 0.0193 | -0.0248 |
| 2020 | 0.024 | -0.0437 | -0.0272 |
| 2021 | -0.0135 | -0.0083 | -0.0076 |
| 2022 | -0.0225 | -0.0513 | -0.0192 |
| 2023 | 0.0156 | -0.035 | -0.0357 |
| 2024 | 0.0031 | -0.0098 | -0.0295 |
| 2025 | -0.0086 | -0.019 | -0.0245 |
Parameters
get_current_account_balance_to_gdp_ratio 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"] |
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 |