Function cross_covariance
fn cross_covariance(
model: &Model<'_, '_>,
x: &Xccy,
s: f64,
t: f64,
) -> ([[f64; 7]; 7], (f64, f64))Expand description
The covariance of (x, y, ∫x, ∫y, x_f, ∫x_f, σ_S·W) over [s, t] given
the state at s, with the means the collateral factor’s quanto drift
−ρ_fS·σ_f·σ_S adds to x_f and ∫x_f.
Every entry is one kernel over v = t − r on the pieces where both
volatilities are flat: with E(k) = ∫e^{−kv}dv, a level with a level
E(k_i+k_j), a level with an integral (E(k_i) − E(k_i+k_j))/k_j, two
integrals (Δ − E(k_i) − E(k_j) + E(k_i+k_j))/(k_i·k_j); the FX
innovation is a level of mean reversion zero.