[][src]Function cf_functions::cir_log_mgf_cmp

pub fn cir_log_mgf_cmp(
    psi: &Complex<f64>,
    a: f64,
    kappa: &Complex<f64>,
    sigma: f64,
    t: f64,
    v0: f64
) -> Complex<f64>

Returns log of moment generating function for Cox Ingersoll Ross process evaluated at complex argument and with complex kappa.

Remarks

Useful for time changed levy processes. "psi" can be a characteristic function of a levy process evaluated at a given "u" with induced correlation used by "kappa".

Examples

extern crate num_complex;
use num_complex::Complex;
extern crate cf_functions;
let u = Complex::new(1.0, 1.0);
let a = 0.3; //speed of mean reversion of CIR process
let kappa = Complex::new(0.2, -0.3); //for leverage neutral measure
let sigma = 0.3; //volatility of CIR process
let t = 0.5; //time period of CIR process
let v0 = 0.7; //initial value of CIR process
let log_mgf = cf_functions::cir_log_mgf_cmp(
    &u, a, &kappa, sigma, t, v0
);