


Inside HRT’s Python Fork: Leveraging PEP 690 for Faster Imports
Python @ HRT At Hudson River Trading (HRT), we’ve found that centralizing our codebase facilitates cross-team collaboration and rapid deployment of new projects. Therefore, the majority of our software development takes place in a monorepo, and our Python ecosystem is...
Optimising Compiler Performance: A Case For Devirtualisation
In the realm of high frequency trading, speed is critical. Programmers working on production systems at firms such as HRT must write code that is highly performant without compromising correctness. To achieve that, we should be aware of how compilers work, the ways...
Building Robust Codebases with Python’s Type Annotations
Hudson River Trading’s Python codebase is large and constantly evolving. Millions of lines of Python reflect the work of hundreds of developers over the last decade. We trade in over 200 markets worldwide — including nearly all of the world’s electronic markets — so we need to regularly update our code to handle changing rules and regulations.

How Our Engineers Hot-Patched a Third Party Binary Library

Building a Dependency Graph of Our Python Codebase
In keeping with our roots in high frequency trading, HRT moves fast. As is the case with any metric in engineering, speed has its tradeoffs. Over the last half-decade, HRT saw exponential growth in the size and interconnectedness of its research-oriented Python codebase, owing to a combination of a scrappy engineering culture that generally prizes “good enough” over “perfect,” our collaborative working environment that encourages code sharing between teams, and a period of accelerated growth.