How We Calculate Your Personal Finances

Matt Dalton
Finimize Engineering
3 min readNov 3, 2017

We’ve been up to some pretty interesting stuff here at Finimize HQ. It turns out making sense of your own personal finances actually isn’t that difficult (#FinanceAintRocketScience), but building a tool so that others can do the same can get pretty tricky…

Goals are the building blocks of our new Finimize MyLife (FML) platform. What do you want to achieve in life? For some it’s saving for a car or buying a house, while others tend to dump their whole life savings into bitcoin (p.s. wouldn’t recommend…).

With such varied goals, flexibility of is key! And whatever we build now has to allow for increasingly sophisticated functionality as time goes on.

The driving force of a goal is a goalCalculation (don’t worry, we’re busy coming up with a better name). This takes in a bunch of inputs and spits out an investment target. This calculation is intentionally pretty abstract, but it could represent anything from a mortgage deposit to the first hire at your start-up enterprise!

Making the Complex Simple

The problem with all this flexibility is how the hell to build it! From all this simplicity we have quite a complex problem.

You can think of your confusion about your financial life as a load of inputs to our calcs: your salary, savings, cash-on-the-side, interest rates, timelines, ambitions, hopes, dreams… The list goes on!

For some indication of how messy this gets, here’s a chunk of our Redux state tree:

The situation you end up with is a huge network of financial information, strung together by complex calculations…

We All Love/Crave/Need Instant Gratification

Aside from its complexity, the next technical headache here is speed. When planning your financial life, you don’t want to wait for the results — you want instant feedback.

So, on change of an input, we need an answer from the other side of this network instantly. To do this, we use some nifty graph theory…

This means that if you change a value anywhere in your plan, only the calculations relevant to that input will run. Clever, right?

To implement this we’ve built our own configuration syntax using typed JavaScript. This is actually pretty readable even to non-technical people. Here’s an example from a mortgage calc:

What’s nice about this is that it’s editable by non-engineers, including our own designers and financial experts. And it’s nicely encapsulated from all the chaos described above.

If you’re enjoying FML, please thank our legendary Engineering Intern Faure for making this possible. Want to take a deeper dive on the technical side of the goal calc? Stay tuned for a post written by him, coming soon 🙌

If you want to build cool stuff, check out our open positions: www.finimize.com/jobs

--

--