screamer.js
    Preparing search index...

    Function RollingHMM

    • Two-state hidden Markov model of a series, refit on a trailing window and filtered forward each step; the probability of the high-variance (or more persistent) state and a one-step predictive mean and standard deviation.

      Parameters

      • options: RollingHMMOptions

        The settings by name, each one optional where the positional form's is.

      Returns ScreamerOp

    • Two-state hidden Markov model of a series, refit on a trailing window and filtered forward each step; the probability of the high-variance (or more persistent) state and a one-step predictive mean and standard deviation.

      Parameters

      • OptionalwindowSize: number

        Number of most recent values the model is fit on.

      • OptionalrefitEvery: number

        Steps between fits. Between fits the model filters each new value with fixed parameters.

      • Optionalemission: string

        "gaussian": each state emits a normal value with its own mean and variance; "ar1": each state emits an AR(1) step x_t = c + phi x_{t-1} + e with its own c, phi, and variance (Hamilton's Markov-switching AR(1)).

      • OptionalmaxIter: number

        Largest number of EM iterations per fit.

      • Optionaltol: number

        A fit stops when an EM iteration raises the log-likelihood by less than this.

      Returns ScreamerOp