Long reads

Is Python storming ahead of Java in fintech?

Madhvi Mavadiya

Madhvi Mavadiya

Head of Content, Finextra

The use of Python is catching up to Java in banking and fintech applications, but what are the reasons behind the emergence of Python?

While three million developers have joined the Java community in the past year, in the banking sector, Python is fast closing in on Java’s position in top spot.

Python’s backstory in banking

Across all sectors, Python has reached seven million active developers fuelled in part by a staggering 62% of machine learning developers and data scientists who now use the programming language.

This popularity gathered momentum back in 2015, with numerous financial institutions hiring Python developers. At around the same time, the sheer volume of fintechs – both funded growth businesses and bootstrapping startups – also started to make their presence felt in the developer skills marketplace.

Despite its recent popularity, particularly across the investment banking and hedge fund industries, Python is not a new language. The first versions of Python emerged in 1991, five years before HTTP 1.0 and four years before Java.

The language is known for its speed to program and easier syntax. Programmers can do as much with 10 lines of Python code as they can with 20 lines of Java. Aside from the productivity gain, this means that there is less chance of making errors. As the sector becomes increasingly regulated, a low error rate is important, especially to senior business managers traditionally somewhat oblivious to development matters.

In addition, with time being every company’s most critical resource, Python offers fintech startups a much faster alternative to languages that are statically typed, quicker deployment and less required code.

Python gets established in banking

The programming language was first, or at least most notably, brought into the banking sector by Kirat Singh, the former Goldman Sachs and JP Morgan investment banker, who has been at the forefront of several high-profile technology initiatives.

As Bank of America Merrill Lynch’s managing director and head of global risk systems, Singh built the bank’s main platform for pricing trades, managing positions and computing risk exposure across all asset classes. Started in 2010 and named Quartz, this project is believed by many observers to mark the first significant arrival of Python in the sector.

Singh’s personal story is reported here by eFinancial Careers. After BAML’s Quartz project, Singh next applied Python in JPMorgan’s cross-asset market risk and trading platform, Athena.

Singh said: “Everyone at JPMorgan now needs to know Python and there are around 5,000 developers using it at Bank of America. There are close to 10 million lines of Python code in Quartz and we got close to 3,000 commits a day. It’s a good scripting language and easily integrated into both the front and back ends, which was one of the reasons we chose it in the first place.”

Discussing the adoption of Python, Mahmoud Hasemi, principal engineer at SimpleLegal and PayPal alumnus, told Finextra Research: “The key driver is the same for all Python-driven companies (e.g., YouTube, Instagram, Spotify): the ability of Python developers to deliver new features faster.

“Python's ecosystem has moved faster than Java, but Python developers also tend to be more versatile, as Python excels at integrating between different stacks and services, a capability that some trivialise as ‘glue’.

“Let's not forget that fiberboard dominates the furnishing market and gets the job done faster and cheaper than other materials. That said, Python's plasticity is just one of its many modes, and plenty of old-school, rock-solid software gets written with Python, too.”

Compulsory Python

Matthew Harris, director at STX Next, a Python development firm, agrees that Python’s popularity has been due to its simplicity. Harris sees momentum being driven by the appetite for data and AI projects, rather than purely fintech, among the bigger banks. According to Harris: “A larger factor could be the popularity of Python in machine learning and data science – in solving challenges in analytics, regulation, compliance, and data. Tasks which are made easier by the abundance of supporting libraries.”

Harris continued to say that in addition to Python being a core language for JPMorgan’s Athena and Bank of America’s Quartz program, from June 2018, Citigroup joined a list of investment banks that wanted its analysts and traders to have strong Python coding skills and a month later, added Python training classes for bank analyst new hires.

Then, in October 2018, JPMorgan announced that it would be putting hundreds of its recently hired investment bankers and asset managers through mandatory coding lessons in Python. Elsewhere, increasing numbers of banks are using the programming language to solve problems in pricing, trade management and risk management problems.

Harris added: “Python’s rise in popularity can be related to the rise of technology trends such as AI, machine learning and big data. We are fast approaching a time when simply writing software will only be the first step, after which the program will proceed to consume data and train its neural network to perform more complex tasks than ever before.

