About US

Why Do We Work in Python?

Developers can be very passionate about their choice of programming languages, and we often get asked why we choose to work in Python. Since our initial adoption of Python for the Athena project at JPMorgan in 2006, which is now over 35 million lines of code, we have found that using Python gives us a much faster development time and a wealth of available resources to draw from. But perhaps the most important reason is that it helps the financial industry get out of the spreadsheet trap.

Escaping the Spreadsheet Trap

If you feel that your technology department has become very expensive yet slow to deliver new and innovative capabilities, you may have fallen into the spreadsheet trap. Spreadsheets like Microsoft Excel are a terrific tool in the finance world. You don’t need much training or experience to build simple models and can expand your skills as needed. However, spreadsheet-based models and analytics tend to proliferate rapidly throughout an organization, creating lots of siloed, inconsistent copies, with fragile implementations that duplicate functionality over and over. They also have limited interfaces to essential data sources, forcing users to copy and paste data that can become overly simplified or disconnected from critical updates.

Gradually migrating to Python-based development provides an excellent way to escape from this trap. While Python does require some training and familiarity with programming concepts, it comes with all of the structure and controls of a development environment. 

Developing Faster

As a programming language, Python’s structure is considered to be very easy to work with, according to a recent survey. The format and syntax make it very readable, enabling users with different levels of experience to readily share code. One key principle in Python’s development is that there should be one right way to solve simple programming problems, which makes it easier for teams of developers to understand the shared codebase.

But it is also extremely broad and powerful. Complicated parts of other programming languages, such as memory management, are abstracted and handled automatically by Python, freeing up time and resources to focus on coding that is directly related to business objectives. 

For example, the volatility of a stock is calculated as the standard deviation over one year. In this example, our stock prices are in the “Close prices” column of our data structure. There are 252 trading days in the year, so the annual volatility is simply: 

volatility = data['Close prices'].std()*252**.5

As an interpreted language [see sidebar Interpreted versus compiled], users can step through programs and calculations line by line and display the values of all variables, making debugging faster and easier than many other options, including Excel formulas.  This enables even novice users to quickly create the programs they need, revise models, and produce useful analytics as fast as they could in Excel. These are just a few of the reasons why Python has become the top language in many countries, including France, Germany, India, UK, and US, based on analysis of language tutorials.

Leveraging Available Resources

One of the biggest advantages of Python is the substantial set of resources that are available. Because Python is one of the most popular languages in use today, there is an incredible range of free, open source libraries to choose from, for everything from low-level functions and interfaces to complex analytics. Instead of having to re-implement everything from scratch, organizations can take advantage of very sophisticated implementations of models and analytics and just add their own proprietary methods and intellectual property on top. 

There is also a very large community of experienced Python developers to hire from, including many with expertise in financial services. Python has become the most popular language in financial services, with more than 30% of job postings mentioning Python experience, almost 70% more than the next most popular, according to eFinanceCareers. 

Interpreted Versus Compiled [sidebar]

For those unfamiliar with the difference between interpreted and compiled programming languages.

An interpreted language, like Python, is translated line by line into a form that the computer can directly understand as the program is run. This usually makes it take a bit longer to run than the same operations in a compiled language.

A compiled language, like C++, must be converted into an executable format before it is run, by a program known as a compiler. The output from the compiler is in machine-executable form, making the resulting program faster than an interpreted one.

Typically, only about 10% of the programmed functions that a company has need to execute really quickly. When working in Python, there are several options for these speed-critical operations. Python compilers exist that can convert these parts of the program to faster executables once they have been tested and refined. Or they can be written directly in a native compiled language, like C++, and used by the Python code with one of many available interfaces. Or, if you are using cloud resources, you can allocate additional processors to these operations so that they are completed in the time you need them. 

Enabling Digital Transformation

Choosing Python is the first step to get out of the spreadsheet trap and amplify the digital transformations that will unleash the full capabilities of your organization. You also need a development environment, version control tools, database interfaces, infrastructure management, and other management services to operate securely and at scale. This is where Beacon Platform comes in. We have assembled all of these essential elements into a comprehensive platform so that you don’t have to. We also have interfaces to and from Excel and other existing systems, to make the transition easier. This enables you to gradually shift projects and operations into Python and build on the accumulated learnings. Within a few years, the spreadsheet trap will be a thing of the past.