quantile
Get Quantile.
Quantile is a statistical measure that identifies the value below which a given percentage of observations in a group of data falls. By setting the quantile percentage, you can determine any point in the distribution, not just the median. Whether you're interested in the median, quartiles, or any other position within your data's range, this tool offers a precise way to understand the distribution's characteristics. It's especially useful for identifying outliers, understanding dispersion, and setting thresholds for decision-making based on the distribution of data over a specified period.
Example:
from openbb import obb
stock_data = obb.equity.price.historical(symbol="TSLA", start_date="2023-01-01", provider="fmp")
obb.quantitative.quantile(data=stock_data, target="close", window=252, quantile_pct=0.25)
obb.quantitative.quantile(data=stock_data, target="close", window=252, quantile_pct=0.75)
Parameters
- Standard
| Name | Type | Description | Default | Optional |
|---|---|---|---|---|
| data | List[Data] | Time series data. | None | False |
| target | str | Target column name. | None | False |
| window | PositiveInt | Window size. | None | False |
| quantile_pct | NonNegativeFloat | None | 0.5 | True |
Returns
Quantile.