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

danschultzer
In short Plug n’ play OAuth 2.0 provider library. Just set up a resource owner schema with Ecto (your user schema), install the dependen...
New
dominicletz
Hi, I thought I had posted my library before but seems I hadn’t. The project is still in early stages but it’s growing and so I think it...
New
pkrawat1
Presenting Aviacommerce, open source e-commerce platform in Elixir Aviacommerce is an open source e-commerce platform in Elixir. We at...
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
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
kip
Image is an image processing library for Elixir. It is based upon the fabulous vix library that provides a libvips wrapper for Elixir. I...
622 18934 194
New
KronicDeth
Elixir plugin for JetBrain’s IntelliJ Platform (including Rubymine) This is a plugin that adds support for Elixir to JetBrains IntelliJ...
289 36352 110
New
Azolo
Hey everyone, I just released WebSockex which is a Elixir WebSocket client. WebSockex strives to work as a OTP special process, be RFC6...
New
archan937
It is a well-know topic within the Elixir community: “To mock or not to mock? :)” Every alchemist probably has his / her own opinion con...
New
devonestes
Introducing assertions, the library that helps you write really great test assertions! GitHub: GitHub - devonestes/assertions: Helpful a...
New

Other popular topics Top

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
gshaw
What is the idiomatic way of matching for not nil in Elixir? E.g., First way: defp halt_if_not_signed_in(conn, signed_in_account) when...
New
stefanchrobot
What’s the safe way to decode a JSON string into a struct? I want to avoid calling String.to_atom. Jason.decode can give me a map with st...
New
gausby
I asked this very same question on twitter and got some interesting feedback, but I thought it would be a good question to ask here as we...
1207 39467 209
New
aesmail
Hello guys, I have finally made it. I created an admin interface for a framework. It’s been on my todo list for years and with the curre...
New
AstonJ
Please see the new poll here: Which code editor or IDE do you use? (Poll) (2022 Edition) It’s been a while since we first asked this, I...
208 31265 143
New
KronicDeth
Elixir plugin for JetBrain’s IntelliJ Platform (including Rubymine) This is a plugin that adds support for Elixir to JetBrains IntelliJ...
289 36352 110
New
Brian
What is the proper way to load a module from a file in to IEX? In the python world, doing something like this pretty standard: from ....
New
dokuzbir
I want to highlight html closing tags when i click a html tag. That works in .html files but doesnt work for html.eex templates. How can...
New
svb
Hi! Currently I want to submit a form by pressing the Enter key. However, since my input field is of type “textarea” this is just adds a...
New

Latest on Elixir Forum

Elixir Forum

We're in Beta

About us Mission Statement