Quantopian's community platform is shutting down. Please read this post for more information and download your code.
Back to Community
alternative to Quantopian-Robinhood?

I'd been hoping with this ridiculous hobby to extract some money out of Quantopian, and then parlay it into my own trading, probably starting with Robinhood. Given that this is no longer an option with Quantopian, what are the options, should I win some pocket change in the upcoming contest?

15 responses

Charles Witt posted about a workaround he was using: https://www.quantopian.com/posts/robin-hood-vix-mix-extreme-vetting#59d3c3ec02a59b00101a73b0 Basically scraping the paper-trade window using Python, and executing using the Robinhood API. Going that route is far from fool-proof, but depending on the strategy could be sufficient.

Otherwise, depending on your algo's data needs, it doesn't have to be too hard to "roll your own" or extend the functionality of a project like zipline-live, right? Just code the bare minimum features you need. I'm finally making baby steps down that path now. (The past week has been really painful for my high-beta buy-and-hold portfolio, which is the motivator I needed to get my #$$ in gear.)

There are plenty of places from which to access (or scrape) free market data:
https://www.alphavantage.co
https://iextrading.com/developer/
https://finviz.com/screener.ashx (could replace pipeline in certain scenarios)
https://www.advfn.com/
https://intrinio.com/data/us-fundamentals-financials-metrics-ratios-stock-prices
https://www.quandl.com/data/SF0-Free-US-Fundamentals-Data
https://stockflare.com/
https://www.sec.gov/edgar/searchedgar/accessing-edgar-data.htm

And then of course, the Robinhood API will give you access to price+volume and (questionable) fundamental data as well.

Officially, they don't have a public API:

https://support.robinhood.com/hc/en-us/articles/210216823-Robinhood-API-Integrations

Is it that they have an API but no support? Anybody know the story?

They don't have a public API, but the app communicates with their servers via API endpoints, and those have been reverse-engineered/documented by hobbyists. You can find a python implementation on github.

About a year ago I tried the reverse engineered Robinhood API on github and it did work (login, down load prices, and trade). I don't know if it still does.

