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.

Formula:

Misery Index = Unemployment Rate + Inflation Rate

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).

Changed in v2.2.0: this used to be returned in percentage points, because both GMDB legs were percentage points and the OECD unemployment rate was multiplied by 100 to match them. The GMDB series are now decimal fractions and that rescaling has been removed, so the result is 100x smaller than in v2.1.x.

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.

No programming experience? With the Finance Toolkit MCP server, AI assistants such as Claude and ChatGPT can calculate the Misery Index for you. Just ask in plain English.

Calculate the Misery Index in Python

The Misery Index is available in the Economics module of the open-source Finance Toolkit. Install it 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'])

Which returns:

  United States Germany Japan
2018 0.0633 0.0494 0.0341
2019 0.0549 0.0432 0.0284
2020 0.0933 0.0413 0.0278
2021 0.1005 0.0672 0.0258
2022 0.1164 0.0994 0.051
2023 0.0774 0.0897 0.0584

Parameters

get_misery_index accepts the following parameters:

  • countries (list[str] | str | None, optional): A list of countries or a single country to include in the results. Defaults to None.
  • gmdb_source (bool | None, optional): 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).
  • rolling (int, optional): The rolling window size to use for smoothing the data (simple moving average). Defaults to None.
  • trailing (int, optional): The trailing window size to use for summing the data over trailing periods (e.g. a trailing-4-quarter sum). Defaults to None.
  • growth (bool, optional): Whether to return the growth data or the actual data. Defaults to False.
  • lag (int, optional): The number of periods to lag the growth data. Defaults to 1.
  • standardize (bool, optional): Whether to standardize (Z-Score) the result. When combined with growth=True, standardizes the growth values instead of the raw values. Defaults to False.
  • rounding (int | None, optional): The number of decimals to round the results to. Defaults to None.

The Economics module page introduces the module, and the sidebar lists all of its functions.

Share