| Crates.io | toraniko-styles |
| lib.rs | toraniko-styles |
| version | 0.1.3 |
| created_at | 2025-12-22 15:23:30.934869+00 |
| updated_at | 2025-12-23 21:01:42.863623+00 |
| description | Style factor implementations for the toraniko factor model |
| homepage | https://github.com/factordynamics/toraniko-rs |
| repository | https://github.com/factordynamics/toraniko-rs |
| max_upload_size | |
| id | 1999871 |
| size | 60,282 |
Style factor implementations for the toraniko factor model.
use toraniko_styles::{MomentumFactor, SizeFactor, ValueFactor};
use toraniko_traits::Factor;
let mom = MomentumFactor::new();
let scores = mom.compute_scores(data)?;
Each factor has a Config type with sensible defaults:
use toraniko_styles::{MomentumConfig, MomentumFactor};
use toraniko_traits::StyleFactor;
let config = MomentumConfig {
trailing_days: 252, // 1 year instead of default 504
half_life: 63, // 3 months instead of default 126
lag: 20,
winsor_factor: 0.01,
};
let mom = MomentumFactor::with_config(config);