Misery Index
Get the Misery Index for a variety of countries over time. The Misery Index is a simple gauge of the overall economic discomfort felt by the average person, combining the two economic ills that are most directly and visibly felt by households: unemployment and rising prices.
The formula is as follows:
\[\text{Misery Index} (\text{year}) = \text{Unemployment Rate} (\text{year}) + \text{Inflation Rate} (\text{year}),\;\; \text{with the annual unemployment rate from the Global Macro Database (or the OECD with gmdb\_source=False) and the Global Macro Database's annual CPI inflation}\]The Unemployment Rate and Inflation Rate are both retrieved as annual decimal fractions (0.05 for 5%) whichever source is used, so they line up directly for the addition and the result is itself a decimal fraction (0.0774 for a Misery Index of 7.74).
A higher Misery Index indicates a more uncomfortable economic climate for the average household, while a lower value indicates a more comfortable one. It was originally popularized by economist Arthur Okun.
Also known as: economic discomfort index, Okun’s misery index.
Misery Index in Python or via the MCP
Install the Finance Toolkit with:
pip install financetoolkit -U
Then call get_misery_index as shown below.
from financetoolkit import Economics
economics = Economics(start_date='2018-01-01', end_date='2023-01-01')
economics.get_misery_index(countries=['United States', 'Germany', 'Japan'])
Or, after setting up the Finance Toolkit MCP, ask:
How did the misery index, unemployment plus inflation, of the United States, Germany and Japan develop from 2018 to 2023?
Which returns:
| United States | Germany | Japan | |
|---|---|---|---|
| 2018 | 0.0633 | 0.051 | 0.0341 |
| 2019 | 0.0549 | 0.0433 | 0.0284 |
| 2020 | 0.0935 | 0.0399 | 0.0279 |
| 2021 | 0.1003 | 0.0681 | 0.0256 |
| 2022 | 0.1164 | 0.1181 | 0.0511 |
| 2023 | 0.0775 | 0.091 | 0.0582 |
Parameters
get_misery_index 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"] |
gmdb_source | bool | None | Whether to get the unemployment rate from the Global Macro Database (GMDB) instead of the OECD. Defaults to None, which falls back to the gmdb_source set on the Economics class (True by default). Either way the countries carry the GMDB names, such as “Russian Federation”, “Eswatini” and “Congo DR”, as the inflation rate comes from the GMDB. | False |
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 |