Skip to main content

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.

Parameters

data: list[openbb_core.provider.abstract.data.Data]

The time series data as a list of data points.

Optional: False


target: str

The name of the column for which to calculate the quantile.

Optional: False


window: int

The number of observations used for calculating the rolling measure.

Default: 21

Optional: True


quantile_pct: float

The quantile percentage to calculate (e.g., 0.5 for median), default is 0.5.

Default: 0.5

Optional: True


index: str

The name of the index column, default is 'date'.

Default: date

Optional: True


Returns

results: list[Data]

Serializable results.


provider: None

Provider name.


warnings: Optional[list[Warning_]]

list of warnings.


chart: Optional[Chart]

Chart object.


extra: dict[str, Any]

Extra info.


On this page