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
I didn’t know that back story! So when you converted me to the cult of Elixir you barely knew anything yourself!!
Popular in Announcing
Other popular topics
Categories:
Sub Categories:
Forums
Popular Tags
- #ecto
- #liveview
- #troubleshooting
- #learning-elixir
- #deployment
- #library
- #erlang
- #testing
- #genserver
- #mix
- #absinthe
- #remote-other
- #otp
- #plug
- #how-to-question
- #macros
- #postgres
- #channels
- #elixirconf
- #exunit
- #discussion
- #code-sync
- #javascript
- #podcasts
- #onsite
- #dialyzer
- #docker
- #authentication
- #umbrella
- #full-time-contract
- #podcasts-by-brainlid
- #ecto-query
- #elixir-ls
- #phoenix_html
- #iex
- #blog-post
- #graphql
- #genstage
- #ai
- #websockets
- #supervisor
- #advent-of-code
- #elixirconf-us
- #distillery
- #processes
- #forms
- #api
- #metaprogramming
- #security
- #performance









