Hacker Newsnew | past | comments | ask | show | jobs | submitlogin
Show HN: Stock Option Trading Application in Racket (github.com/evdubs)
19 points by evdubs on Dec 27, 2019 | hide | past | favorite | 5 comments


How do you get up to date security pricing info though? That was what I got stuck on when trying to build something like this. Finding stock prices without fifteen minute delays was a barrier I never got past.


For live security prices, there are a couple that are commonly mentioned:

* IEX Cloud - https://iexcloud.io/docs/api/#deep - Live order book data straight from IEX. This is free and I don't think you even need an account at iexcloud.io to use it.

* AlphaVantage - https://www.alphavantage.co/documentation/ - I think this is request/reply, but there is no 15 minute delay from what I can tell.

I don't use IEX's DEEP endpoint, but I do use IEX for daily historical prices, among other things. Here's the project that the option trading application uses for daily prices: https://github.com/evdubs/iex-stocks.

With respect to the option trading application, it doesn't use live prices. Analysis is done offline and, upon order submission, a stock entry price is set so that the option orders don't activate until the live stock price has risen/fallen to the conditional entry price. This is one mechanism that allows the application to be careful and not be filled for an order when the stock has already moved against us. So, there is reliance that the broker (IBKR in this application) is properly handling our order and its special parameters.

If you care to take a look again at algo trading, I think you might find it useful to investigate more "offline" strategies that don't require you to be constantly plugged into ever-changing market data. You might even find that it's easier to find an "edge" as a retail investor by doing this rather than being on the lower-latency side of things.


Thanks for the links, I'll check that out carefully!


this is pretty cool. i got distracted looking at the ib client repo, does it send strategies as a combo order or legs individually?


It sends strategies as a combo order. You can see that in action at https://github.com/evdubs/renegade-way/blob/master/position-... Price conditions are sent along too to keep the order deactivated unless the stock is trading above/below the specified entry price.




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: