Quantopian's community platform is shutting down. Please read this post for more information and download your code.
Back to Community
Robinhood Live Trading Update: Stop Waiting 3 Days with Robinhood Instant

Robinhood recently announced Robinhood Instant, which gives you "instant access to deposits and immediate access to your funds after selling stocks." This also means that there is no longer a T+3 waiting period after selling securities.

While we highly recommend reading the full documentation, here are a few highlights about Robinhood Instant:

Instant Deposits - Bank transfers up to $1,000 into Robinhood are now
instantly available for investing. No more waiting for your funds to
land in your account anymore.

Instant Access to Funds - Proceeds from a sale are now immediately
available to reinvest. Previously, if you sold stock, you had to wait
three days for your funds to settle in your account before you could
use the proceeds to purchase more stock.

Robinhood Instant is Free - We believe Robinhood Instant will be
powerful for all kinds of investors, so we made it free. That’s right:
no monthly or recurring fees, no trading commissions, no interest
charges, and no account minimums.

Notes/FAQ For Live Traders

Attached is an updated sample algorithm that's geared for live trading with Robinhood Instant. The main difference between this version and the original algorithm is that this updated version does not check for unsettled funds. For full details on the strategy or Quantopian's integration with Robinhood, check out the original thread.

Disclaimer

The material on this website is provided for informational purposes only and does not constitute an offer to sell, a solicitation to buy, or a recommendation or endorsement for any security or strategy, nor does it constitute an offer to provide investment advisory services by Quantopian. In addition, the material offers no opinion with respect to the suitability of any security or specific investment. No information contained herein should be regarded as a suggestion to engage in or refrain from any investment-related course of action as none of Quantopian nor any of its affiliates is undertaking to provide investment advice, act as an adviser to any plan or entity subject to the Employee Retirement Income Security Act of 1974, as amended, individual retirement account or individual retirement annuity, or give advice in a fiduciary capacity with respect to the materials presented herein. If you are an individual retirement or other investor, contact your financial advisor or other fiduciary unrelated to Quantopian about whether any given investment idea, strategy, product or service described herein may be appropriate for your circumstances. All investments involve risk, including loss of principal. Quantopian makes no guarantees as to the accuracy or completeness of the views expressed in the website. The views are subject to change, and may have become unreliable for various reasons, including changes in market conditions or economic circumstances.

46 responses

That's insane. Are there any downsides at all to using leverage?

Hi Brandon,

Great question and just to be clear, Robinhood Instant is not an account with leverage. It's a limited margin account unlike a normal margin account where you usually have 2 or 3 times your normal buying power.

