'Python is like a toy programming language compared to C++'
Antony Peacock knows a thing or two about the use of C++ in finance. A senior C++ developer at Maven Securities, he's a member of the C++ standards committee and has worked on trading technology since 2008. Before he joined Maven, Peacock was a quantitative developer at hedge fund Citadel. And before he joined Citadel, he was a quantitative analyst at Barclays and Citi. He's been coding in C++ for more than two decades.
"You can become a reasonably good C++ programmer in a short period of time, but to become an expert takes a very, very long time," says Peacock. "There are a lot of mistakes you can make in the language and hundreds of rules you have to remember. It's very, very complicated, and you learn through years of pitfalls and mistakes and fixing other people's bugs and code."
Start learning C++ young
Peacock learned C++ while he was still at university, where he specialized in coding for video games. "My dissertation was like 100,000 lines of code in C++," he says. "It may not have been very good C++, and there are huge amounts that I still don't know, but I spent hours and hours practicing the skill - I still find that a lot of the best C++ developers are self-taught."
The problem today is that too few universities teach students how to code in C++, says Peacock. While some, like Baruch, still teach the language as a means of differentiating their students, many have switched to teaching much easier languages like Python instead.
Python vs. C++
Python is great for prototypes, but not so much for building trading systems, says Peacock. "It's almost like a toy language," he says, before quickly correcting himself for fear of upsetting Python developers. "- Python is a serious language, but it's a tool that has its place. You can use it for building quick prototypes, but it's not a language that has the level of robustness that you'd want if you're trading billions of dollars."
Unlike Python, C++ has a static compiler that makes you correct your errors as you go along. By comparison, Python is a dynamically typed language, which only reveals whether the code will work correctly when you actually try to run it. For this reason, Peacock says Python can be a frustrating language to work with: "Python is very liberating - it allows you to express thoughts very quickly and concisely without having to worry too much about how you express the language, but there are a lot of people in finance who spend a lot of their time debugging existing Python code."
There's also "a lot of bad C++" in finance, says Peacock, but the language is of a different order to Python. "It's like a giant puzzle," he says. "It's the expert users' language - you can do things with a great level of control, but there's a lot more effort that goes into it."
This complexity, combined with the frequent release of standards and new functionality (the latest being C++20) is what makes C++ difficult to really master. The more you learn about the language, the less you realize that you really know, says Peacock: "Bjarne Stroustop [the man credit with inventing C++, who works for Morgan Stanley] is quite happy standing up at conferences and saying he would rate himself as 7/10 as a C++ developer," he observes.
Should you learn C++ instead of Python?
It is worth learning C++, though. With the supply of university students competent in C++ drying up, Peacock says the finance industry is fighting over an increasingly small pool of developers in the language.
Some firms are choosing to grasp the nettle and to train people themselves. At Maven Securities, Peacock plans to recruit around 10 graduate recruits this September (up from two last year) and to train them in C++20. He's also hiring experienced developers who want to work on Maven's state-of-the-art systems. "Companies need to be more responsive to the shortage of C++ talent and to do more to teach people the skills," he says.
Later this month, Peacock is running a free C++ training webinar for people interested in algorithmic trading jobs together with famous C++ trainer Rainer Grimm and Richard Hickling, the former trading floor technologist who left to create a crypto analytics company last year. He's also assembled a list of C++ conferences and user group meetings to attend on Maven's blog.
It's possible to learn C++, stresses Peacock - but it does take effort and patience. "We can teach you, but you also need to your own motivation and mentors to guide you in the process. There are very good online resources nowadays, and most of the conferences are replayed on YouTube."
Have a confidential story, tip, or comment you’d like to share? Contact: firstname.lastname@example.org in the first instance. Whatsapp/Signal/Telegram also available (Telegram: @SarahButcher)
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.)