Building a Python Fintech App in 200 Lines of Code — Introducing Betalyzer

Betalyzer is a fully function web app that uses some key Python libraries to create a kick ass financial technology application in 200 lines of code (ok, ok, it is more like 226 as of this writing). Betalyzer makes use of the modern financial data and web stack including pandas, Flask, Quandl, and Jupyter.

I’ve open sourced my work on this experiment. You can access Betalyzer at betalyzer.co and view the code on GitHub.

NOTE: It is meant more as a tutorial than a usable web application, and you’ll find the data stale if you try to use it (though, if you wish, you can update the data once you clone it).

The Web App

Betalyzer calculates the betas of hundreds of stocks listed on NASDAQ and displays the results in an HTML frontend.

VISIT BETALYZER HERE!

It only consists of two page types. The main page:

Betalyzer’s header
Fancy charts
All the tickers!

And the ticker page:

Company info
Beta timeseries
A bit of insight

It even has a REST API and an Excel Add In:

The Excel Add In in the wild

The Tech Stack

The code is available on GitHub (feel free to fork the repo or submit pull requests). I’ve tried to document it as well as possible in this readme, and won’t get into the details here. The code is short and sweet —just a couple hundred lines of Python and a couple hundred lines of HTML!

Betalyzer’s application structure

The main language I use is Python, especially the PyData stack and pandas. Pandas is a powerful yet easy to use data analysis library that was born at a top quantitative hedge fund. I also use Bokeh, a fairly new charting library that plays well with both pandas as well as modern web front ends.

The web layer consists of Flask, a Python web “micro-framework” that allows us to get going with minimal code, as well as jQuery, CSS and HTML for the front end. Bootstrap and Datatables add a bit of flair.

The Future

Finance is changing, and fast. This tutorial shows that using lightweight and nimble technologies, laying the infrastructure and building financial apps is quick and easy, yet powerful.

Reach out on LinkedIn if you want to get in touch.

One clap, two clap, three clap, forty?

By clapping more or less, you can signal to us which stories really stand out.