kurtosis
Calculate the rolling kurtosis of a target column.
Kurtosis measures the "tailedness" of the probability distribution of a real-valued random variable. High kurtosis indicates a distribution with heavy tails (outliers), suggesting a higher risk of extreme outcomes. Low kurtosis indicates a distribution with lighter tails (less outliers), suggesting less risk of extreme outcomes. This function helps in assessing the risk of outliers in financial returns or other time series data.
Example
from openbb import obb
stock_data = obb.equity.price.historical(symbol="TSLA", start_date="2023-01-01", provider="fmp").to_df()
returns = stock_data["close"].pct_change().dropna()
obb.quantitative.stats.kurtosis(data=returns, target="close")
Parameters
- standard
| Name | Type | Description | Default | Optional |
|---|---|---|---|---|
| data | List[Data] | The time series data as a list of data points. | False |
Returns
OBBject
results : List[Data]
An object containing the kurtosis value