Finance (xirr v0.9.1)
Library to calculate IRR through the Bisection method.
Link to this section Summary
Functions
Function to calculate the XIRR for a given array of dates and values.
Link to this section Types
Link to this type
date()
Specs
date() :: Date.t()
Link to this type
rate()
Specs
rate() :: float()
Link to this section Functions
Link to this function
xirr(dates, values)
Specs
Function to calculate the XIRR for a given array of dates and values.
Examples
iex> d = [{2015, 11, 1}, {2015,10,1}, {2015,6,1}]
iex> v = [-800_000, -2_200_000, 1_000_000]
iex> Finance.xirr(d,v)
{ :ok, 21.118359 }