Struct HullWhiteParameters
pub struct HullWhiteParameters<R: Scalar> {
pub mean_reversion: R,
pub sigma: SigmaTerm<R>,
}Expand description
Hull-White model parameters resolved from the market, in the pricing mode.
These are market inputs, not contract terms: they arrive through the exogenous-scalar seam under the canonical labels, are lifted with everything else, and their sensitivities — lattice vega, mean-reversion risk, vega per volatility piece — appear on the ordinary exogenous risk axes.
Fields§
§mean_reversion: RThe mean-reversion speed a.
sigma: SigmaTerm<R>The short-rate volatility: flat, or a piecewise-constant term.
Implementations§
§impl<R: Scalar> HullWhiteParameters<R>
impl<R: Scalar> HullWhiteParameters<R>
pub fn flat(mean_reversion: R, sigma: R) -> Self
pub fn flat(mean_reversion: R, sigma: R) -> Self
Parameters with a flat volatility.
pub fn passive(&self) -> HullWhiteParameters<f64>
pub fn passive(&self) -> HullWhiteParameters<f64>
The derivative-free projection of the parameters.
§impl<R: Scalar> HullWhiteParameters<R>
impl<R: Scalar> HullWhiteParameters<R>
pub fn b(&self, t: f64, maturity: f64) -> R
pub fn b(&self, t: f64, maturity: f64) -> R
B(t, T) = (1 − e^{−a(T−t)}) / a, the model’s duration factor, in the
mode — so a mean-reversion sensitivity flows through it.
pub fn bond_option_vol(&self, expiry: f64, bond_maturity: f64) -> R
pub fn bond_option_vol(&self, expiry: f64, bond_maturity: f64) -> R
The volatility of the S-maturity discount bond seen from expiry T.
sigma_p = √V(0, T) · B(T, S) — sigma · sqrt((1 − e^{−2aT}) / 2a) · B(T, S) for a flat volatility. Zero when the option has no life or the
bond matures at expiry, which is the degenerate case the option formula
falls back to intrinsic on.
pub fn variance(&self, s: f64, t: f64) -> R
pub fn variance(&self, s: f64, t: f64) -> R
V(s, t) = ∫ₛᵗ σ(u)² e^{−2a(t−u)} du: the variance of the Gaussian
factor x_t given x_s. A sum over the pieces overlapping [s, t],
each σ_k² · e^{−2a(t−hi)} · φ(2a, hi − lo); zero for t ≤ s.
pub fn drift_convexity(&self, t: f64) -> R
pub fn drift_convexity(&self, t: f64) -> R
C(t) = ∫₀ᵗ σ(u)² e^{−a(t−u)} B(u, t) du = Cov(∫₀ᵗ x, x_t): the drift
convexity, α(t) = f(0, t) + C(t). Per piece σ_k²/2 · (φ(a, t−lo)² − φ(a, t−hi)²), since d/dv φ(a, v)²/2 = e^{−av}φ(a, v).
pub fn integrated_variance(&self, s: f64, t: f64) -> R
pub fn integrated_variance(&self, s: f64, t: f64) -> R
I(s, t) = ∫ₛᵗ σ(u)² B(u, t)² du: the variance of ∫ₛᵗ x given the
state at s — the in-period variance an in-arrears period accrues.
Per piece σ_k² · (H(t−lo) − H(t−hi)), H(v) = ∫₀ᵛ B(θ)² dθ.
pub fn convexity_exponent(&self, t: f64, maturity: f64) -> R
pub fn convexity_exponent(&self, t: f64, maturity: f64) -> R
The futures convexity exponent Λ of a term rate fixing at t and
running to maturity (years): B(t,T)²·V(0,t) + B(t,T)·C(t) —
hull_white_convexity_exponent itself for a flat volatility.
pub fn compounded_convexity_exponent(&self, start: f64, end: f64) -> R
pub fn compounded_convexity_exponent(&self, start: f64, end: f64) -> R
The compounded futures convexity exponent from start to end
(years): the term exponent over the period plus the in-period variance
I(start, end) — hull_white_compounded_convexity_exponent itself
for a flat volatility.
Trait Implementations§
§impl<R: Clone + Scalar> Clone for HullWhiteParameters<R>
impl<R: Clone + Scalar> Clone for HullWhiteParameters<R>
§fn clone(&self) -> HullWhiteParameters<R>
fn clone(&self) -> HullWhiteParameters<R>
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read more