That being said, leverage means you have the potential to incur higher losses. I would check out (http://www.finra.org/investors/understanding-margin-accounts-why-brokers-do-what-they-do) for a full explanation on margin accounts.

Seong

As a safeguard, your algorithm will run into an exception if it's attempting to place an order that will designate you as a pattern day trader.

Presumably, this is only under real-money live trading of with Robinhood? Also, does Robinhood trigger the exception? Or Quantopian? Can the exception be managed, with try-except?

Also, there is mention on https://support.robinhood.com/hc/en-us/articles/207677966-Robinhood-Instant of:

By default, we prevent you from being flagged as a pattern day trader by preventing you from making your fourth day trade.

But you say "As a safeguard, your algorithm will run into an exception if it's attempting to place an order that will designate you as a pattern day trader." So what's the story? If Robinhood has a safeguard in place, why would Quantopian crash the algo? Or is the "safeguard" not a rejection of orders, but a trigger to Quantopian to crash the algo?

Currently, we're handling the response from Robinhood adequately but poorly -- the algo will go into exception. We are working on more gracefully handling the "pattern day trading" response from Robinhood in the future so that, similar to IB, the trades will be blocked but the algorithm will continue.

Disclaimer

The material on this website is provided for informational purposes only and does not constitute an offer to sell, a solicitation to buy, or a recommendation or endorsement for any security or strategy, nor does it constitute an offer to provide investment advisory services by Quantopian. In addition, the material offers no opinion with respect to the suitability of any security or specific investment. No information contained herein should be regarded as a suggestion to engage in or refrain from any investment-related course of action as none of Quantopian nor any of its affiliates is undertaking to provide investment advice, act as an adviser to any plan or entity subject to the Employee Retirement Income Security Act of 1974, as amended, individual retirement account or individual retirement annuity, or give advice in a fiduciary capacity with respect to the materials presented herein. If you are an individual retirement or other investor, contact your financial advisor or other fiduciary unrelated to Quantopian about whether any given investment idea, strategy, product or service described herein may be appropriate for your circumstances. All investments involve risk, including loss of principal. Quantopian makes no guarantees as to the accuracy or completeness of the views expressed in the website. The views are subject to change, and may have become unreliable for various reasons, including changes in market conditions or economic circumstances.

Is there any real advantage to using Robinhood over IB? There is little information on their site about how they execute orders, or if they even execute them themselves vs sending to another broker. This is one of those times where "free" just seems too good to be true, and their lack of information on their site only makes me more wary of them.

Personally, I am fine with IB's $1 per trade and knowing how my order is getting executed, and getting use of their reporting facilities and such.

An update on the pattern day trading

If you're about to place an order that will designate you as a pattern day trader, your algorithm will not go into exception but that order will be rejected and you will receive a message akin to buy/sell may cause PDT.

Happy to answer questions on that.

Hi Seong,

How does one access the message in the code?

Thanks,

Grant

Hi Seong,

Presumably, when the order is rejected, the reason for rejection will be captured in the order object? Or will the message only be displayed on the log?

It seems you'd want to have the order status set to rejected (whatever the code is for that...where can I find the code definitions?), and then put in a reason, using the corresponding key. Or maybe just define a special rejection code, corresponding to PDT?

Also, will Robinhood (Quantopian?) notify via e-mail that PDT has been triggered for a given day? Or will it be a matter of users checking manually? Or maybe by "you will receive a message" you mean that an e-mail will be sent?

Grant

Event({'status': 0, 'limit_reached': False, 'created': Timestamp('2016-03-07 00:00:00+0000', tz='UTC'), 'stop': None, 'reason': None, 'stop_reached': False, 'commission': None, 'amount': 8000000, 'limit': None, 'sid': Equity(24, symbol=u'AAPL', asset_name=u'APPLE INC', exchange=u'NASDAQ GLOBAL SELECT MARKET', start_date=Timestamp('1993-01-04 00:00:00+0000', tz='UTC'), end_date=Timestamp('2016-03-10 00:00:00+0000', tz='UTC'), first_traded=None, auto_close_date=Timestamp('2016-03-15 00:00:00+0000', tz='UTC')), 'id': 'a05f0a46d9c94451aa077e8161334555', 'dt': Timestamp('2016-03-07 00:00:00+0000', tz='UTC'), 'filled': 0})  

Grant,

In the case that an order was rejected, you'd be able to see the rejection:

  1. In your live trading dashboard in the transactions details tab with the reason buy/sell may cause PDT
  2. Similarly, you'll be able to see it through the order object as you posted. That reason will be akin to buy/sell may cause PDT.

While with the safeguard your order will be rejected so PDT wouldn't be triggered but for more specific questions about PDT notifications, Robinhood support (support.robinhood.com) will be able to answer them.

Hope that helps,
Seong

Thanks Seong,

Cool. The PDT business needs to be understood. I'll follow up with Robinhood when I get the chance. I don't understand what to do if my algo has an order rejected due to the PDT safeguard.

Grant

If I understand correctly, Robinhood has a safeguard in place to prevent stepping over the line and being flagged as a pattern day trader. On https://support.robinhood.com/hc/en-us/articles/207677966-Robinhood-Instant, the discussion under the section Pattern Day Trader states:

By default, we prevent you from being flagged as a pattern day trader by preventing you from making your fourth day trade.

So, in the context of Q, I suppose this means that orders will be rejected with the reason buy/sell may cause PDT.

I'm wondering how to code for this case? Will the reason field of the rejected order always contain the exact string 'buy/sell may cause PDT' or might it change? Who generates the string, Q or Robinhood? If the latter, I'm concerned that they could change it without notice, and cause problems (e.g. 'buy/sell may cause PDT' is changed to 'PDT safeguard').

Also, is there any way under backtesting or Q simulated live trading to trigger the safeguard, to simulate a PDT safeguard event?

Also on https://support.robinhood.com/hc/en-us/articles/207677966-Robinhood-Instant, there is a discussion of High Volatility Stock Protection. It is not immediately clear how that protection will work when doing Q-Robinhood trading.

Hi Seong,

Any feedback on my questions immediately above, dated March 12?

Thanks,

Grant

Great questions, I'll try to answer them one by one.

I'm wondering how to code for this case? Will the reason field of the rejected order always contain the exact string 'buy/sell may cause PDT' or might it change? Who generates the string, Q or Robinhood? If the latter, I'm concerned that they could change it without notice, and cause problems (e.g. 'buy/sell may cause PDT' is changed to 'PDT safeguard').

There are a couple ways to code for this. First, you do have the day_trades_remaining field that you can use along with the order object to determine if an order has been rejected due to PDT status. IE. If your order was rejected (https://www.quantopian.com/help#api-orderobj) and you have 0 day_trades_remaining, you can be fairly certain that your order was rejected due to PDT status. In the case of 'buy/sell may cause PDT' is changed to 'PDT safeguard' I think the simple solution here is to code for the existence of PDT in your code.

So for example you can either do:

# First Option  
if get_order(order_id)['status'] == 3 and context.account.day_trades_remaining == 0:  
    log.info("Pattern day trader!")

# Second Option  
if get_order(order_id)['status'] == 3 and 'PDT' in get_order(order_id)['reason']:  
    log.info("Pattern day trader!")  

Also, is there any way under backtesting or Q simulated live trading to trigger the safeguard, to simulate a PDT safeguard event?

Unfortunately, I don't believe that there is a way to do that.

Also on https://support.robinhood.com/hc/en-us/articles/207677966-Robinhood-Instant, there is a discussion of High Volatility Stock Protection. It is not immediately clear how that protection will work when doing Q-Robinhood trading.

Similar to the app, if your order is rejected due to funds from high volatility not being available. Your order object will contain that reason as well as the dashboard.

Hope that helps
Seong

Hi Seong,

I'm confused about the order status. Should it be '3 - rejected', instead of '4 - held', since orders will be rejected if the PDT safeguard is triggered? Or are they actually held at Robinhood?

And if 'held' will the orders then be automatically cancelled at the close?

Grant

Oh, that was my mistake. I meant 3 which is rejected.

Thanks. Any idea what reason string Robinhood will send if the rejection is due to attempting to buy high volatility stocks?

How do you get Robinhood instant? Is there a way without inviting someone else? I don't feel comfortable asking people to sign up without trying it out fully myself.

Grant,

Thanks for the question. You can test for the existence of igh volatility stock in the get_order(order_id)['reason'] check.

So:

if get_order(order_id)['status'] == 3 and 'igh volatility stock' in get_order(order_id)['reason']:  
    log.info("High Volatility Trade Reason!")  

Kenny,

You can find out how to get Robinhood Instant through the information page here: https://support.robinhood.com/hc/en-us/articles/207677966-Robinhood-Instant

Unfortunately, I do not know if there is a way beyond what's stated on that page. I would suggest contacting Robinhood for further questions on that subject.

Hope that helps!

Seong

Thanks Seong,

At some point, I'll take a crack at writing a Robinhood-ready algo and post it for review. As I mentioned above, I'd still be concerned that the order rejection reason strings aren't fully documented and controlled (i.e. they could change without notice). Have you triggered them, to see see exactly what Robinhood is sending?

By the way, in your post above, you provide the string 'igh volatility stock'. Did you mean 'High volatility stock' or 'high volatility stock'?

Grant

Grant,

You bring up a good point, we're in the process of updating our documentation now for these order status reason strings. That being said, we do our best to notify our users when things change, especially with something like an order rejection reason.

And the strings can change from High to high so the igh was intended.

Thanks,
Seong

Hi Seong, can i use this algo form for interactive Broker? thanks

Ioannis,

You can use this algorithm with Interactive Brokers, but you will need to remove many of the Robinhood cash account specific methods that we have like order_for_robinhood. This is especially important if you have an IB margin account.

Thanks Seong, just to clarify; do I need to change anything if I only get into long positions and I have a no margin account. Also I will be using the previous version that has the T+3 settlement date.

On a second note can you please elaborate on the time_rules.market_close(minutes=1)? what does it really mean? Is it the same as time_rules.market_open(minutes=389)?Thanks

Hello Everyone;
I am new to the trading and this is what happened today. I only have 2 Days trade in my account. I bought the same stock twice today. When I tried to sale it at profit it gave me the message of "Sale may Cause PDT". I am not sure why is that because according to Robinhood it should be 4 transactions to be designated as day trader, and I am doing my 3ed? Anyone? Thanks

Hani

Maybe, did you make two trades on your first day too? Dunno, but maybe that would get you to four by how RH has implemented the controls for the FINRA rule. Have a look here:

http://www.finra.org/investors/day-trading-margin-requirements-know-rules

If not, welcome to wacky world of trying to understand what-the-heck did my online brokerage do to me now. Open a support ticket and sit back. If they can explain it, please post.

Richard

Hani, the key word here is may probably as a safeguard warning. From what i understand, they will actually disqualify your order and cancel it if it does trigger day-trader status.

Thank you guys for your reply. This stupid message made me lose $400 of possible gain. I know about the 4 day trader policy. The problem is I only have 2 and I should be able to do the 3rd before I get the message. I bought 500 shares, then I a bought 200 shares of the same stock. So, when I tried to sale back the 500 it intiated this message, which I believe it shouldn't.

Hani,

The message 'Sale may cause PDT' is a message that comes from Robinhood. I would take this up with their support staff and see if they can see what's going on with your account!

[email protected]

Seong

Thank you Seong;
I took your advice and sent them an email. Even though, I don't think it will fix anything. The harm is done already. Thanks again.

Hani

Here's a reference:

https://support.robinhood.com/hc/en-us/articles/207677966-Robinhood-Instant

We define a day trade as the buying and selling the same stock on the same trading day.

If you make four day trades in five trading days, you will be flagged as a pattern day trader for the next 90 days.

By default, we prevent you from being flagged as a pattern day trader by preventing you from making your fourth day trade. You can update this setting in the ‘Day Trades’ screen.

@Hani -

I'm wondering how Robinhood treats the case of buying the same stock twice in one day, and then selling it once, that same day? If instead one would buy the same stock twice, and then place two separate sell orders, it would be two day trades, right? On the same page referenced above, they give an example of what they'd consider a single day trade:

The next day you make one day trade by buying 100 shares in two orders and then you sell 200 shares of ABC in one order.

This would seem to be identical to the scenario you presented above.

It appears there may be a setting ("You can update this setting in the ‘Day Trades’ screen"). You might check yours, to see if it might explain your experience.

I'm new here, and trying to conquer a very steep learning curve. This caught my eye as I am a Robinhood instant user, and not subject to PDT rules. I have been trying in vain to modify/simplify the algo as follows:

Would it be possible to:
-Modify to allow trading intraday, at will, on minute frames.
-Move between SPY & SH only (or two other correlated sec.) with 95% of portfolio value based on MA.
-Would the order logic prevent rejected/unfilled orders on that short of a time frame?
If anyone would be so gracious as to help, it would be very much appreciated. This base would serve as a platform for further learning and experimentation.
Thanks,
Christopher

Chris,

Have you looked over:

https://support.robinhood.com/hc/en-us/articles/207677966-Robinhood-Instant

You still have some constraints, as I understand. You can't "day trade" as described on the FAQ link. Otherwise, you can buy/sell SPY & SH (or other) on a minute-by-minute basis.

Grant,

Thanks for your reply.

There seems to be a lot of misinformation regarding instant. After using it for the past three months I can say definitively that as long as the account balance is at $25,000 or above, your ability to day trade is truly infinite, and without any constraint. In the past three months I've personally day traded the same security (including leveraged ETF's, i.e. UVXY) a multitude of times in the same day, despite what the robinhod FAQ's say. Order fills generally process at the same speed as normal robinhood orders (1-4 seconds) but even if an order is only partially filled, cash from the sale seems to always be immediately available for re-investment. Honestly, I am currently just learning the environment, and have little coding experience. I've read most of the algorithms on the site, (truly brilliant stuff) and grasp most of the pieces, but cannot yet effectively put them together. Prior restriction due to commission costs seems to dictate most code on the site be geared toward daily or weekly trading. As the concept of instant is so new there are almost no existing platforms on which to clone, experiment and build an intraday strategy such as this for robinhood. As a noob, I'm trying to get better every day, I am humbly and respectfully asking anyone willing, to create a framework so I, and others can explore this further.

Chris Venne. That was the most inspiring thing I read all month. I usually don't post anything, but I had to this time to acknowledge your desire to keep learning. I noticed Quantopian about two months ago and I thought I could learn everything in a day. Turns out, after two months I am still stuck as always. The 2.0 changes don't help either because that's just a double whammy of "new stuff" to learn. I think the best place to start is keep seeing what other the community is doing because nobody really knows what they are doing individually. I downgraded from instant back to a cash account just for the benefit you mentioned...unlimted day trades. I can now do that again with the cash account as long as I use a third of my money at a time. SUNE got me good and I'm hoping that within a couple weeks I regain my losses through court. Instant account does not make sense for <$25k accounts. Nice to hear from you.

@ Chris,

If "your ability to day trade is truly infinite" then there is no special framework required for you to use Robinhood as your broker, unless I'm missing something (except that Robinhood doesn't support shorting).

