StationarityTestResult#

class impulso.results.StationarityTestResult(*, test, null_hypothesis, regression, alpha, table)[source]#

Bases: ImpulsoBaseModel

Result from a univariate stationarity or unit-root test.

One row per tested variable. The meaning of a rejection depends on the test, because the two tests have opposite nulls: the Augmented Dickey-Fuller (ADF) test has a unit-root null, the Kwiatkowski-Phillips-Schmidt-Shin (KPSS) test has a stationarity null. The conclusion column already accounts for that, so it can be read directly.

Parameters:
test#

Which test produced the table, “adf” or “kpss”.

Type:

Literal[‘adf’, ‘kpss’]

null_hypothesis#

Plain-language statement of the null being tested.

Type:

str

regression#

Deterministic terms included, e.g. “c” or “ct”.

Type:

str

alpha#

Significance level used to form the reject and conclusion columns.

Type:

float

table#

One row per variable, indexed by variable name. Columns are statistic, pvalue, lags, crit_1pct, crit_5pct, crit_10pct, reject, conclusion. KPSS tables also carry crit_2_5pct (its table covers that level too) and pvalue_bounded, True when the reported p-value hit the edge of the published lookup table and is therefore a bound rather than an exact figure. ADF decisions come from the p-value; KPSS decisions compare the statistic against the critical value for alpha, because its p-value is clipped to [0.01, 0.10].

Type:

pandas.DataFrame

Expand for references to impulso.results.StationarityTestResult

Testing for Stationarity and Cointegration / Unit-root tests

property conclusions: dict[str, str]#

Per-variable verdict, “stationary” or “non-stationary”.

Expand for references to impulso.results.StationarityTestResult.conclusions

Testing for Stationarity and Cointegration / Unit-root tests

model_config = {'arbitrary_types_allowed': True, 'frozen': True}#

Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].

property pvalues: dict[str, float]#

Per-variable p-value.

summary()[source]#

Return the per-variable test table.

Returns:

DataFrame indexed by variable name.

Return type:

DataFrame

Expand for references to impulso.results.StationarityTestResult.summary

Testing for Stationarity and Cointegration / Unit-root tests