Java or C++ for HFT?

Thank you for sharing your insights. I have a follow-up question:

Besides, my current code is written in Python. Before I am able rewrite everything in C++, what is a good way of coupling my current Python algorithm code with the future C++ code that communicates with the broker, e.g. placing/cancelling orders and getting account status.

For example, if my python code decides to purchase 1 share of stock AAPL, it sends the command the C++ daemon. What is a good way of doing this? I can think of redis or rabitmq.

This isn't a good design pattern, you'll just pay most of your latency communicating to/from redis or rabbitmq.

As others have pointed out, one possibility is to use boost bindings inside your Python application. I've used boost and it is tolerable, but I don't really like maintaining that pattern either.
 
This isn't a good design pattern, you'll just pay most of your latency communicating to/from redis or rabbitmq.

As others have pointed out, one possibility is to use boost bindings inside your Python application. I've used boost and it is tolerable, but I don't really like maintaining that pattern either.
I belive the OP is thinking of a temp solution using C++ and python.
 
Why FIX? Don’t they offer other choices?
I highly recommend FIX over a broker's proprietary API. I was stuck with Interactive Brokers for far longer than I otherwise would have been because I didn't want to have to rewrite all my code. Would have been much easier decision if I had used FIX originally. As long as you're not using it to retrieve quotes it's also one of the fastest options.
 
I highly recommend FIX over a broker's proprietary API. I was stuck with Interactive Brokers for far longer than I otherwise would have been because I didn't want to have to rewrite all my code. Would have been much easier decision if I had used FIX originally. As long as you're not using it to retrieve quotes it's also one of the fastest options.
Obviously code can be designed better so that the lowest layer of connectivity can easily change without touching the business logic. FIX is not a feasible option for hft.
 
If your trading logic in python it is already slow, do you really need to optimize the lower layer?

I am not doing HFT yet but I am interested in getting into it. As a result, I might as well plan in advance for the execution part of the code.
 
I belive the OP is thinking of a temp solution using C++ and python.

Correct. This is a temporary solution before I rewrite everything in C++. My current strategy is not very latency sensitive and Python is fast enough.
 
Back
Top