stationarity
Test a series for stationarity using ADF, KPSS, or both with a combined verdict.
Examples
from openbb import obb
obb.technical.stationarity(data=[{'date': '2023-01-02', 'open': 110.0, 'high': 120.0, 'low': 100.0, 'close': 115.0, 'volume': 10000.0}, {'date': '2023-01-03', 'open': 165.0, 'high': 180.0, 'low': 150.0, 'close': 172.5, 'volume': 15000.0}, {'date': '2023-01-04', 'open': 146.67, 'high': 160.0, 'low': 133.33, 'close': 153.33, 'volume': 13333.33}, {'date': '2023-01-05', 'open': 137.5, 'high': 150.0, 'low': 125.0, 'close': 143.75, 'volume': 12500.0}, {'date': '2023-01-06', 'open': 132.0, 'high': 144.0, 'low': 120.0, 'close': 138.0, 'volume': 12000.0}])
Parameters
- standard
data: Data | DataFrame | Series | dict | list | list[DataFrame] | list[Data] | list[Series] | ndarray
Input series.
index: str
Default: date
Index column name in data.
target: str
Default: close
Column to test for stationarity.
test: str
Default: both
Which test(s) to run.
regression: str
Default: c
Regression component: constant, trend, quadratic-trend, or none.
Returns
results: list[StationarityData]
Serializable results.
provider: str
Provider name.
warnings: Optional[list[Warning_]]
List of warnings.
chart: Optional[Chart]
Chart object.
extra: dict[str, Any]
Extra info.
Data
- standard
adf_statistic: float
Augmented Dickey-Fuller test statistic.
adf_pvalue: float
ADF p-value.
adf_critical_1pct: float
ADF critical value at the 1% significance level.
adf_critical_5pct: float
ADF critical value at the 5% significance level.
adf_critical_10pct: float
ADF critical value at the 10% significance level.
adf_verdict: str
ADF verdict at 5%, or "skipped" when the test was not run.
kpss_statistic: float
Kwiatkowski-Phillips-Schmidt-Shin test statistic.
kpss_pvalue: float
KPSS p-value.
kpss_critical_1pct: float
KPSS critical value at the 1% significance level.
kpss_critical_5pct: float
KPSS critical value at the 5% significance level.
kpss_critical_10pct: float
KPSS critical value at the 10% significance level.
kpss_verdict: str
KPSS verdict at 5%, or "skipped" when the test was not run.
overall_verdict: str
Combined verdict from the available ADF and KPSS results.