Skip to main content

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​

NameTypeDescriptionDefaultOptional
dataList[Data]Time series data.False
targetstrTarget column name.False
windowintWindow size.21False
indexstrIndex column name, by default "date"dateFalse

Returns​

OBBject
results : List[Data]
Rolling skew.