IntegrationOrderResult#

class impulso.results.IntegrationOrderResult(*, order, alpha, max_order, regression, inconclusive, table)[source]#

Bases: ImpulsoBaseModel

Result from sequential integration-order determination.

Each variable is tested at its level, then differenced and re-tested, until ADF rejects a unit root or max_order is reached. ADF drives the stopping rule; KPSS is recorded alongside it as a cross-check, and the two are combined into a joint_status per level:

  • “stationary”: ADF rejects, KPSS does not.

  • “unit_root”: ADF does not reject, KPSS does.

  • “conflicting”: both reject.

  • “inconclusive”: neither rejects.

Parameters:
order#

Integration order d per variable.

Type:

dict[str, int]

alpha#

Significance level used for every test.

Type:

float

max_order#

Highest order searched.

Type:

int

regression#

Deterministic terms used for the level test. Differenced series are always tested with a constant only.

Type:

str

inconclusive#

Variables whose order should not be taken at face value, either because they were still non-stationary at max_order or because the two tests disagreed at the level where the search stopped.

Type:

list[str]

table#

Long table indexed by (variable, d). Columns are adf_stat, adf_pvalue, adf_lags, adf_reject, kpss_stat, kpss_pvalue, kpss_lags, kpss_reject, kpss_pvalue_bounded, joint_status.

Type:

pandas.DataFrame

Expand for references to impulso.results.IntegrationOrderResult

Testing for Stationarity and Cointegration / Integration order

property d_max: int#

Highest integration order across the tested variables.

Consult inconclusive first. A variable still non-stationary at max_order is recorded with order = max_order, which is a floor, not a finding — so whenever inconclusive is non-empty d_max may understate the true maximum. A Toda-Yamamoto consumer that augments by d_max would then under-augment.

Expand for references to impulso.results.IntegrationOrderResult.d_max

Granger Causality and Toda-Yamamoto / Toda-Yamamoto for integrated systems / The manual route

Testing for Stationarity and Cointegration / Integration order

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

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

summary()[source]#

Return the full level-by-level test table.

Returns:

DataFrame indexed by (variable, d).

Return type:

DataFrame

Expand for references to impulso.results.IntegrationOrderResult.summary

Stationarity Pitfalls in Climate Data / Anomalies do not make a series stationary

Granger Causality and Toda-Yamamoto / A worked example, and what it does not license

Granger Causality and Toda-Yamamoto / Toda-Yamamoto for integrated systems / When it refuses

Testing for Stationarity and Cointegration / Integration order