Ventures of an ex indie game developer

finplot getting there

My finance plotting library, finplot, has turned out rather nicely and I really enjoy using it! The api for the most part is small, clean and consistent, while still packing a lot of functionality:




It's pretty opinionated, with good defaults put in place in terms of key bindings, colors, measurements, mouse behavior etc. That's what I like to use myself, and that's what finplot's users get as well.

In three lines of code (discounting the imports) you can display every day since 1980 when Apple went public:

import finplot as fplt
import yfinance

df = yfinance.download('AAPL')
fplt.candlestick_ochl(df[['Open', 'Close', 'High', 'Low']])
fplt.show()

I created the library out of necessity, as the existing ones were too slow for displaying long-term price history and backtesting data. It wasn't what I wanted to do at the time, mostly I just wanted to create my trading robot. But now I'm very happy about it, and a few people are actually using it.

It took me a long time to get it to where it is today, but I think it's actually done in 1336 lines of code (16k gzipped). It has no web support, and thus no Jupyter Labs support either, but I think that's fine. I've never learned to use Jupyter myself unfortunately, so it makes no difference to me personally. It probably would be pretty easy to wrap a web version in Bokeh... but no. I think this is it. It does one thing really well. And I'm super-happy with that!

About the author

Mitt foto
Gothenburg, Sweden