2
$\begingroup$

I understand why compiled languages such as C/C++ are important for low-latency trading infrastructure. But I am curious why even researchers at the high-frequency trading firms also require a strong mastery of C/C++? Isn't Python (with the numerous strong packages such as scikit, pandas, etc) a better language for data exploration, data wrangling, machine learning and subsequently to quickly test out algorithms? How are these tasks achieved in C/C++?

Advance thanks for your time and help.

$\endgroup$
  • 1
    $\begingroup$ Is it perhaps not the case that they do use Python for these purposes, but as a quant at a trading firm you are expected to be able to both do data wrangling and machine learning and maintain and expand about infrastructure C++ code? $\endgroup$ – Oscar May 7 at 7:02
1
$\begingroup$

Plenty of HFT shops do not require C++ from the quants who are only involved in modeling. As you hypothesize, Python is sufficient for researching models. Your friend may simply be at a place that values tighter integration between research and engineering. Other shops will just have a Python wrapper to fetch historical data, obviating the need for C++.

(I personally handled both research and development in my day, so I wrote all the Python and C++ code anyway. My experience is not common.)

As mentioned in a comment, there is C++ Design Patterns and Derivatives Pricing by the late Mark Joshi. And there are other books recommended in this answer.

| improve this answer | |
$\endgroup$
  • $\begingroup$ absolutely, moreover C has been there forever $\endgroup$ – user24980 May 19 at 10:44
1
$\begingroup$

C/C++ are low level languages in comparison with Python. Moreover, Python is scripting language. By nature, scripting languages are slow becuase they have to be interpreted. As there is a requirement for the highest possible performance in HFT, compiled languages are natural choice.

Concerning libraries, there is also vast amount of maths libraries for C/C++ as these (mainly C) were historically used in scientific research.

| improve this answer | |
$\endgroup$
  • 1
    $\begingroup$ Thank you for your reply. Do you know of any book that explains how to use C++ for Data Science? $\endgroup$ – vpy Apr 17 at 5:02
  • $\begingroup$ @vpy: I do not use C++ much in work, so I cannot give you reference to a blok but try to Google C++ for data science book. There are some links to Amazon. $\endgroup$ – Martin Vesely Apr 17 at 7:58
  • 1
    $\begingroup$ @vpy More so quantitative finance than data science but I like the book C++ Design Patterns and Derivatives Pricing by Mark Joshi quite a lot. Very accessible book on C++ for people with a background in financial mathematics. The book is more so about implementing efficient, clean and reusable code, so probably more about building up infrastructure than testing out algorithms. $\endgroup$ – Oscar May 7 at 7:01
1
$\begingroup$

I was able to reach out to a friend working at a HFT place as a quant researcher. It appears that C++ knowledge is key to interact with the infrastructure (which is all written in C++). For example, when trying to conduct a research on Level 2 data, researchers are expected to know C++ to be able to use the C++ APIs to aggregate the relevant order book data into a csv format etc, and from there, the researchers can use Python (read the csv and conduct any analysis using scikit learn etc). And when pushing a signal into production, again its necessary for researchers to know C++ to be able to work effectively with engineers to deploy the signal.

| improve this answer | |
$\endgroup$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.