Newbie here - just starting out with IB. I have coded my own algo systems in the past but not with IB. Those have been in Python(even though C++ was also an offered interface)? and I have never had any issue with them in terms of performance.
Another thing to consider though is, does it really matter if you are an individual algo trader? How many of us here are depending on very high speed of execution for great returns? If one is, then doesn't that bring about questions as to whether the system(and returns) need to be more independent to execution speeds? I firmly believe execution speeds are in the realm of HFT shops (ala highly sophisticated infrastructure).
On Thu, Feb 4, 2021 at 12:09 PM Robert Crim <machine@...> wrote:
Specific?benchmarks are probably not useful here. C/C++ are in general "faster" than python, all things equal, but it's not that simple.?
Working with the IB api is mostly I/O-bound, meaning performance is more a function not blocking the rest of your program while waiting to transfer data over the network. You can do this in Python (with async/await) while maintaining a lot of the benefits of working in python.
It's also worth keeping in mind that performance-sensitive parts of python programs often implemented in native code, especially in the language?itself* and popular numerical/analytics libraries, so a lot of computationally-expensive code is implemented in C (or fortran) anyway.? Finally, writing high-performance code requires particular expertise and is more nuanced?than just number crunching, and has some serious trade offs in terms of complexity, reuse, and safety.
So the guidance is typically just to work with what you're more productive in and optimize only where you are impacted by performance problems you actually have. Working in Python won't paint you in a corner here.
On Thu, Feb 4, 2021 at 10:39 AM <bruceb444@...> wrote:
Hi,
Has anyone benchmarked speed of making requests and receiving data (the full cycle) with C/C++ VS Python?
Does it make a difference to go with either or in speed? (Excluding after the fact calculations which I am thinking with high probability that C wins).