@ Grant

Perhaps framework was the wrong language. My hope was was that someone with more advanced coding ability would be willing to modify the original algo to run roughly as I described above, and post it here as a building block. Being able to compare the original and an updated version side by side would go a long way to help understand how to make further changes to schedule function, handle data, and the order logic, etc. And then hopefully apply different indicators to this code, or use it as a basis for testing other existing strategies to see how they perform intraday. Kind of asking to stand on the shoulders of giants here, but the desire to learn is genuine. Thanks

@ Chris,

Well, I'd start a new discussion thread. Even if you can't code, you should be able to describe precisely what you want to do, in words and pseudo-code. If you do a good job at this, then the coding will follow easily and somebody might do it for you. Aside from a few basic limitations, Q is a blank sheet of paper.

@ Grant,

Thanks again Grant

Chris

Hi guys, dying to get into robinhood instant. 200k place in line, if you are looking to sign up please use my referral link.

It would be greatly appreciated!

http://share.robinhood.com/philt3

When can we have multiple Robinhood accounts so we can run more than 1 Algo?

Why have multiple Robinhood accounts when you can just use an algo to allocate money for different strategies?

I am getting this error when i try running the sample.

AttributeError: 'NoneType' object has no attribute 'amount'  

any ideas on a fix?

How could this be put into code for Robin hood Instant users?

stocks to watch: FB, AAPL, NFLX, BABA, TWTR, USO

Cross above 11 period moving average on a day chart signals BUY
Calculate trail stop loss of 2% of position to be updated at market open if stock is higher than close of previous day
If stock opens lower then uses previous days stop loss value or break even price (whichever is higher)
If stock falls below stop loss thresh hold, does not re enter position until stock price crosses another instance of an 11 period moving average

This should prevent day trades from occuring unless there is a wild swing in that day, but then again the variables would have to be just right for this to happen.

Hey, can anyone figure out how to update this? It has outdated APIs

Hi everyone, I am new on Q. I was wondering if there is any way to specify initial capital allocation for algorithms. This way one can trade more than one algo on say Robinhood. This is what I am interested in: running more than one algo on Robinhood. Let me know if there is any other way of doing it.