(https://github.com/Jamonek/Robinhood/blob/master...)

For stock prices I got them from google. I even made it run all on a Raspberry PI. No zipline, just compute moving averages etc and simple python logic.
The original motivation was to get the latest CBOE VIX prices which did not work in Quantopian at that time.

Individual investors have different goals from Q. Hourly data should be good enough. I would also like to be able to include special securities in my portfolio that are not traded but do influence my total return. And of course we don't have high leverage available.

Given the trouble that Q has with "clean data" I think this is harder than free sources or scraping google.

IEX does a good job. Check them out. In zipline-live there are few people who are using it.

Thanks "Viridian Hawk" and Greg -

Robinhood is introducing "Robinhood for Web" in early 2018, so I'll wait to see what that's all about. Also, I have to win money in the Q contest, so first things first...variety of reasons to start from nothing...it is the easiest way to generate infinite profits (and losses I wouldn't regret), I figure, if the denominator of money out of my current pocket is zero.

Raspberry PI...now there's turning Wall Street on its head. "Programmer turned trader uses computer smaller than a deck of cards to become a millionaire!"

You may check Quantconnect.

Robinhood had a glitch where for a week everybody could access the web interface. It's definitely nicer to use than the app since you can use tabs and a mouse, and there is some interesting additional data (You can see what levels other RH users averaged into stocks at), but it's quite a bit slower/less responsive than the app. Other than that it's not a whole lot different. I'm more excited about free options trading and free crypto trading. Options will open up hedging and basically let you short.

Is there any reason why Quantopian doesn't have options?

@ Peter -

I'm kinda perplexed about IEX. I recall when Quantopian allowed the ability to route orders through IEX:

https://www.quantopian.com/posts/explore-trading-through-iex-with-quantopian

At the time, one would still need an Interactive Brokers account (Robinhood was not available).

It sounds like to use IEX, one actually would need to be a kind of business entity, per:

https://iextrading.com/trading/membership/

Who can be a Member of the Investors Exchange?

US registered broker-dealers are eligible to become Members of Investors Exchange (the "Exchange" or "IEX"), subject to the requirements of Chapter 2 of the Exchange Rule Book. Broker-dealers must be a member of another Self-Regulatory Organization (SRO) and maintain an active clearing relationship with an NSCC member clearing firm who is also a Member of the Exchange.

So how are folks using zipline-line in conjunction with IEX?

" Raspberry PI...now there's turning Wall Street on its head. "Programmer turned trader uses computer smaller than a deck of cards to become a millionaire!""

What most people don't know about the PI is that if you replace the Xtal oscillator with an LC oscillator using a flux capacitor, it reverses the phase velocity of the clock and creates a negative entropy quantum well around the ALU. Within this well special computations are possible. I was running 2 simultaneous interlinked programs on my PI. The first used an inverse SHA256 algorithm as a highly efficient bitcoin miner which generated funds for the second. The second used Baysian ML to predict Beta of time series for XIV allowing unlimited Alpha and highly profitable trading.

All was going well until about week ago when my cat Schrodinger was frightened by some Russian spys (or maybe they were N Korean) who were peeking in the window. He knocked Pb cover off the PI which allowed a cosmic rays to flip a bit in the L2 cache. This triggered a massive sell order on XIV which caused the present increase in stock market volatility and impending market collapse.

@Grant -- You don't need to be any sort of member of IEX to use their amazing free public API for market data -- price, volume, market cap, financials: https://iextrading.com/developer/docs/#stocks
Not sure how people are using it with zipline-live, but it seems like it'd make sense to cache the data locally and from there recreate pipeline and data.history('1m'). You'd still need to use the Robinhood API to place orders and to keep track of your positions. https://github.com/Jamonek/Robinhood

Interesting. Thanks.

Looks like IEX feed is real-time, but delayed by 15 minutes:

https://iextrading.com/developer/docs/#delayed-quote

So, it does appear that one could cobble together a DIY trading system, with an official IEX feed and an unofficial Robinhood API.

Look again -- the IEX API has both "delayed quote" and "quote." Not sure why they have both, but I think the delayed quote is probably the consolidated price and the real-time quote is just the IEX exchange price. (I think IEX price is probably accurate enough, but for volume it might be important not to conflate IEX volume with consolidated volume.) Also check out the 'chart' endpoint -- you can get intraday 1minute OHLC bars for the past 30 days through the current minute, and daily OHLC for 5 years (though I believe you can get daily bars from Quandl further back). Also check out the batch requests feature -- you can for example pull up to 100 real-time quotes with one API call.

I'm about half-way done rolling my own Robinhood algo-trading framework now. I've got all the stock data integrated. I'm using IEX for real-time quotes as opposed to pulling them from Robinhood. Now I just need to do orders and positions.

Excited to get this one up and running: I've got a Quantopian paper trade with 19.0 sharpe/2.4 alpha/0.46 beta. Breezed right over the correction. It'll be interesting to see if it manages to perform halfway as decent with real money. (Well, if it does I can retire and devote my life to developing philanthropic risk-neutral institutional-grade strategies for pension funds and endowments. :P) However, I think where the whole backtest/paper trade paradigm falls short is that it cannot account for how other market participants react to your orders. So... we'll see.

I think the butterfly effect is more pronounced in markets than can be accounted for via slippage models. It's a big reason why I was disappointed to see Quantopian discontinue live trading. That feedback loop between deploying real capital and seeing how it acts differently than simulated money--though hard to quantify--is crucial to have a sense for.

Thanks again, Viridian Hawk.

Terms are here:

https://iextrading.com/api-exhibit-a/

It includes:

You may not sell, lease, furnish or otherwise permit or provide access to Investors Exchange (“IEX”) market data, which includes market data licensed from third-parties, to any other person. Any redistribution of the IEX API data is strictly prohibited.

But also, under https://iextrading.com/developer/docs/#attribution:

If you redistribute our API data...

So, redistribution is strictly prohibited, but if you do, be sure to attribute the data to IEX!

Also the cautions:

You understand and acknowledge that such securities information does not reflect trading activity on markets other than IEX, and are intended to provide you with a reference point only, rather than as a basis for making trading decisions

By viewing or using this data or information in any manner, you understand and acknowledge that such information does not reflect trading activity on markets other than IEX, as applicable, and is intended to provide you with a reference point only, rather than as a basis for making trading decisions.

I'm not sure what "reference point" is supposed to mean, but it seems like an awful lot of data and effort just for entertainment value. I'd think the intent is that it would be used for making trading decisions.