tubedude

tubedude

finance - XIRR, NPV and other financial calcs matching Excel/Sheets

Finance does cash-flow analysis — XIRR/IRR, NPV, MIRR, time-value-of-money, depreciation — matching Excel and Google Sheets closely, and handling edge cases that have broken Java and Python implementations in production.

Backend is swappable: plug in a faster solver if you need one, finance_rustler already exists for that. Benchmarks show the pure-Elixir implementation is fine for normal use though. If you already use Decimal or ex_money, pass those values in directly and the lib handles them natively.

Some context: years ago I built XIRR in Ruby as part of a larger private system (xirr gem covers similar ground). Ran into real performance problems with that implementation. When I heard about Elixir I got it into my head to build a NumPy-style numerical lib — had no real skill for it, mixed up concepts I didn’t understand, and it sat untouched for years. But I had claimed a good package name on hex and couldn’t leave it sitting there unused, that felt like a waste.

Recently rewrote it all: heavily AI-assisted, reviewed with care. It’s got solid tests, several picked up from issues and reports filed against similar libraries in other languages. But the real test is you all using it. Let me know how it performs, where it breaks or what is missing.

Hex: finance | Hex

Most Liked

RicoTrevisan

RicoTrevisan

I didn’t know that back story! So when you converted me to the cult of Elixir you barely knew anything yourself!!

Where Next?

Popular in Announcing Top

bryanjos
Hi, I just published version 0.23.0 of Elixirscript. https://github.com/bryanjos/elixirscript/blob/master/CHANGELOG.md Most of the chan...
New
bluzky
You may know https://ui.shadcn.com/, a UI component library for React. I really love it’s design style and components. I’ve built some co...
384 14136 119
New
zorbash
I created Kitto a framework for dashboards inspired by Dashing. The distributed characteristics of Elixir and the low memory footprint...
New
oltarasenko
Dear Elixir community, After a year of development, bug fixes, and improvements, we are proudly ready to share the release of Crawly 0.1...
New
nikokozak
Hello all, I’ve been working on Svonix - a library for quickly integrating Svelte components into Phoenix views. It’s a much-needed succ...
New
sabiwara
Dune is a sandbox for Elixir and aims to safely evaluate user-provided code. You can try it out using this basic Elixir playground made ...
New
josevalim
Hello everyone, We have just released NimbleCSV which is a small and fast CSV parsing library for Elixir. It allows developers to define...
New
fuelen
Hey folks! Want to present a toolkit for writing command-line user interfaces. It provides a convenient interface for colorizing text...
New
zachdaniel
Ash Framework What is Ash? Ash Framework is a declarative, resource-oriented application development framework for Elixir. A resource can...
New
OvermindDL1
Been making an MLElixir thing (not released yet…) for fun in spare time in the past day. I’m just trying to see how much I can get an ML...
132 14057 106
New

Other popular topics Top

axelson
This post is a wiki (feel free to hit the edit button near the bottom right of this post to add your own changes!) This post collects co...
239 48342 226
New
marius95
Hello everyone, I try to use an Javascript Event Handler in my root.html.leex file. Therefore I created a function in the app.js file: ...
New
skosch
To my knowledge, put_in, Map.update etc. all have the one limitation of not automatically creating intermediate keys when needed (for exa...
New
lessless
I believe there are people here who are dealing with CSV files import on the daily basis, and since Excel is a really popular tool there ...
New
greenz1
I have a phoenix application from which a user can download multiple(5-6) files of size 1MB. I couldn’t find anything related to sending ...
New
jononomo
I am trying to figure out how Mix knows whether the environment is test, dev, or prod – where is this set? Thanks.
New
Fl4m3Ph03n1x
About me? ( if you have nothing better to do than reading about some random guy in the internet :stuck_out_tongue: ) Hello all, this is ...
New
Lily
In templates/appointment/index.html.eex: <%= for appointment <- @appointments do %> <tr> <td><%= appoi...
New
Qqwy
Original source of discussion: This topic on the Pragmatic Programmers’ Functional Web Development with Elixir, OTP, and Phoenix forum. ...
New
grych
Hi folks, Few months ago I have announced the proof-of-concept of the library to manipulate the browsers DOM objects directly from Elixi...
639 52673 488
New

Latest on Elixir Forum

Elixir Forum

We're in Beta

About us Mission Statement