Skip to main content

High-performance RTS Kalman smoother for column-wise financial matrices (local level model)

Project description

RTS Kalman Smoother (C++ × Python)

The package provides a high-performance Rauch–Tung–Striebel Kalman smoother for the local level model. This model is a canonical choice for asset prices and similar data (random walk latent state).
It smooths each asset (column) independently with global process/observation variances (Q, R) shared across assets.

Features

  • Handles NaN observations (prediction-only step when missing)
  • Returns smoothed states as the same object type
  • Diffuse initialization

Install (from PyPI)

pip install rts_smoother

Install (from source)

pip install -U pip build twine
pip install -e .

Usage

from rts_smoother import smooth

# Provide Q and R manually
df_smoothed = smooth(df, Q=1e-4, R=1e-3)

Model

  • State: x_t = x_{t-1} + w_t, w_t ~ N(0, Q)
  • Obs: y_t = x_t + v_t, v_t ~ N(0, R)

Notes

  • Built with scikit-build-core and pybind11.
  • The compiled extension lives at rts_smoother/_core.* inside the wheel.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

rts_smoother-0.1.0.tar.gz (5.8 kB view details)

Uploaded Source

Built Distributions

If you're not sure about the file name format, learn more about wheel file names.

rts_smoother-0.1.0-cp314-cp314-win_amd64.whl (74.2 kB view details)

Uploaded CPython 3.14Windows x86-64

rts_smoother-0.1.0-cp314-cp314-macosx_15_0_arm64.whl (58.6 kB view details)

Uploaded CPython 3.14macOS 15.0+ ARM64

File details

Details for the file rts_smoother-0.1.0.tar.gz.

File metadata

  • Download URL: rts_smoother-0.1.0.tar.gz
  • Upload date:
  • Size: 5.8 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.14.0

File hashes

Hashes for rts_smoother-0.1.0.tar.gz
Algorithm Hash digest
SHA256 cd0ac6bd3b70b3302a0575838bac388717994a5f8f5a4239ccfa5fc6bba39376
MD5 035f3300367f0c59ff01dcef3e552f7e
BLAKE2b-256 b9252fb68b358411df0729735f8dca0603c37b0537813e0ae44cd76a9ffab8c8

See more details on using hashes here.

File details

Details for the file rts_smoother-0.1.0-cp314-cp314-win_amd64.whl.

File metadata

File hashes

Hashes for rts_smoother-0.1.0-cp314-cp314-win_amd64.whl
Algorithm Hash digest
SHA256 cac2e1649e895c032787bd54ddaaef8570aa9d705c38ac305b9cbce8f3bec684
MD5 9309e5f79d4c86949758bb73427ad446
BLAKE2b-256 e7bbd11710ca0a8470b03e6f789e4f56c6a62bcf140d021832d3b88ad0993852

See more details on using hashes here.

File details

Details for the file rts_smoother-0.1.0-cp314-cp314-macosx_15_0_arm64.whl.

File metadata

File hashes

Hashes for rts_smoother-0.1.0-cp314-cp314-macosx_15_0_arm64.whl
Algorithm Hash digest
SHA256 ca0eb0423a2068a14d559da7bc5cad1073d6c261b4b9229f5dba5430fa41ba20
MD5 1f5546bdd3a670ac6647dbdeabecad3d
BLAKE2b-256 30f0142bb93a89fbcc0071629cffbc29d9d965e958a89b407d1d0b51dbc174cc

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page