quantile
Calculate the rolling quantile of a target column within a given window size at a specified quantile percentage.
Quantiles are points dividing the range of a probability distribution into intervals with equal probabilities, or dividing the sample in the same way. This function is useful for understanding the distribution of data within a specified window, allowing for analysis of trends, identification of outliers, and assessment of risk..
obb.quantitative.rolling.quantile(data: Union[list, dict, pd.DataFrame, List[pd.DataFrame], pd.Series, List[pd.Series], numpy.ndarray, Data, List[Data]], target: str, window: int = 21, quantile_pct: float = 0.5, index: str = date)
Parameters
- Standard
| Name | Type | Description | Default | Optional |
|---|---|---|---|---|
| data | None | List[Data] | ||
| The time series data as a list of data points. | None | None | ||
| target | None | str | ||
| The name of the column for which to calculate the quantile. | None | None | ||
| window | None | PositiveInt | ||
| The number of observations used for calculating the rolling measure. | 21 | True | ||
| quantile_pct | None | NonNegativeFloat, optional | ||
| The quantile percentage to calculate (e.g., 0.5 for median), default is 0.5. | 0.5 | True | ||
| index | None | str, optional | ||
| The name of the index column, default is "date". | date | True |
Returns