Live data from Hacker News

A high-frequency trading model using Interactive Brokers API in Python

github.com

11–20 of 36 posts

Re: A high-frequency trading model using Interactive Brokers API in Python

#12

Great stuff. I think the author would have been better suited without mentioning HFT, maybe algo trading model?, as its a lighting rod for controversy. If anything I thin this is useful to illustrate just how hard it is to write a full blown trading system. So maybe we could look at what you could add to this to make it something you could use in production(Note, please don't use this in production). 1) Risk system,…

Any good resources regarding building risk systems for someone who is new to the field?

Re: A high-frequency trading model using Interactive Brokers API in Python

#13
Pretty cool stuff. Thanks for posting holoiii. Last year, I took some time off to build an IB API client in Java/Scala for options trading.

The biggest challenge I faced personally was dealing with concurrency of maintaining my positions, orders and quote ticks which led to orders as IB API is based on a asynchronous tick model. I ended up re-writing my code with lots of threads/locks to more code with immutability. Curious how you guys architected your IB client?

Also I hosted my client on the cloud on AWS. I subscribed to maybe a few symbols but always wondered in a more production environment whether bandwidth will kill you (subscribed to 100+ symbols and to a real tick-by-tick quote stream not quote snapshots).

Finally I'd love to hear more about folks out there who might be doing more options or futures trading off of IB API. The equity world is definitely very interesting but I found out early on that I enjoy trading delta-neutral and am not good at predicting directions.

Did you guys find that you have to scale up and write your own execution algo's when your size got too big for the market you are trading? Nowadays I use my IB client mostly as a GUI to view my positions and execute complex option spreads; so it's more of a "gray-box" for me. Do you guys trade pure algorithmically or half-and-half?

Re: A high-frequency trading model using Interactive Brokers API in Python

#14
It's strange to call this HFT. The author makes a note of it, and I suppose has the right to call it whatever he wants.

However, newbies who use this project to learn automated trading should be aware that this is not considered HFT in the industry.

Re: A high-frequency trading model using Interactive Brokers API in Python

#15

Great stuff. I think the author would have been better suited without mentioning HFT, maybe algo trading model?, as its a lighting rod for controversy. If anything I thin this is useful to illustrate just how hard it is to write a full blown trading system. So maybe we could look at what you could add to this to make it something you could use in production(Note, please don't use this in production). 1) Risk system,…

It's good that you lead with risk as #1. You know this, but many don't follow so closely. So here's a Wiki entry of a recent spectacular failure: https://en.wikipedia.org/wiki/Knight_Capital_Group The first sentence: The Knight Capital Group was an American global financial services firm The key word is: was

As an infrastructure engineer doing DevOps currently, I use Knight Capital Group frequently as an example as why its important to always be in control of your application's environment.

Re: A high-frequency trading model using Interactive Brokers API in Python

#16

It's strange to call this HFT. The author makes a note of it, and I suppose has the right to call it whatever he wants. However, newbies who use this project to learn automated trading should be aware that this is not considered HFT in the industry.

I would love to hear your definition of HFT. I've worked in the industry and never seen it defined well.

Re: A high-frequency trading model using Interactive Brokers API in Python

#17
post #6

Great stuff. I think the author would have been better suited without mentioning HFT, maybe algo trading model?, as its a lighting rod for controversy. If anything I thin this is useful to illustrate just how hard it is to write a full blown trading system. So maybe we could look at what you could add to this to make it something you could use in production(Note, please don't use this in production). 1) Risk system,…

As the great Jules Winnfield ( http://en.wikipedia.org/wiki/Pulp_Fiction ) once said, "Well, allow me to retort." > I think the author would have been better suited without mentioning HFT, maybe algo trading model?, as its a lighting rod for controversy. Don't be so quick... in a world where keeping score is simple and the odds are tilted for many, any publicity is good publicity. > 4) Back testing, no HFT trade idea…

I agree with you on back-testing. Trying to model order book dynamics across multiple exchanges accurately is something of a fool's errand (especially in pro-rata markets). Running stuff in sim generally lets you iron out flaws and then you can just plug and play to see if it pays. Heh, I used to just plug and play directly with small size as a test rather than using sim since my firm didn't have a usable sim set-up at the time. Just put extremely limiting risk limits in terms of order sending rates on and then cut it off it loses too much in the experiment and move to the next one (yes, this did make strategy choice pretty path-dependent...).

RE rate limiter: For this dude's implementation I don't think it matters. He's using IB (a retail broker) for his data rather than the direct market feed. IB sends a sample of market data rather than every single book update and I think they do it at a rate slower than ~10ms so he probably won't run into problems. Heh, I remember some fun times figuring out the optimal way to handle getting spammed by the exchange. It is a neat industry, but kind of makes you feel a bit like a societal leech some times (I know, we're risk salesmen making markets more efficient and all...).

Re: A high-frequency trading model using Interactive Brokers API in Python

#19
post #17
post #6

Earlier quoted context omitted.

As the great Jules Winnfield ( http://en.wikipedia.org/wiki/Pulp_Fiction ) once said, "Well, allow me to retort." > I think the author would have been better suited without mentioning HFT, maybe algo trading model?, as its a lighting rod for controversy. Don't be so quick... in a world where keeping score is simple and the odds are tilted for many, any publicity is good publicity. > 4) Back testing, no HFT trade idea…

I agree with you on back-testing. Trying to model order book dynamics across multiple exchanges accurately is something of a fool's errand (especially in pro-rata markets). Running stuff in sim generally lets you iron out flaws and then you can just plug and play to see if it pays. Heh, I used to just plug and play directly with small size as a test rather than using sim since my firm didn't have a usable sim set-up…

Agree re: the rate limiter--totally irrelevant in the case of OP.

Re: A high-frequency trading model using Interactive Brokers API in Python

#20

Great stuff. I think the author would have been better suited without mentioning HFT, maybe algo trading model?, as its a lighting rod for controversy. If anything I thin this is useful to illustrate just how hard it is to write a full blown trading system. So maybe we could look at what you could add to this to make it something you could use in production(Note, please don't use this in production). 1) Risk system,…

This guy gets it. great notes and things to work toward for the author and contributors.
Post reply on HN