[][src]Function financial::irr

pub fn irr(values: &[f64], guess: Option<f64>) -> Result<f64, &'static str>

Calculates the internal rate of return for a series of cash flows occurring at regular interval represented by the numbers in values.

Example

let cf = [-500., 100., 100., 100., 100., 100.];
let guess = Some(0.);
let cf_irr = financial::irr(&cf, guess);