In Chapter 9 of Automated Trading with R, we discuss different networking capabilities of popular retail brokerages. At the time of writing, and to the best of my knowledge now, there are only two reputable brokerages that offer OAuth via HTTPS for sending trade orders. These brokerages are TradeKing and OANDA. TradeKing offers a wide array of assets, including stocks, while OANDA is a Forex-only brokerage. The table below is an excerpt from the original manuscript of Automated Trading with R.
OAuth is Language Independent
Readers will notice that Communication Method = OAuth corresponds to Languages = Any for TradeKing and OANDA. This is because OAuth uses HTTPS, so it can be implemented in any language that supports HTTP requests. In short, OAuth implies language independence. Unfortunately, TradeKing and OANDA are not exactly household names like E*Trade, TDAmeritrade, and Charles Schwab (owners of OptionsXpress). These more popular brokerages generally offer programmatic access via C-level API’s which have a large knowledge barrier and steep learning curve. This is unfortunate because traders interested in automating their workflows typically have existing accounts with one of these household names.
Creating More Sophisticated Traders
If more brokerages were to offer programmatic access via OAuth, traders would be able to collaborate and share code easily in succinct languages like R, Matlab, and Python. For example, a script that scans DOW stocks and buys according to some criteria using generalized linear models would take 100-200 lines in R or Python and use zero custom dependencies. The argument can be made that ease of exchange and low barriers to entry in trading automation would be either good or bad. I am of the opinion that it would have a net positive effect on education and wealth in the world of retail trading. I think that the industry is evolving, and, as history has proven, the largest players will be the last to evolve. Nonetheless, I look forward to the state of financial trading in 5 years, where scriptable automation will be cornerstone of brokerage client success stories.
Leave a Reply