pub fn esscher(draws: &[f64], h: f64) -> Result<f64>Expand description
Esscher premium E[X e^(hX)] / E[e^(hX)] of equally likely draws: the
mean under the Esscher transform, which tilts probability towards large
losses for h > 0 (the mean at h = 0; μ + hσ² for a normal X).
use prospicio_prob::risk::esscher;
// Draws 0 and 1 at h = ln 3: weights 1 and 3, so 3/4.
assert!((esscher(&[0.0, 1.0], 3f64.ln()).unwrap() - 0.75).abs() < 1e-15);