Fun Links 2016-01-15


Some web application front-ends are just visualizations of data stored and calculated on servers somewhere. They provide the interaction mechanism to interact with this data, but they are agnostic to the “domain” of the problems they are solving.

However, more and more, the browser-based applications are becoming central to the full application experience. When you consider static applications without back-end servers, most of the domain logic sits in the JavaScript.

So when your domain is finance related, where can you turn to help you with your JavaScript calculations? Today I’ve compiled a list of finance-related JavaScript libraries. There isn’t a huge amount of choice of finance related tooling in the open source world. I suspect you could find some powerful JavaScript finance tools behind closed doors at various banks and funds around the world. However, if you want to start from somewhere other than zero, then some of these libraries might be worth investigating.

As a caveat, I’m no finance expert, so I can only point you to water, I can’t advise you that the water is safe to drink.

Also, I know that there are no charting libraries listed, and they are obviously useful within financial applications as well. Another post will cover those at some point.

Finance.js
http://trentrichardson.com/examples/FinanceJs/
A simple, dependency-free library that lets you calculate amortization schedules and payment amounts. It also has some helpful currency and number formatting functions. Nothing too fancy, but it can save you from implementing these things if you need them in your application.

Financial.js
https://github.com/mfreilich/financial.js
Finacial.js, another creatively named library, claims to implement the Excel Financial functions in JavaScript. There isn’t much to it in the way of documentation or anything like that, but when I looked at the code, I noticed that it supports AMD and CommonJS, so you should be able to use it on the server or in the browser. I suppose if you were to combine this with a reactive programming library, you might be able to create a little version of Excel. Well, with a small subset of the functions.

Node Finance
https://github.com/albertosantini/node-finance
OK so Node Finance, as the name suggests, is a Node.js module meant to run on the server. It requires persistence in the form of a CouchDB instance for some of its functionality. It seems to be much more involved and application-like than the previous libraries. I will admit that I don’t know much about the algorithms it implements, so I’ll just quote the summary from the repository:

This module contains an implementation of Markowitz algorithm for the portfolio optimization, a routine for retrieving historical prices from Yahoo, statistical information for stocks and a routine for calculating implied volatility using Black and Scholes formula.

So if that is your cup of tea, then look no further. There is also a web UI that the author has also created for it.

Written by Colin Bate