ExXirr

codecovHex.pmTravis

A library to calculate xirr through the Newton Raphson using parallel processes.

Usage

iex> d = [{1985, 1, 1}, {1990, 1, 1}, {1995, 1, 1}]
iex> v = [1000, -600, -200]
iex> ExXirr.xirr(d,v)
{:ok, -0.034592}

Installation

The package can be installed as:

  1. Add ex_xirr to your list of dependencies in mix.exs:

     def deps do
       [{:ex_xirr, "~> 1.0.0"}]
     end
  2. Ensure ex_xirr is started before your application:

     def application do
       [applications: [:ex_xirr]]
     end

Test

Credits

This application is built on the fantastic finance-elixir package. Many thanks to tubedude for his work.