Kurtosis
Calculate the Kurtosis of an investment portfolio or asset’s returns.
Kurtosis is a statistical measure used in finance to evaluate the shape of the probability distribution of returns for an investment portfolio or asset over a defined time period. It assesses the “tailedness” of the return distribution, indicating whether returns have fatter or thinner tails compared to a normal distribution. Kurtosis plays a critical role in risk assessment by revealing the potential presence of extreme outliers or the likelihood of heavy tails in the return data. This information aids investors and analysts in understanding the degree of risk associated with an investment and assists in making more informed decisions regarding risk tolerance. In essence, kurtosis serves as a valuable tool for comprehending the distribution characteristics of returns, offering insights into the potential for rare but significant events in the financial markets.
By default this is Pearson’s kurtosis, which is 3 for a normal distribution; with fisher=True it is the excess kurtosis, which is 0. Daily stock returns typically show an excess kurtosis of several points, and within a single year one exceptional day (an earnings shock, a market-wide gap) can push it above 10, so a high value often reflects one event rather than a persistently fat-tailed distribution.
The formula is as follows (with the default fisher=False):
\[\text{Kurtosis} = \text{Excess Kurtosis} + 3\] \[\text{Excess Kurtosis} = n(n + 1) / ((n - 1) (n - 2) (n - 3)) \cdot \text{Σ} z ^{4} - \operatorname{3}(n - 1) ^{2} / ((n - 2) (n - 3))\] \[z = (\text{Return} - \text{Mean}) / \text{Std}\]Where n is the number of returns and Std the sample standard deviation (ddof=1), which is the bias-adjusted sample excess kurtosis (G2) of pandas and Excel’s KURT. With fisher=True the Excess Kurtosis is returned.
Also known as: tail heaviness, fat tails, leptokurtosis.
Kurtosis in Python or via the MCP
Install the Finance Toolkit with:
pip install financetoolkit -U
Then call get_kurtosis as shown below.
from financetoolkit import Toolkit
toolkit = Toolkit(
["BTCUSD", "ETHUSD", "SOLUSD"],
api_key="FINANCIAL_MODELING_PREP_KEY",
start_date="2021-01-01",
end_date="2025-12-31",
)
toolkit.risk.get_kurtosis(period="yearly", within_period=True, fisher=True)
Or, after setting up the Finance Toolkit MCP, ask:
How fat-tailed were the daily returns of Bitcoin, Ether, Solana and the S&P 500 in each year from 2021 to 2025, measured by their excess kurtosis?
Which returns:
| BTCUSD | ETHUSD | SOLUSD | Benchmark | |
|---|---|---|---|---|
| 2021 | 1.6215 | 3.5555 | 2.46 | 2.5374 |
| 2022 | 4.0666 | 2.545 | 6.8965 | 2.359 |
| 2023 | 3.2756 | 2.4865 | 5.3817 | 1.416 |
| 2024 | 1.9522 | 4.0366 | 0.2918 | 3.8134 |
| 2025 | 2.3709 | 4.0428 | 4.1957 | 45.0722 |
Parameters
get_kurtosis accepts the following parameters.
| Parameter | Type | Description | Example |
|---|---|---|---|
period | str | The data frequency for returns (daily, weekly, monthly, quarterly, or yearly). Defaults to “daily”. | "weekly" |
within_period | bool | Whether to calculate the Kurtosis within the specified period or for the entire period. Thus whether to look at the Kurtosis within a specific year (if period = ‘yearly’) or look at the entirety of all years. Defaults to False. Note that this requires intraday data when period = ‘daily’, since a single day only nests observations when intraday data was fetched. | True |
fisher | bool | Whether to use Fisher’s definition of kurtosis (kurtosis = 0.0 for a normal distribution). Defaults to False. | True |
rolling | int | The rolling window size to use for the calculation. If set, Kurtosis is calculated over a rolling window of this many periods across the full return history instead of per period. Defaults to None. | 20 |
rounding | int | None | The number of decimals to round the results to. Defaults to None, which uses the rounding of the Toolkit (4 unless set otherwise). | 2 |
growth | bool | Whether to calculate the growth of the Kurtosis values over time. Defaults to False. | True |
lag | int | list[int] | The lag to use for the growth calculation. 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 |