pub struct Sd2Model {
pub horizon: usize,
pub magnitude: Ridge,
pub intensity_lo: f64,
pub intensity_hi: f64,
pub calibration: Vec<f64>,
pub iv_proxy: [f64; 3],
pub feature_names: Vec<String>,
pub fitted_on: String,
pub side: Option<Logistic>,
}Expand description
The frozen, fitted pieces SD v2 needs at run time. Produced by
sd_backtest fit and embedded in the binary from sd2_model.json.
Fields§
§horizon: usizeHorizon, in bars, that magnitude was trained for.
magnitude: RidgePredicts |move| / (σ·√h) from MAGNITUDE_NAMES inputs.
intensity_lo: f64Expected-move values (σ units) at the 10th and 90th percentile of the training data; intensity maps this range onto [0, 1].
intensity_hi: f64§calibration: Vec<f64>Observed share of up moves by SD bucket (0.0-0.1, …, 0.9-1.0) on the training data. This is the honest probability to show a person.
iv_proxy: [f64; 3]Implied-volatility proxy for symbols without a listed vol index:
ln IV = a + b·ln RV20 + c·ln RV126 (annualized), fitted on SPY,
QQQ, DIA, GLD and USO against their Cboe indices.
feature_names: Vec<String>§fitted_on: String§side: Option<Logistic>Which side of 0.5 SD sits on: P(close higher in horizon bars) from
the market’s weather (SPY trend, momentum, vol ratio, 5- and 21-bar
return; see direction.rs). Written by sd_direction --ship.