MarkovSwitchingSSM.filter#

MarkovSwitchingSSM.filter(y)[source]#

Filter a series, returning regime probabilities and the likelihood.

Parameters:

y (ArrayLike) – The untrimmed series; the first order observations are conditioned on rather than modelled.

Return type:

_HamiltonFilterResult

Returns:

A _HamiltonFilterResult whose probability arrays have len(y) - order rows.

Raises:

SpecificationError – If the series contains non-finite values – the switching autoregression conditions on lagged observations, so a hole poisons every density whose lag window covers it.