Discover your dream Career
For Recruiters

12 Python libraries that you should learn for a job in banking and finance

Python is one of, if not the most popular language in financial services but the way it's used from one firm to the next is vastly different. The appeal of Python is its wide array of libraries that make it a versatile fit for various scenarios. Some of these Python libraries are much more popular than others.

Click here to register your interest in entering the bubble by eFinancialCareers, our new anonymous community. ✍️

We analyzed data from our candidate database for over 270,000 Python developers, looking at which Python libraries were most commonly mentioned in their respective CVs. The most popular library by some distance was Pandas, which will come as no surprise to some. 

Pandas

Pandas has been overwhelmingly popular for almost a decade despite plateauing somewhat in 2020. Many of the most popular python libraries today, including some on this list, have also been built using Pandas. The library was created in finance, by developers at quant fund AQR, and is especially good at manipulating time series data, which can come in handy when analysing the movements of prices in financial markets.

Elsewhere in finance, Blackrock used Pandas to build InGen, an interface file generation software, while Goldman Sachs used it to build functions like Datagrid within its open-source library GS-Quant. 

NumPy

NumPy is one of the more performance optimized Python libraries, as the core code is written in C. The NumPy library allows you to manipulate arrays and matrices, as well as implementing functions for random number generation, which is necessary for certain optimisation techniques such as boosting and bagging. 

Matplotlib

Matplotlib is a visualisation module, allowing you to plot almost any concievable graph or chart, in 2 or 3 dimensions. Be warned - it takes a while to get used to Matplotlib’s API. The interface deliberately mimicks Matlab functionality, making it very irritating for native Python programmers. To address this Matplotlib actually has two APIs, but this just ends up being confusing. Nevertheless, it’s worth making the effort to learn how to use this powerful package.

TensorFlow/PyTorch/Jax

An increasingly popular set of libararies in Python these days are used in the machine learning space. TensorFlow and PyTorch are close competitors in the space of training neural networks; TensorFlow is thought to be more performance focused and operates more like a compiled language akin to C++, while PyTorch is more intuitive and allows you to iterate through ideas more quickly. Jax, a niche competitor, is similar to TensorFlow but offers more functional programming capabilities. These languages are used widely in finance, and are operable with more than just Python, but firms don't always disclose which is their favourite. Electronic trading giant Jane Street, though, has frequently espoused the benefits of PyTorch.

Django

Django is used in an entirely different domain to most of these libraries: web development. It can be a useful tool in any consumer-facing financial services firm like a fintech. Its thought of as a plug and play alternative to JavaScript, which can require a lot more optimization to use effectively.

scikit-learn

Beyond neural networks, there's also scikit-learn, a library used to implement machine learning algorithms. The library is one of the oldest and most popular; it was the most popular package in 2008.

A testimonial from JPMorgan called the scikit-learn "an indispensable part of the Python machine learning toolkit at JPMorgan."

Statsmodels

As the name would imply, statsmodels is a useful library for statistical modelling, and is thought to be especially effective at regression modelling and  time series analysis. It's mentioned in multiple open job listings at JPMorgan for quant and data analyst roles.

Dask

Dask is a library built in Pandas designed for big data analysis and touts that it is 50% faster than apache spark; quant fund Two Sigma is one of its open source contributors. Dask's website says the library is also in use at Barclays, Capital One, Citi and D.E. Shaw.

Numba

Another python library with a focus on performance, Numba looks to turn Python into more of a compiled language by optimizing its code at runtime. Traders have told us that, while you're unlikely to match C++ speeds using this method, it can be used effectively in less latency intesive areas like crypto trading.

Have a confidential story, tip, or comment you’d like to share? Contact: WhatsApp: http://wa.me/442079977910 (+44 20 7997 7910), Telegram: @AlexMcMurray, Signal: @AlexMcMurrayEFC.88 Click here to fill in our anonymous form, or email editortips@efinancialcareers.com.

Bear with us if you leave a comment at the bottom of this article: comments are moderated intermittently by human beings. Sometimes these humans might be asleep, or away from their desks, so it may take a while for your comment to appear. You must take sole responsibility for comments you post on this site. We will take reasonable steps to weed out anything that we consider to be offensive or inappropriate.

author-card-avatar
AUTHORAlex McMurray Reporter
  • Lu
    Luigi Ballabio
    26 February 2019

    Thanks for the shout out to QuantLib. You listed us together with some very good company.

    With the disclosure that I'm tooting my own horn here, I would add that there is some Python-specific documentation in the form of the QuantLib Python Cookbook and of my screencasts.

Sign up to Morning Coffee!

Coffee mug

The essential daily roundup of news and analysis read by everyone from senior bankers and traders to new recruits.

Sign up to Morning Coffee!

Coffee mug

The essential daily roundup of news and analysis read by everyone from senior bankers and traders to new recruits.