“Within financial services, there has never been a shortage of data to analyse. Python has positioned itself as the machine learning language of choice to tackle this complexity of information and extract actionable insights. I’m sure Python’s simplicity and speed of development relative to Java can’t hurt in this respect, either.”

William Hayes, tech lead at iwoca, believes that success could be found in a combination of Python with Pandas, a software library that has been written for the programming language to enable data manipulation and analysis, which the fintech uses for “exploratory modelling and data analysis performed in Jupyter notebooks.”

Hayes went on to say: “This can then be deployed on the main webservers with minimal alteration, allowing us to test new ideas as quickly as possible. We’re also more able to share knowledge between our tech and analytics teams.”

Tech stack integration

While there are use cases of Python for banks and fintechs alike, Harris suggested that when building a fintech app, “success can often be measured in time to market: getting the app in front of your customers quickly and gathering feedback.”

However, it is not just about a race to market, choosing the correct technology stack is a crucial decision, commercially as well as technically. The right technology choices serve as the foundation for any development as the product scales.

Harris advised that while many in the company may think that a developer would be the best person to ask because of their experience working ‘hands on’ with different tech stacks, problems may arise because: “The developer may choose a tech stack based on their familiarity or based solely on technical merit, without taking into account the business needs of the new application.”

He also suggested that prospective ‘fintech founders’ should question whether a particular tech stack would reduce time to market, prohibit performance or scalability, and also who will build the application when it scales.

“When choosing a tech stack, it’s important for a fintech CEO or CTO to consider the current and future availability of the labour pool supporting any technology options. This can be done by tracking trends in education, the Stack Overflow community or the number of Github contributors. The best server-side languages have a strong and active community of developers,” Harris said.

Discussing the subject, Hasemi drew parallels between the success rate of a tech stack and the talent pool that is available to it: “Fintech tends to prefer senior engineers, and education's decade-long shift toward Python is finally being felt, even in the most selective corners of industry.”.

Flexible skills and attitudes

On the topic of talent, Hasemi added: “Python web developers may not be as plentiful as PHP or Java, but notably tend to be a lot less hyperspecialized, especially compared to PHP. Almost any Python developer can pick up web development in an afternoon, at least enough to spin up a data backend for a modern, microservice-oriented frontend. The same Python developer will then be in a much better position to operationalize the service themselves, which can be a pretty tall task for your average IDE-dependent Java developer.”

Hayes believes that Python’s popularity will assist junior developers more than their more senior peers. He has already seen a large number of graduates who have used the language, either as part of their course work or for a personal project.

“At a senior level, it obviously takes a while for skills to shift according to the popularity of a tool. Although it doesn't take a good developer long to pick up a new language, so we don't only look for applicants already with Python experience,” he said.

Does Python lack a guiding hand?

What does Java have that Python doesn’t? – and will the hype around the latter subside and allow Java to continue being the primary programming language?

Harris states: “While Java still has the reputation of being the ‘enterprise solution’ whose stability makes it a safe choice for large banks, I would argue that this reputation may not last for much longer.”

In Hasemi’s opinion: “The main thing that Java has that Python currently lacks is corporate sponsorship. Oracle's stewardship of Java has been keenly felt since 2010, and has really shaped the current state of the Java world. Meanwhile, Python is more community-driven and the Python Software Foundation is more logistical than directional.”

Comments: (1)

Steve Wilcockson
Steve Wilcockson - Quantexa - Diss / London 20 March, 2020, 10:02Be the first to give this comment the thumbs up 0 likes

Interesting article. I think it's sort of like comparing apples and oranges. Both are fruit, but serve different types.

As someone who used to work at MATLAB, I see Python having increasing relevance where MATLAB once dominated, in rapid functional/numerical development and integration for applications like pricing, risk, trading strategies, portfolio modelling. However, I think it has a way to go before matching on Java in the back-end piping and security.

For Java (I work for a Java provider), Oracle is less of a steward these days, but is certainly present and active, plus others have stepped up to the plate in a way that I'm not sure has quite happened for Python.

Plus financial firms are represented on the Java Execs. 

Also, high profile Python projects like Quartz and Athena, terrific initiatives for sure, haven't always met with universal approval.

But Python is amazing. I've a tremendous respect for people like Wes McKinney and Saeed Amen who really drive forward the use of Python. Pandas was the game changer in my opinion