[][src]Function cf_functions::gamma_leverage

pub fn gamma_leverage(
    t: f64,
    v0: f64,
    a: f64,
    sigma: f64,
    lambda: f64,
    correlation: f64,
    alpha: f64,
    beta: f64,
    num_steps: usize
) -> impl Fn(&Complex<f64>) -> Complex<f64>

Returns log CF of an gamma jump diffusion when transformed by an affine process and the process is correlated with the jump component of the Levy process.

Remarks

The time change is assumed to be a single-dimensional CIR process with a jump component with mean 1.
The correlation between the Levy process and the affine process is due to sharing the same jumps (both the Levy process and the affine process jump at the same time).

Examples

extern crate num_complex;
use num_complex::Complex;
extern crate cf_functions;
let alpha=2.0;
let beta=3.0;
let alpha=1.1;
let lambda=100.0;
let correlation=0.9;
let a=0.4;
let sigma=0.4;
let t=1.0;
let v0=1.0;
let num_steps:usize=1024;
let cf=|u:&Complex<f64>|u.exp();
let cf=cf_functions::gamma_leverage(
    t, v0, a, sigma, lambda, 
    correlation, alpha, beta, num_steps
);
let u=Complex::new(0.05, -0.5);
let value_of_cf=cf(&u);