Net International Investment Position to GDP
Get the Net International Investment Position (NIIP) to GDP Ratio for a variety of countries over time from the International Monetary Fund (IMF). The ratio is the value of the external financial assets of a country’s residents less the value of their external liabilities, at the end of each period, relative to the country’s nominal Gross Domestic Product (GDP).
The ratio shows how much a country owes to (negative) or is owed by (positive) the rest of the world compared to the size of its economy. A large negative position leaves a country dependent on foreign financing and exposed to a sudden stop of capital inflows, which is why the European Union’s macroeconomic imbalance procedure (MIP) uses a position below -35% of GDP as its indicative threshold. Large creditors, such as Japan, Germany and the Netherlands, earn net investment income on their position.
The IMF publishes the position in US dollars only, converted at the exchange rate at the end of the period. It is converted back to national currency at that same IMF end-of-period exchange rate (the euro area’s for the euro members) and divided by the IMF’s nominal GDP in national currency, so the ratio does not move with the gap between the end-of-period and the average exchange rate. This is the convention of Eurostat’s MIP scoreboard (tipsii10), whose figures differ from it only by the vintage of the GDP and the position each publisher holds. The IMF’s national accounts of some countries, such as the euro members, end a few quarters before their position, which leaves the latest periods of those countries empty.
For more information, see the following sources:
- International Monetary Fund (2009). Balance of Payments and International Investment Position Manual, Sixth Edition (BPM6), chapter 7: https://www.imf.org/external/pubs/ft/bop/2007/pdf/bpm6.pdf
- European Commission (2016). The Macroeconomic Imbalance Procedure: Rationale, Process, Application: A Compendium. Institutional Paper 039 (scoreboard threshold of -35% of GDP).
- Eurostat MIP scoreboard: https://ec.europa.eu/eurostat/databrowser/view/tipsii10/default/table
The ratio is expressed as a decimal fraction (-0.35 for -35% of GDP).
The formula is as follows:
\[\text{Net International Investment Position to GDP Ratio} = \frac{(\text{External Financial Assets} - \text{External Liabilities}) \;\text{in US Dollars} \cdot \text{National Currency per US Dollar at the End of the Period}}{\text{Nominal GDP in National Currency}}\]- The position is the stock at the end of the quarter or year; the GDP is summed over the four quarters up to and including that quarter (not seasonally adjusted) for period=”quarterly” or over the calendar year for period=”yearly”
Also known as: NIIP to GDP, net foreign assets to GDP, net external position.
Net International Investment Position to GDP in Python or via the MCP
Install the Finance Toolkit with:
pip install financetoolkit -U
Then call get_net_international_investment_position_to_gdp_ratio as shown below.
from financetoolkit import Economics
economics = Economics(start_date='2015-01-01', end_date="2025-12-31")
economics.get_net_international_investment_position_to_gdp_ratio(
countries=['United States', 'Netherlands', 'Spain', 'Japan'], period='yearly')
Or, after setting up the Finance Toolkit MCP, ask:
How did the net international investment position of the United States, the Netherlands, Spain and Japan compare as a share of GDP from 2015 to 2025?
Which returns:
| Item | United States | Netherlands | Spain | Japan |
|---|---|---|---|---|
| 2015 | -0.4149 | 0.2745 | -0.8773 | 0.5961 |
| 2016 | -0.4392 | 0.3948 | -0.843 | 0.6049 |
| 2017 | -0.3993 | 0.3957 | -0.8437 | 0.5827 |
| 2018 | -0.4742 | 0.5051 | -0.7798 | 0.5999 |
| 2019 | -0.5416 | 0.6811 | -0.7196 | 0.6243 |
| 2020 | -0.5565 | 0.8825 | -0.8371 | 0.6497 |
| 2021 | -0.6473 | 0.7232 | -0.6942 | 0.7285 |
| 2022 | -0.546 | 0.5568 | -0.5632 | 0.7186 |
| 2023 | -0.6157 | 0.5301 | -0.4946 | 0.7657 |
| 2024 | -0.7553 | 0.6396 | -0.401 | 0.8449 |
| 2025 | -0.7111 | nan | nan | 0.8429 |
Parameters
get_net_international_investment_position_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"] |
period | str | None | “quarterly” (the position at the end of each quarter) or “yearly” (at the end of each year). Defaults to None, which is quarterly, the highest frequency published. | "weekly" |
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, which uses the rounding of the Economics class. | 2 |
show_columns | str | list[str] | None | The columns to keep, a name or a list of names, matched on every column level, or the rows when no column has those names (such as the line items of a financial statement). Names that do not exist are logged, and when none exist the result is returned in full. Defaults to None, which keeps every column. | None, which keeps every column |