skew
Get Rolling Skew.
Skew is a statistical measure that reveals the degree of asymmetry of a distribution around its mean. Positive skewness indicates a distribution with an extended tail to the right, while negative skewness shows a tail that stretches left. Understanding skewness can provide insights into potential biases in data and help anticipate the nature of future data points. It's particularly useful for identifying the likelihood of extreme outcomes in financial returns, enabling more informed decision-making based on the distribution's shape over a specified period.
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.rolling.skew(data=returns, target="close")
Parameters
- standard
| Name | Type | Description | Default | Optional |
|---|---|---|---|---|
| data | List[Data] | Time series data. | False | |
| target | str | Target column name. | False | |
| window | int | Window size. | 21 | False |
| index | str | Index column name, by default "date" | date | False |
Returns
OBBject
results : List[Data]
Rolling skew.