[][src]Function cf_functions::merton_time_change_cf

pub fn merton_time_change_cf(
    t: f64,
    rate: f64,
    lambda: f64,
    mu_l: f64,
    sig_l: f64,
    sigma: f64,
    v0: f64,
    speed: f64,
    eta_v: f64,
    rho: f64
) -> impl Fn(&Complex<f64>) -> Complex<f64>

Returns cf function of a time changed Merton jump diffusion characteristic function with Gaussian jumps with correlation between the diffusion of the time changed process and the underlying, adjusted to be risk neutral.

Remarks

The time change is assumed to be a CIR process with long run mean of 1.0.

Examples

extern crate num_complex;
use num_complex::Complex;
extern crate cf_functions;
let u = Complex::new(1.0, 1.0);
let lambda = 0.5; //jump frequency
let mu_l = 0.5; //mean of jump
let sigma_l = 0.3; //volatility of jump
let sigma = 0.3; //volatility of underlying diffusion
let t = 0.5; //time horizon
let rate = 0.05;
let speed = 0.5; //speed of CIR process
let v0 = 0.9; //initial value of CIR process 
let eta_v = 0.3; //volatility of CIR process
let rho = -0.5; //correlation between diffusions
let cf = cf_functions::merton_time_change_cf(
    t, rate, lambda, mu_l, sigma_l, 
    sigma, v0, speed, eta_v, rho
);
let value_of_cf=cf(&Complex::new(0.05, -0.5));