The expert C++ programming technique you need to know for a HFT interview
Want a job in HFT? You'll need to be very good at C++. In job interviews, you'll be asked to demonstrate your proficiency with the programming language. Engineers on forum website Blind have highlighted one difficult technique in particular.
Lock free code, essentially programming multiple threads using the same memory without allowing them to block each other, appears a common trend in HFT interviews. One engineer at Headlands Technology "was asked to implement a lock-free SPSC queue in C++" during the interview.
You can also expect to need those lock free skills on the job. An engineer for Millennium owned fund WorldQuant says lock free code, which can show up in interview questions, is "another tool in the toolbox" for their team. Note that they also say interview questions are "certainly team dependent."
Getting lock free code wrong can be very costly. Matthieu Monrocq, an ex IMC engineer now at crypto market maker Darley Technologies, says a "lock-free algorithm, badly implemented, or badly used, can lead to terrible performance." He says, "it's experts territory, and even experts regularly get it wrong." You can find an introduction to lock free programming from Jeff Preshing, a former technical architect for Ubisoft, here.
There's more to the interviews than just lock free code, however. One engineer from the Chicago Trading Company says most firms will "mostly focus on STL utlility," as well as "deep dive questions on templates," and "areas of modern C++." They differ in regard to "the depth you get into and, for some places, how idiomatic you are with C++."
Have a confidential story, tip, or comment you’d like to share? Contact: +44 7537 182250 (SMS, Whatsapp or voicemail). Telegram: @SarahButcher. Click here to fill in our anonymous form, or email firstname.lastname@example.org. Signal 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.).