While Python is one of the most widely used coding languages in finance, it's also used in particular functions like data analysis rather than actual market making software. This is because as an interpreted language, Python is comparatively slow compared to alternatives like C++ or Java by virtue of its higher level of abstraction.
However, Python's creator, Guido Van Rossum, is keen to change this. Speaking at the recent Python Language Summit, Van Rossum said he intends to double Python's speed when version 3.11 is released in October 2022. In the next four years as a whole, his intention is to increase Python's speed by a factor of five.
Van Rossum's presentation, posted on Github, explains how he hopes to bring this about, including an adaptative bytecode interpreter, optimizing the frame stack, and 'zero overhead' exception handling. If these changes double Python's speed, Van Rossum said subsequent changes could include a stable ABI (application binary interface) or machine code generation to speed Python up even further.
Users of Python-based tools could benefit from the changes, said Van Rossum. Theoretically, this could include banks like JPMorgan and Bank of America, which are big users of Python in their risk pricing systems - although JPMorgan has been very late in moving away from Python 2, and finance firms that use the language for data analysis.
Van Rossum isn't commenting on the likely implications of the changes to Python's finance users. However, given that C++ is over 100 times faster than Python, it's unlikely to make Python applicable for use in trading systems any time soon.
Jeffrey Ryan, the ex-foundational quant analyst at Citadel who's now working as a 'quant freelancer', says that because of Python's "performance penalty", it's typically used in situations where speed doesn't matter and ease of writing code does.
A 2x increase in Python's speed won't really make much difference in finance, says Ryan. "Most compute heavy code used from python is already C (or C++/Fortran) internally - blas/lapack/numpy/tensorflow, etc," he says. "If absolute performance matters, you would likely write it once in C/++ and wrap it in python like these libraries do."
Even if Python does become much faster in 2022 and beyond, Ryan says banks and other finance users may be slow to adopt its new iteration. "The change from 2.X to 3.X was far too painful and fresh for most people to go through again, and if anything I would think this could make people rethink using Python all together and move toward newer languages that make more sense - like Julia or Golang," he suggests.
Have a confidential story, tip, or comment you’d like to share? Contact: email@example.com in the first instance. Whatsapp/Signal/Telegram also available. Bear with us if you leave a comment at the bottom of this article: all our comments are moderated 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. Eventually it will – unless it’s offensive or libelous (in which case it won’t.)
Photo by Chris Liverani on Unsplash