jaymd-winnow
Adaptive model lifecycle for financial signal selection and prediction.
Installation
pip install jaymd-winnow
Quick Start
import numpy as np
from jaymd_winnow import AdaptivePipeline
# Single-target regression
pipeline = AdaptivePipeline.regression(min_history=252)
# Feed data step by step
for i, (timestamp, features, target) in enumerate(your_data_stream):
result = pipeline.step(
timestamp=timestamp,
features=features,
targets=target if i > 0 else None, # target for PREVIOUS prediction
)
if not result.is_warmup:
pred = result.predictions["target"]
print(f"Point: {pred.point}, Intervals: {pred.intervals}")
Features
- Automatic feature clustering — reduces thousands of correlated features to independent representatives
- Stability selection — identifies features with statistically reliable target association
- Conformal prediction — calibrated prediction intervals (regression) and prediction sets (classification)
- Health monitoring — PIT uniformity, Brier reliability, ECE, SHAP importance stability
- Adaptive retraining — triggers model updates when calibration degrades or feature structure shifts
- Regime detection — uses change-point detection to select relevant training windows
- Multi-target support — shared feature selection, independent models per target
Model Types
elastic_net— ElasticNetCV (regression) / LogisticRegressionCV (classification)lightgbm— LightGBM gradient boosted treesensemble— VotingRegressor/VotingClassifier combining both
API
Constructors
# Single-target
pipeline = AdaptivePipeline.regression(min_history=252)
pipeline = AdaptivePipeline.classification(min_history=500)
# Multi-target
pipeline = AdaptivePipeline.multi_target(
targets=[
{"name": "returns", "task": "regression"},
{"name": "direction", "task": "binary", "model_type": "lightgbm"},
]
)
# Full control
from jaymd_winnow import PipelineConfig, TargetConfig, ModelConfig
config = PipelineConfig(
targets=[TargetConfig(name="target", task="regression", model=ModelConfig(model_type="ensemble"))],
min_history=252,
)
pipeline = AdaptivePipeline(config)
Step Loop
result = pipeline.step(timestamp, features, targets)
# result.predictions: dict[str, TargetPrediction]
# result.health: HealthSnapshot
# result.event: LifecycleEvent (retraining, etc.)
# result.is_warmup: bool
Serialisation
pipeline.save("checkpoint.joblib")
pipeline = AdaptivePipeline.load("checkpoint.joblib")
Trace Analysis
from jaymd_winnow import PipelineTrace
trace = PipelineTrace(results)
timestamps, pvalues = trace.calibration_over_time()
events = trace.events("retrain_refit")
changes = trace.feature_set_changes()
License
MIT
Metadata
Release files for jaymd-winnow 0.1.3
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| jaymd_winnow-0.1.3.tar.gz | 41.5 kB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| jaymd_winnow-0.1.3-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 64.5 kB
Release files / jaymd_winnow-0.1.3.tar.gz
| Download URL | jaymd_winnow-0.1.3.tar.gz |
|---|---|
| Size | 41.5 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
902ab5c269f17f396c5d0e9ee2deb3fcbc081896f399e2184a3958db26534df9
|
|
BLAKE2b-256 checksum How to use checksums |
0903d36d523cef2970bfdcfcec92d8cfd54c4b850ac0303e66361afb0258d334
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.2.0 CPython/3.13.0
|
Release files / jaymd_winnow-0.1.3-py3-none-any.whl
| Download URL | jaymd_winnow-0.1.3-py3-none-any.whl |
|---|---|
| Size | 23.0 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
bfd990da39119f9566bf57b71a7ec0895d325aab5a24c802c25f583782cb2d44
|
|
BLAKE2b-256 checksum How to use checksums |
90263a771e2d6c1aa72c20c9a8f1ccc2e5ce6925366306e4acbc945592af7232
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.2.0 CPython/3.13.0
|