Skip to main content

stdev

Calculate the rolling standard deviation of a target column within a given window size.

Standard deviation is a measure of the amount of variation or dispersion of a set of values. It is widely used to assess the risk and volatility of financial returns or other time series data over a specified rolling window. It is the square root of the variance.

obb.quantitative.rolling.stdev(data: Union[list, dict, pd.DataFrame, List[pd.DataFrame], pd.Series, List[pd.Series], numpy.ndarray, Data, List[Data]], target: str, window: int = 21, index: str = date)

Parameters​

NameTypeDescriptionDefaultOptional
dataNoneList[Data]
The time series data as a list of data points.NoneNone
targetNonestr
The name of the column for which to calculate standard deviation.NoneNone
windowNonePositiveInt
The number of observations used for calculating the rolling measure.21True
indexNonestr, optional
The name of the index column, default is "date".dateTrue

Returns​



On this page