Metadata-Version: 2.2
Name: rts_smoother
Version: 0.1.0
Summary: High-performance RTS Kalman smoother for column-wise financial matrices (local level model)
Keywords: kalman,filter,rts,smoother,finance,time-series,pybind11
Author-Email: Oleg Mitsik <chazer@yandex.com>
License: MIT License
         
         Copyright (c) 2025 OlegMitsik
         
         Permission is hereby granted, free of charge, to any person obtaining a copy
         of this software and associated documentation files (the "Software"), to deal
         in the Software without restriction, including without limitation the rights
         to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
         copies of the Software, and to permit persons to whom the Software is
         furnished to do so, subject to the following conditions:
         
         The above copyright notice and this permission notice shall be included in all
         copies or substantial portions of the Software.
         
         THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
         IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
         FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
         AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
         LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
         OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
         SOFTWARE.
         
Classifier: Programming Language :: Python
Classifier: Programming Language :: Python :: 3
Classifier: Programming Language :: Python :: 3 :: Only
Classifier: Programming Language :: Python :: 3.9
Classifier: Programming Language :: Python :: 3.10
Classifier: Programming Language :: Python :: 3.11
Classifier: Programming Language :: Python :: 3.12
Classifier: License :: OSI Approved :: MIT License
Classifier: Operating System :: OS Independent
Classifier: Programming Language :: C++
Classifier: Topic :: Scientific/Engineering
Project-URL: Homepage, https://github.com/OlegMitsik/rts_smoother
Project-URL: Issues, https://github.com/OlegMitsik/rts_smoother/issues
Requires-Python: >=3.9
Requires-Dist: numpy>=1.23
Requires-Dist: pandas>=1.5
Description-Content-Type: text/markdown

# 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)
```bash
pip install rts_smoother
```

### Install (from source)
```bash
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.
