Exports
Get the Exports for a variety of countries over time from the Global Macro Database (GMDB). Exports are the total amount of goods and services produced in a country that are sold to other countries.
The level is annual and expressed in millions of national currency, so levels are not comparable across countries with different currencies, but growth rates are.
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: exports, trade exports.
Exports in Python or via the MCP
Install the Finance Toolkit with:
pip install financetoolkit -U
Then call get_exports as shown below.
from financetoolkit import Economics
economics = Economics(start_date='1980-01-01', end_date='1990-01-01')
economics.get_exports(countries=['Netherlands', 'Germany', 'China'])
Or, after setting up the Finance Toolkit MCP, ask:
How much did the Netherlands, Germany and China export each year, in national currency, from 1980 to 1990?
Which returns:
| Netherlands | Germany | China | |
|---|---|---|---|
| 1980 | 89051.5 | 165542 | 31845.8 |
| 1981 | 102962 | 187458 | 43100 |
| 1982 | 106300 | 202401 | 48143 |
| 1983 | 109580 | 205497 | 48825.2 |
| 1984 | 124092 | 230732 | 64861.4 |
| 1985 | 132292 | 254587 | 85285.2 |
| 1986 | 114407 | 248907 | 101831 |
| 1987 | 112478 | 248372 | 142745 |
| 1988 | 122726 | 267089 | 188203 |
| 1989 | 138150 | 301859 | 174600 |
| 1990 | 144534 | 336413 | 264527 |
Parameters
get_exports 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"] |
usd | bool | Whether to return the values in millions of US dollars, converted by the Global Macro Database, instead of millions of national currency, which makes levels comparable across countries. Defaults to False. | True |
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 |