Calculate the Hurst Exponent of each asset’s daily returns, a measure of long-term memory that indicates whether a series is mean-reverting, trending, or a random walk.

The Hurst Exponent (H) is interpreted as follows:

  • H < 0.5: the series is mean-reverting (anti-persistent).
  • H = 0.5: the series is a random walk (no memory).
  • H > 0.5: the series is trending (persistent).

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

Calculate the Hurst Exponent in Python

The Hurst Exponent is available in the Risk module of the open-source Finance Toolkit. Install it with:

pip install financetoolkit -U

Then call get_hurst_exponent as shown below.

from financetoolkit import Toolkit

toolkit = Toolkit(["AMZN", "TSLA"], api_key="FINANCIAL_MODELING_PREP_KEY")

toolkit.risk.get_hurst_exponent()

Which returns:

  0
AMZN 0.4553
TSLA 0.5122
Benchmark 0.4515

Parameters

get_hurst_exponent accepts the following parameters:

  • max_lag (int, optional): The maximum lag to use when estimating the exponent. Defaults to 20.
  • rounding (int | None, optional): The number of decimals to round the results to. Defaults to 4.

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

Share