Output Gap
Get the Output Gap for a variety of countries over time from the OECD Economic Outlook. The output gap is the difference between actual Gross Domestic Product (GDP) and estimated potential GDP, expressed as a percentage of potential GDP. Potential GDP is the level of output an economy can sustain over the long term without generating excess inflationary or disinflationary pressure, based on the full, non-inflationary use of its productive resources (labour, capital and technology).
A positive output gap indicates the economy is running above its long-run potential (an economic “boom”, typically associated with rising inflationary pressure), while a negative output gap indicates the economy is running below potential (an economic “slack”, typically associated with rising unemployment and disinflationary pressure). The output gap therefore complements indicators such as the Inflation Rate and Unemployment Rate as a measure of where an economy sits within the business cycle.
The output gap is the OECD’s own estimate (the source’s figure, divided by 100 here).
The formula is as follows:
\[\text{Output Gap} = (\text{Actual GDP} - \text{Potential GDP}) / \text{Potential GDP},\;\; \text{with both GDP measures in real terms}\]This data is only available on a yearly basis, since the OECD Economic Outlook is published as a set of annual projections and estimates.
The result is a decimal fraction of potential GDP (-0.0422), where the OECD publishes a percentage (-4.2231), like every other rate and ratio in this class. Multiply by 100 to recover the published figure. A small gap loses resolution at the default rounding of 4 decimals, so pass a larger rounding when the sub-basis-point detail matters.
Potential output cannot be observed, so the gap is an estimate, and the estimate for a given year is often revised substantially as later data comes in: the gap estimated at the time can differ by a percentage point or more from the one published years later. Treat recent values as provisional and compare the gap with other measures of slack, such as unemployment or capacity utilisation.
See definition: https://www.oecd.org/en/data/indicators/output-gaps.html
Also known as: business cycle gap, GDP gap.
Output Gap in Python or via the MCP
Install the Finance Toolkit with:
pip install financetoolkit -U
Then call get_output_gap as shown below.
from financetoolkit import Economics
economics = Economics(start_date='2018-01-01', end_date='2022-01-01')
economics.get_output_gap(countries=['United States', 'Germany', 'Japan'])
Or, after setting up the Finance Toolkit MCP, ask:
How large was the output gap in the United States, Germany and Japan from 2018 to 2022?
Which returns:
| United States | Germany | Japan | |
|---|---|---|---|
| 2018 | 0.0002 | 0.019 | 0.0194 |
| 2019 | 0.0015 | 0.0201 | 0.0072 |
| 2020 | -0.0422 | -0.0315 | -0.0422 |
| 2021 | -0.0073 | -0.0005 | -0.0137 |
| 2022 | -0.0066 | 0.0108 | -0.0049 |
Parameters
get_output_gap accepts the following parameters.
| Parameter | Type | Description | Example |
|---|---|---|---|
countries | list[str] | str | None | The countries to include in the data. 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 data by. 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 |