Skip to main content

entropic

Function entropic 

Source
pub fn entropic(draws: &[f64], theta: f64) -> Result<f64>
Expand description

Entropic risk measure (1/θ) log E[e^(θX)] of equally likely draws (losses positive), the certainty equivalent under exponential utility with risk aversion θ > 0. It increases from the mean (θ → 0) to the largest draw (θ → ∞); for a normal X it is μ + θσ²/2. Convex and translation-invariant, but not positively homogeneous.

use prospicio_prob::risk::entropic;

// Two equally likely losses, 0 and 1, at θ = ln 2: log2((1 + 2)/2).
let r = entropic(&[0.0, 1.0], 2f64.ln()).unwrap();
assert!((r - 1.5f64.log2()).abs() < 1e-15);