Foreign Exchange Reserves

Get the total reserves, including gold, of a variety of countries over time from the World Bank’s World Development Indicators (FI.RES.TOTL.CD), which takes them from the IMF’s International Financial Statistics. Reserve assets are the external assets that a central bank or other monetary authority controls and can use at once to finance a balance of payments need, to intervene in the currency market or to keep confidence in the currency: foreign currency deposits and securities, monetary gold, special drawing rights (SDRs) and the reserve position in the IMF (IMF Balance of Payments and International Investment Position Manual, sixth edition; IMF (2013), International Reserves and Foreign Currency Liquidity: Guidelines for a Data Template).

Reserves are a country’s buffer against a sudden stop of capital inflows: they let a central bank pay for imports and service foreign debt, and defend its currency, when foreign financing dries up. Their adequacy is judged against what they may have to cover, such as months of imports (see get_reserves_import_cover) or short-term external debt (the Greenspan-Guidotti rule asks for reserves at least equal to the external debt falling due within a year).

The reserves are the end-of-year stock in millions of current US dollars, so a change includes valuation effects (exchange rates, the gold price) as well as purchases and sales. Data is annual. The euro area and the European Union are included as aggregates.

See definition: data.worldbank.org

Also known as: international reserves, FX reserves, official reserve assets.

Foreign Exchange Reserves in Python or via the MCP

Install the Finance Toolkit with:

pip install financetoolkit -U

Then call get_foreign_exchange_reserves as shown below.

from financetoolkit import Economics

economics = Economics(start_date='2016-01-01', end_date="2025-12-31")

economics.get_foreign_exchange_reserves(
    countries=['China', 'Japan', 'United States', 'India'])

Or, after setting up the Finance Toolkit MCP, ask:

How large were the foreign exchange reserves of China, Japan, the United States and India, in millions of dollars, at the end of each year from 2016 to 2025?

Which returns:

Item China Japan United States India
2016 3097658 1216519 405942 361694
2017 3235682 1264141 451285 412614
2018 3168216 1270467 449907 399167
2019 3222895 1322443 516701 463470
2020 3357241 1390809 628370 590227
2021 3427931 1405749 716152 638485
2022 3306839 1227573 706644 567298
2023 3449544 1294636 773426 627793
2024 3456025 1230667 910037 643043
2025 3748745 1371402 1385447 700074

Parameters

get_foreign_exchange_reserves accepts the following parameters.

ParameterTypeDescriptionExample
countrieslist[str] | str | NoneA list of countries or a single country to include in the results. Defaults to None.["United States", "Germany"]
rollingintThe rolling window size to use for smoothing the data (simple moving average). Defaults to None.4
trailingintThe trailing window size to use for summing the data over trailing periods (e.g. a trailing-4-quarter sum). Defaults to None.4
growthboolWhether to return the growth data or the actual data. Defaults to False.True
lagintThe number of periods to lag the growth data. Defaults to 1.4
standardizeboolWhether to standardize (Z-Score) the result. When combined with growth=True, standardizes the growth values instead of the raw values. Defaults to False.True
roundingint | NoneThe number of decimals to round the results to. Defaults to None, which uses the rounding of the Economics class.2
show_columnsstr | list[str] | NoneThe 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
Share