[][src]Function black_scholes_pricer::bs::put_implied_interest_rate

pub fn put_implied_interest_rate(
    price: &[f32],
    spot: &[f32],
    strike: &[f32],
    years_to_expiry: &[f32],
    volatility: &[f32],
    dividend_yield: &[f32]
) -> Vec<f32>

Calculate implied interest rate from an put option price Years to expiry should be expressed as a f32 such as 20 days is 20/252 = 0.79 Risk free rate, volatility and dividend yield expressed as f32 with 1.0 = 100%. 0.2 = 20% etc Note this is an iterative calculation as there is no closed form solution. It exits when all the values in the array have reached a stable number