Academic Integrity: tutoring, explanations, and feedback — we don’t complete graded work or submit on a student’s behalf.

Firstly I should explain the background. I am interested in high frequency tradi

ID: 642513 • Letter: F

Question

Firstly I should explain the background. I am interested in high frequency trading programming roles. After looking at many job specs it is very clear that there is a big demand for programmers who have programmed Java and C++ on Unix as opposed to Windows.

My question is what are the differences a High Freq programmer would come across? It cannot be something in the language itself because syntactically they do not differ over OS? Therefore I thought it must be something which the programming language has to interface, resources etc?

Could anyone please help me out as I am trying to improve my C++/Java on Unix, in order to aim for this type of career?

ps I'm guessing part of this answer lies with the socket infrastructure on Unix?

Explanation / Answer

I worked at a HF shop and another services company for a short time. They care about speed. Speed of the software, speed of the network, and any other thing that could possibly have to do with speed.

They use Linux for stability, as other people have noted, but also because it allows you to tune, measure, and control almost everything. With a multicore box, you can use the program 'taskset' to keep your process on a dedicated CPU, for example. But most fundamentally, Linux lets you modify, control, and even edit the kernel of the OS. So say you get an exchange message that is only 1kb. You can control the ethernet driver to trigger an interrupt as soon as that tiny bit of data comes thru, whereas the default may be to wait for more data. HF shops care about this for latency.

Programming wise, learn everything you can about C++, including templates. Learn how to speed programs up any way you can. Learn about 'locality of reference' to keep data nearby in memory so it stays in cache instead of getting paged out. Learn about assembly, so you can see that one line of C++ produces X asm instructions, but another line produces X-1. Learn about threads and processes, and how the kernel controls process scheduling ( there are different ways to control it ).

Java is different, but I don't know enough to give you any advice. What I've heard about it is to learn how to keep code blocks in cache and it will run as fast as C++. Learn everything you can about making Java run fast and the different java VM's available on Linux.

So Linux is like a kit car, and Windows is like a car off GM's assembly line. Windows is one-size-fits-all, and you wont' get any inside details without shelling out $ to Microsoft. Then the added uncertainty of whether the next version of stuxnet could come thru and compromise your whole network. Or next year they'll change the API and you have to learn it all over again. Linux is solid and changes very little.

Hope this helps.