Package: kalmix 0.6.0.9000

kalmix: General State-Space Modelling, Filtering and Change-Point Detection

A compact, dependency-light toolkit for linear-Gaussian and discrete-state state-space models. Provides a vector-state Kalman filter and Rauch-Tung-Striebel smoother in closed form, a native Gaussian-mixture (regime-switching) filter, hidden Markov model filtering and Viterbi decoding, a likelihood-ratio change-point detector, and a minimal single-case interrupted-time-series causal contrast built on the smoother. Mean-reverting spread estimation for pairs trading is included as one documented application of the general machinery, building on the scalar Ornstein-Uhlenbeck spread model of Elliott, van der Hoek and Malcolm (2005) <doi:10.1080/14697680500149370>. Methods follow Kalman (1960) <doi:10.1115/1.3662552>, Rauch, Tung and Striebel (1965) <doi:10.2514/3.3166> and Durbin and Koopman (2012) <doi:10.1093/acprof:oso/9780199641178.001.0001>.

Authors:Max Moldovan [aut, cre], Johannes van der Hoek [aut], Robert J. Elliott [ctb], William P. Malcolm [ctb]

kalmix_0.6.0.9000.tar.gz
kalmix_0.6.0.9000.zip(r-4.7-any)kalmix_0.6.0.9000.zip(r-4.6-any)kalmix_0.6.0.9000.zip(r-4.5-any)
kalmix_0.6.0.9000.tgz(r-4.6-any)kalmix_0.6.0.9000.tgz(r-4.5-any)
kalmix_0.6.0.9000.tar.gz(r-4.7-any)kalmix_0.6.0.9000.tar.gz(r-4.6-any)
kalmix_0.6.0.9000.tgz(r-4.6-emscripten)
manual.pdf |manual.html✨
DESCRIPTION |NEWS
card.svg |card.png
kalmix/json (API)

# Install 'kalmix' in R:
install.packages('kalmix', repos = c('https://max578.r-universe.dev', 'https://cloud.r-project.org'))

Bug tracker:https://github.com/max578/kalmix/issues

On CRAN:

Conda:

4.44 score 30 exports 2 dependencies

Last updated from:0db8e8e231 (on main). Checks:9 OK. Indexed: yes.

TargetResultTimeFilesSyslog
linux-develOK390
source / vignettesOK281
linux-releaseOK261
macos-releaseOK344
macos-oldrelOK326
windows-develOK376
windows-releaseOK398
windows-oldrelOK392
wasm-releaseOK107

Exports:aciaci_fitcausal_information_ratechangepoint_fitdetect_changepointestimate_obs_dfhalf_lifehmmhmm_filterhmm_fithmm_viterbiinnov_diaginnovation_diagnosticsits_causalits_fitkalman_filterkalman_fitkalmix_filtermixture_filtermixture_smootherou_fitregime_fitregime_smoothrts_fitrts_smootherspread_modelspread_seriesssmssm_fitssm_mle

Dependencies:cliS7

Assimilative causal inference with kalmix
Why | What | Do | Causality as an assimilation problem | A known-truth test: a recharge oscillator | The null carries no causal information | A divergence between two Gaussians, cross-checked | Grounding the verdict: abstention under model error | The lead-time without re-smoothing | A real ENSO index | Read | Limits | What to read next | Reproduce

Last update: 2026-09-26
Started: 2026-06-13

Change-points and hidden states with kalmix
Why | What | Do | Change-point detection | The penalty controls over-segmentation | Hidden Markov models | Read | Limits | What to read next | Reproduce

Last update: 2026-09-02
Started: 2026-06-13

Getting started: state-space models with kalmix
Why | What | Do | A linear-Gaussian state-space model | Filtering: recovering the state online | Smoothing: using the whole series | A vector state | Read | Limits | What to read next | Reproduce

Last update: 2026-09-02
Started: 2026-06-13

Pairs trading with kalmix
Why | What | Do | A cointegration spread | Fitting the mean reversion | Tracking the volatility regime | A causal read on an event | Read | Limits | What to read next | Reproduce

Last update: 2026-09-02
Started: 2026-06-13

The Elliott-van der Hoek-Malcolm spread model with kalmix
Why | What | Do | The 2005 model | Why least squares on the observed spread misprices the trade | Estimating the model through the filter | The filter and the trading rule | The single-regime base case of the regime filter | Read | Limits | What to read next | Reproduce

Last update: 2026-09-02
Started: 2026-07-05

Readme and manuals

Help Manual

Help pageTopics
Assimilative Causal Inference read-out for a state-space modelaci
An Assimilative Causal Inference read-outaci_fit
Objective causal influence range and decision lead-timecausal_information_rate
A change-point detection resultchangepoint_fit
Detect change-points in the mean of a sequencedetect_changepoint
Choose the Student-t degrees of freedom by profile likelihoodestimate_obs_df
Mean-reversion half-life of a spread modelhalf_life
A hidden Markov model specificationhmm
Hidden Markov model filtering and smoothinghmm_filter
A hidden Markov model fithmm_fit
Most likely hidden-state path (Viterbi)hmm_viterbi
Innovation diagnostics for a fitted state-space modelinnov_diag
Model-adequacy diagnostics for a fitted state-space modelinnovation_diagnostics
Single-case interrupted-time-series causal effectits_causal
A single-case interrupted-time-series causal contrastits_fit
Kalman filter for a linear-Gaussian state-space modelkalman_filter
A Kalman filter passkalman_fit
Filter a regime-switching spread state (mixture Kalman)kalmix_filter
Regime-switching Gaussian-mixture filtermixture_filter
Regime-switching (Kim) smoothermixture_smoother
Fit Ornstein-Uhlenbeck mean reversion to a spreadou_fit
A regime-switching mixture filter passregime_fit
A regime-switching smoother passregime_smooth
A Rauch-Tung-Striebel smoother passrts_fit
Rauch-Tung-Striebel smoother for a linear-Gaussian state-space modelrts_smoother
A fitted mean-reverting spread modelspread_model
Build a cointegration spread from two price seriesspread_series
A linear-Gaussian state-space modelssm
Fit ssm noise parameters by maximum likelihoodssm_fit
A maximum-likelihood ssm fitssm_mle