Back to Community
Robin Hood Extreme Vetting

Robin Hood Throws A Party has been renamed Robin Hood Extreme Vetting.

There is a garbage collection fire sale function included in this one.
CAUTION: I have mostly lost money with my algorithms so far. You may be wise to wait and see if this one is any different.
I am live trading this version now.

Clone Algorithm
941
Loading...
Backtest from to with initial capital
Total Returns
--
Alpha
--
Beta
--
Sharpe
--
Sortino
--
Max Drawdown
--
Benchmark Returns
--
Volatility
--
Returns 1 Month 3 Month 6 Month 12 Month
Alpha 1 Month 3 Month 6 Month 12 Month
Beta 1 Month 3 Month 6 Month 12 Month
Sharpe 1 Month 3 Month 6 Month 12 Month
Sortino 1 Month 3 Month 6 Month 12 Month
Volatility 1 Month 3 Month 6 Month 12 Month
Max Drawdown 1 Month 3 Month 6 Month 12 Month
# Backtest ID: 5820d8296cd2021082c68b79
There was a runtime error.
114 responses

I love your naming schemes haha. Keep it up.

How is it doing so far?

Not making money yet, but just started yesterday. Tomorrow will probably be a noticeable dip in market.

Default is buy and hold until profit target up to 10 trading days (and 20 trading days if previously owned).

Those variables can be changed for anybody wanting to see more action.

Thanks Charles!

I just rerun the backtest (same everything but slightly higher initial capital) and got much lower returns and higher volatility... Is it because of Quantopian slippage model due to illiquid stocks? What is the best initial capital for this strategy?

Clone Algorithm
8
Loading...
Backtest from to with initial capital
Total Returns
--
Alpha
--
Beta
--
Sharpe
--
Sortino
--
Max Drawdown
--
Benchmark Returns
--
Volatility
--
Returns 1 Month 3 Month 6 Month 12 Month
Alpha 1 Month 3 Month 6 Month 12 Month
Beta 1 Month 3 Month 6 Month 12 Month
Sharpe 1 Month 3 Month 6 Month 12 Month
Sortino 1 Month 3 Month 6 Month 12 Month
Volatility 1 Month 3 Month 6 Month 12 Month
Max Drawdown 1 Month 3 Month 6 Month 12 Month
# Backtest ID: 5822bb22e0a28413b1afdfb2
There was a runtime error.

Probably your starting cash is different is the reason. Both in back testing and live trading sometimes partial orders are executed or spread out at different prices. Timing affects it.

Thanks Charles. I'll give it a shot in my IB paper account. I tried trading your previous algo in my live account, it wasnt profitable during a short period i traded it.

To be clear, I have mostly lost money with my algo so far, every version that I tried.

FWIW The starting cash heavily affecting performance is also the case in K.J. Davey's Building Winning Algorithmic Trading Systems

@Maxim - just to clarify, paper trading illiquid stocks usually does NOT reflect real world results.

@Charles

Do you think the poor results are an issue with the stock selection/price parameters or in the buy/sell/hold timing?

I do think it is the buy/sell/hold timing. Obviously some of the selected stocks do drift ever downward. So the loss from selling those at a loss is offset by the stocks that do reach target or at least do not go into loss territory by the end of the hold time period.

There can be faster buy / sell movement with different buy/sell factor settings, which also end up with smaller total returns in back testing. I think 10 (or 20) trading days is reasonable amount of patience to have to prove whether the larger returns are possible. But a 3 day hold combined with smaller profit target and maybe tweaking one of the other factors might also get reasonable profits for the impatient.

Algos that trade penny stocks or microcaps are hard to model. Said another way... your backtest is lying to you!

The premise of this algo relies on trading penny stocks, but see my first point above.

You need to understand all the risks involved in penny stocks before you start trading an algo like this.

Long time traders know this and would veer away from this type of algo, but new traders usually need to learn the hard way.

What happens when you STOP trading penny stocks in this algo? The backtest below shows the results of this exact same algo, but excluding the trade of stocks below $10.

Clone Algorithm
9
Loading...
Backtest from to with initial capital
Total Returns
--
Alpha
--
Beta
--
Sharpe
--
Sortino
--
Max Drawdown
--
Benchmark Returns
--
Volatility
--
Returns 1 Month 3 Month 6 Month 12 Month
Alpha 1 Month 3 Month 6 Month 12 Month
Beta 1 Month 3 Month 6 Month 12 Month
Sharpe 1 Month 3 Month 6 Month 12 Month
Sortino 1 Month 3 Month 6 Month 12 Month
Volatility 1 Month 3 Month 6 Month 12 Month
Max Drawdown 1 Month 3 Month 6 Month 12 Month
# Backtest ID: 582338b2f4f3d310acab9cb2
There was a runtime error.

i found, deploying my algo which trades vmin, that the backtests were piggybacking on shrewed trades someone else was making. for example, someone would buy 100 shares near a low sale price in the middle of the day, but my algo would place market orders near the beginning of the day. In my case I'd imagine some of those were sells to the market maker so they'd come in at a half percent better price than I'd get.

in many cases i would imagine on low cap stocks you're seeing something similar. If nobody buys, then your algo doesn't buy.

Seems like we'd want a special order type that mimics this behavior. You could probably emulate it by watching every minute for volume and then if a trade hits your predetermined threshold you would then place an order.

I've backtested earlier versions of this algo on stocks between $10 and $100 and had good, if not better, returns. The last few versions have not been as promising.

I agree with Charles' last sentence about the impatient. This is for Robinhood Instant, so the only headache in making a lot of trades is when filling out your taxes. If the pick is going to pop, it's going to be in under a week, maybe the next day, otherwise look to exit. Have a stop loss to prevent bad picks from dropping too far. Long holds just tie up other potential trades.

Dave,
Are you willing to post those that are "promising"

I'd check out the "Throws a Party" thread and the versions around the time I posted a fix for day trades. I spent a lot of time with those. They may need some parameter tweaking, but I thought the backtests were more promising. That's not to say they are ready for live trading.

This has a more efficient buying process and a 3 day buy and hold. The mechanics of the buy and sell is more likely to execute both discounted buys and profit taking sells. All pipeline candidates will be tried. I am live trading this version now. By the way, the version before this did appear to be in the process of working, but I am still technically at a significant loss. I think this version will do even better. For fans of full 1.0 leverage, this version tends to never reach 1.0, though it is technically possible.

To be clear, I am still at significant loss with all versions of my algo that I have live traded. The previous version did however seem to be in process of heading for eventual profit.

Clone Algorithm
941
Loading...
Backtest from to with initial capital
Total Returns
--
Alpha
--
Beta
--
Sharpe
--
Sortino
--
Max Drawdown
--
Benchmark Returns
--
Volatility
--
Returns 1 Month 3 Month 6 Month 12 Month
Alpha 1 Month 3 Month 6 Month 12 Month
Beta 1 Month 3 Month 6 Month 12 Month
Sharpe 1 Month 3 Month 6 Month 12 Month
Sortino 1 Month 3 Month 6 Month 12 Month
Volatility 1 Month 3 Month 6 Month 12 Month
Max Drawdown 1 Month 3 Month 6 Month 12 Month
# Backtest ID: 58269690fe8074107c0e2e3a
There was a runtime error.

I just found out my father died last night in Arizona. I live in Texas. I will be traveling and busy for a couple weeks. I might not respond to any posts for a couple of weeks.

Be strong pal, My condolences.

Don't worry about not responding. All my condolences.

My condolences Charles.

Charles, sorry for your loss.

Charles, sorry for your loss.

I just wanted to share that I started paper trading this on 11/08/2016, which was election day, and it has been making money apparently.

Right now it's at:

5.20%
Returns

$521.89
Dollar P/L

7.85
Sharpe

$2,632.09
Long Exposure

$7,889.80
Available Cash

Richard, bear in mind that a rising tide lifts all boats. So far the markets have been very bullish post-election.

@charles, just wanted to chime in and say my condolences.

Deepest Condolences and praying for you and your family Charles.

My condolences. Take your time, this can wait.

hope you have all strength you need mate to get through this, my condolences

Thank you everybody for the kind words. I am still in Arizona. Funeral is in a few days from now.

Do your own research and make your own decision.
I manually placed a GTC limit sell of TCPI at $1.19.
TCPI has already been held 4 trading days for myself and according to Rh is "not currently listed on an exchange".

Still in Arizona. Funeral is tomorrow.

I found it necessary to double the number of calls to the rebalance function to 4 times per day instead of the current 2 times per day.
The reason is that sometimes orders get rejected mostly because of timing. For those situations, 4 times per day is preferable, and I think makes the algo more efficient.

Keep in mind that right now, the market appears to be very bullish. So perhaps current successes will be noticeably higher than typical results from this algo. I did have to manually sell at a big loss TCPI which delisted, thus wiping out all my profits. If delistings happen frequently enough, then the current version of this algo will never be profitable. If anybody out there would be willing to try live trading with context.MyLeastPrice=6.00 and context.MyMostPrice=20.00 (or somewhere in that range), backtesting for that price range appears to also be profitable and I would guess even less likely to delist.

Happy Thanksgiving!

Clone Algorithm
941
Loading...
Backtest from to with initial capital
Total Returns
--
Alpha
--
Beta
--
Sharpe
--
Sortino
--
Max Drawdown
--
Benchmark Returns
--
Volatility
--
Returns 1 Month 3 Month 6 Month 12 Month
Alpha 1 Month 3 Month 6 Month 12 Month
Beta 1 Month 3 Month 6 Month 12 Month
Sharpe 1 Month 3 Month 6 Month 12 Month
Sortino 1 Month 3 Month 6 Month 12 Month
Volatility 1 Month 3 Month 6 Month 12 Month
Max Drawdown 1 Month 3 Month 6 Month 12 Month
# Backtest ID: 583850990fe9e6632a11cc8d
There was a runtime error.

When I run this algo in live trading (Robinhood), I see that several of the orders are rejected with the following message stating that the security

"is part of the SECs Tick Size Pilot Program. Because of this, you can only place orders in increments of $0.05. Please update to the newest ..."

Is there a simple way to have the algo form orders in five cent increments, or is there a better solution? The truncated message "Please update to the newest ..." doesn't give me much to go on.

I wrote this function to change everything to 5 cent increments: ```

def make_div_by_05(s):  
    s = round(s,2)  
    mystr = str(s)[-1:]  
    if mystr != "0" and mystr != "5":  
        while mystr != "0" and mystr != "5":  
            s += .01  
            mystr = str(s)[-1:]  
    return s  

Hi Joseph Where did you plug the function below at in the program(code) and does it work?

def make_div_by_05(s):
s = round(s,2)
mystr = str(s)[-1:]
if mystr != "0" and mystr != "5":
while mystr != "0" and mystr != "5":
s += .01
mystr = str(s)[-1:]
return s

Just paste the function in there and then reference it when you place an order:

 current_price = data.current(s, "price")  
order(s, shares, style=LimitOrder(make_div_by_05(current_price)))  

Thanks Joseph Everly. Hope you don't mind. I integrated the make_div_by_05 function into the current version.
It will be interesting to see the effect on live trading. Back testing shows the MaxAge drifting higher. Not saying that is a bad thing. Just something I noticed.

Clone Algorithm
941
Loading...
Backtest from to with initial capital
Total Returns
--
Alpha
--
Beta
--
Sharpe
--
Sortino
--
Max Drawdown
--
Benchmark Returns
--
Volatility
--
Returns 1 Month 3 Month 6 Month 12 Month
Alpha 1 Month 3 Month 6 Month 12 Month
Beta 1 Month 3 Month 6 Month 12 Month
Sharpe 1 Month 3 Month 6 Month 12 Month
Sortino 1 Month 3 Month 6 Month 12 Month
Volatility 1 Month 3 Month 6 Month 12 Month
Max Drawdown 1 Month 3 Month 6 Month 12 Month
# Backtest ID: 583e2fa387d0316319c8c235
There was a runtime error.

Wouldn't have shared it if I minded! Hope it helps.

Joseph

EDIT 2017-02-01: See note at the bottom.

One that applies only to those on the SEC list right now. Editing down to the point where it doesn't all make sense yet gives you the idea.

def initialize(context):  
    context.cent_5 = cent_5()

def balance(context, data):  
    c = context  
    cash = c.portfolio.cash  
    for sec in c.portfolio.positions:  
        if not data.can_trade(sec): continue  
        amt = int(c.worst[sec] * cash)  
        prc = cent_set(c, sec, data.current(sec, 'price'), amt)  
        order_target(sec, 0, style=LimitOrder(prc))

def cent_set(c, sec, prc, amt):  
    if sec.symbol not in c.cent_5: return prc  
    elif amt > 0: return .5 * round(float(prc)/.5) + .05  
    elif amt < 0: return .5 * round(float(prc)/.5)  
    else: return prc  

def cent_5():
return ['AAC', 'AAMC', 'AAME', 'AAN', 'AAOI', 'AAON', 'AAPC', 'AAV', 'AAWW', 'AB', 'ABAX', 'ABCB', 'ABCD', 'ABCO', 'ABEO', 'ABG', 'ABIL', 'ABIO', 'ABM', 'ABTL', 'ABTX', 'ABUS', 'ABY', 'AC', 'ACAT', 'ACBI', 'ACCO', 'ACET', ...

EDIT 2017-02-01: This was originally the 500 stocks on the SEC list, however I just noticed at https://www.sec.gov/oiea/investor-alerts-bulletins/ia_ticksize.html they now talk about 1400 stocks, while pointing to NYSE containing a list of over 800 stocks and NASDAQ also with a list of over 800 stocks while the list at http://tsp.finra.org/finra_org/ticksizepilot/TSPilotSecurities.txt now has 2351. And the target is likely to move again.

Charles,

One note on the function I provided - it increases the price of the limit order, which may in some instances keep a sale from happening if the security never reaches that price. It might be a safer bet to make it a little smarter so that it decreases the price to the nearest 5 cent increment when you are wanting to sell and increases the price when you are wanting to buy. There are lots of different ways to do that - let me know if you need any help with it.

Joseph

Joseph,

I took a little different approach to rounding in 5-cent increments. It requires importing math, but in terms of toggling between rounding up/down it may make life a little easier.

Just my 2 (5-)cents.

import math  
def make_div_by_05(s, buy=False):  
    s *= 20  
    s = math.ceil(s) if buy else math.floor(s)  
    s *= .05  
    return s  

Thanks Christopher.

I used a slight variation of your code in this version. I want the buy price to round down and the sell price to round up.

Clone Algorithm
941
Loading...
Backtest from to with initial capital
Total Returns
--
Alpha
--
Beta
--
Sharpe
--
Sortino
--
Max Drawdown
--
Benchmark Returns
--
Volatility
--
Returns 1 Month 3 Month 6 Month 12 Month
Alpha 1 Month 3 Month 6 Month 12 Month
Beta 1 Month 3 Month 6 Month 12 Month
Sharpe 1 Month 3 Month 6 Month 12 Month
Sortino 1 Month 3 Month 6 Month 12 Month
Volatility 1 Month 3 Month 6 Month 12 Month
Max Drawdown 1 Month 3 Month 6 Month 12 Month
# Backtest ID: 58461ff643f1b25e9858662a
There was a runtime error.

The Algo seems to be running well in live trading. The biggest problem that I am having is not being able to exit positions. Sell orders are being rejected due to "Sell may cause PDT designation". I am missing out on the gains to be captured by the algorithm's limit orders. I think that the only way around this is to maintain a $25,000 minimum balance in your Robinhood account.

I feel your pain Mark. I also miss some profit taking because of the day trading limitations.

This version I think is less vulnerable to sudden price drops, because it determines sell limit price based on cost basis instead of current price. It also has a approx month long buy hold for profit, instead of 3 days, before it tries to retreat at a lower sell limit price.

Clone Algorithm
941
Loading...
Backtest from to with initial capital
Total Returns
--
Alpha
--
Beta
--
Sharpe
--
Sortino
--
Max Drawdown
--
Benchmark Returns
--
Volatility
--
Returns 1 Month 3 Month 6 Month 12 Month
Alpha 1 Month 3 Month 6 Month 12 Month
Beta 1 Month 3 Month 6 Month 12 Month
Sharpe 1 Month 3 Month 6 Month 12 Month
Sortino 1 Month 3 Month 6 Month 12 Month
Volatility 1 Month 3 Month 6 Month 12 Month
Max Drawdown 1 Month 3 Month 6 Month 12 Month
# Backtest ID: 5848e46e8440795eba37aa34
There was a runtime error.

Noticed in live trading that the limit buys are making profits but, the limit sells are being placed but, not executed and losing profit. Is it possible we can use a trailing stop with different thresholds or percents to execute the trades on the sell side to capture some or all of the profit. What do you think Charles?

if you backtest with day-trading restriction into the code it loses money over the long run.

I modified the cash "cash=context.portfolio.cash-25000" so that I could add, and maintain, the $25k account minimum required for day trading. It's a crude fix, but does anyone see an issue with this working properly?

Clone Algorithm
10
Loading...
Backtest from to with initial capital
Total Returns
--
Alpha
--
Beta
--
Sharpe
--
Sortino
--
Max Drawdown
--
Benchmark Returns
--
Volatility
--
Returns 1 Month 3 Month 6 Month 12 Month
Alpha 1 Month 3 Month 6 Month 12 Month
Beta 1 Month 3 Month 6 Month 12 Month
Sharpe 1 Month 3 Month 6 Month 12 Month
Sortino 1 Month 3 Month 6 Month 12 Month
Volatility 1 Month 3 Month 6 Month 12 Month
Max Drawdown 1 Month 3 Month 6 Month 12 Month
# Backtest ID: 5849ddec51aa035e9aba05e5
There was a runtime error.

Mark,
I looked over your code. It looks like it will work the way you described it. I don't think it is crude, just effective.

Bo,
Entirely possible. Not sure what the results would be. I haven't tried it yet. I don't think anybody has tried it with my algos yet. I do however, think that low volume stocks make configuring that strategy more difficult and the results less predictable. But it would be interesting to see the live trading results if somebody were to try it.

This one scratches some personal itches.
$1000 minimum order, one order at a time, changing every 15 minutes, up to 25 orders per day

Sometimes Quantopian connection to Robinhood breaks, why, I don't know. So when I go and start the algo again this just keeps on running because it does one order per 15 minutes. Also trying to avoid the tiny positions. Can't be avoided if partial fill though.

Clone Algorithm
941
Loading...
Backtest from to with initial capital
Total Returns
--
Alpha
--
Beta
--
Sharpe
--
Sortino
--
Max Drawdown
--
Benchmark Returns
--
Volatility
--
Returns 1 Month 3 Month 6 Month 12 Month
Alpha 1 Month 3 Month 6 Month 12 Month
Beta 1 Month 3 Month 6 Month 12 Month
Sharpe 1 Month 3 Month 6 Month 12 Month
Sortino 1 Month 3 Month 6 Month 12 Month
Volatility 1 Month 3 Month 6 Month 12 Month
Max Drawdown 1 Month 3 Month 6 Month 12 Month
# Backtest ID: 584cc7e7cc1ef364b02b73c1
There was a runtime error.

Oops, forgot the 5 cent thing in the buy orders.
Added back in:
BuyPrice = float(make_div_by_05(BuyPrice, buy=True))

Clone Algorithm
941
Loading...
Backtest from to with initial capital
Total Returns
--
Alpha
--
Beta
--
Sharpe
--
Sortino
--
Max Drawdown
--
Benchmark Returns
--
Volatility
--
Returns 1 Month 3 Month 6 Month 12 Month
Alpha 1 Month 3 Month 6 Month 12 Month
Beta 1 Month 3 Month 6 Month 12 Month
Sharpe 1 Month 3 Month 6 Month 12 Month
Sortino 1 Month 3 Month 6 Month 12 Month
Volatility 1 Month 3 Month 6 Month 12 Month
Max Drawdown 1 Month 3 Month 6 Month 12 Month
# Backtest ID: 584ed37ad3e8ab62a254145e
There was a runtime error.

What value do you see in putting orders in every 15 minutes? The behavior I noticed in live-trading is that the orders were getting canceled and getting put in again. But the problem with this is that the algo puts in orders for a certain discount price threshold, and if the price drops to that point it purchases. If you are constantly putting new orders every 15 minutes, the entry point changes every 15 minutes. I noticed that I was doing actually better when the order was put in once at market start, and when more money becomes available to spend (after a sell order usually) the algorithm then puts in new orders. Maybe it was luck (thanks to the election and the market becoming crazy bullish), but I had made 8% gains in live trading with this version of the algo. Unfortunately, stupid me forgot which version of the algorithm I deployed before trying out the newer ones. But yeah this is just my observation, and I would like some thoughts on it. Thanks and I hope you are ok Charles!

This is just an experiment that caters to my personal preferences. Remains to be seen if it will be profitable. Mostly my algo (every version) has not been profitable for me. The last several versions seem to be getting alot closer to that goal, but still not proven consistently profitable for myself. I am encouraged that some people seem to be having some degree of success, even if short lived with my algo.

By the way, good idea to make a personal backup copy of versions that seem to be close to successful for ya. Make sure you rename the copy to let you know how much you do or do not prefer it, so you can return to it, if for whatever reason you do not like the most current version.

I think that my algo is gradually getting easier to customize for anybody that wishes to do things differently.

In case it is helpful to anyone, maybe this tidbit will help:
You can manually buy or sell stocks. If you want the algo to leave it alone, then place a GTC order on that particular position. The algo (more accurately, Quantopian and / or Robinhood) will not cancel manually placed orders and new orders for that position will be rejected because of "not enough shares".

The one order per 15 minutes with $1,000 minimum will tend to have fewer and larger positions. That has advantages and disadvantages. Of course, partial fill orders work contrary to that goal. The variables (mostly in the "initalize" section) can be customized to your personal preferences.

I'm using the 12-10 version of this algo for paper trading this week and it appears to being doing well. Its maintained 4.6%-5.2% returns this week so far. I am interested to see how it performs with the rate hike, I may start live trading it based on the performance.

Keep in mind that it appears that live trading tends to be worse results (than backtests and paper trading) for low volume stocks. I am just saying that so you are aware of the increased risk.

Ok, I know this version will be distasteful to some or many of you. It tends to have ultra low leverage and much fewer transactions. One possible upside of that is the day trades will all probably execute without reaching the pattern day trading limit.

Clone Algorithm
941
Loading...
Backtest from to with initial capital
Total Returns
--
Alpha
--
Beta
--
Sharpe
--
Sortino
--
Max Drawdown
--
Benchmark Returns
--
Volatility
--
Returns 1 Month 3 Month 6 Month 12 Month
Alpha 1 Month 3 Month 6 Month 12 Month
Beta 1 Month 3 Month 6 Month 12 Month
Sharpe 1 Month 3 Month 6 Month 12 Month
Sortino 1 Month 3 Month 6 Month 12 Month
Volatility 1 Month 3 Month 6 Month 12 Month
Max Drawdown 1 Month 3 Month 6 Month 12 Month
# Backtest ID: 5859a57e1b507d5e9a6cdea9
There was a runtime error.

Limit orders on low price stocks are great for making paper money, but in practice you only get filled when you are wrong.

e.g. trade on SBOT from 9/1/16 to 9/2/16 (first trade I looked at)

Your entry might have worked but on the exit, you are getting out at 2.70 on 9/2. That price only printed once the whole day, on a trade of 500 shares.

Best of Luck!

Changed the above algo hi and low price range and the algo is in live trading but, has has not entered an order in two weeks including today. Any suggestions or reasons why it is not placing any orders?

thanks

Look for the following line in the code:
if 1000 <= StockShares*BuyPrice:

If your portfolio is less than 3000, then you may want to lower that number or else it will never execute a buy order.

Ok, this probably has problems, but I think it is an improvement.
I added code from https://www.quantopian.com/posts/simulation-of-non-marketable-limit-orders .
Thanks to Luca https://www.quantopian.com/users/54460194d718f327fd000380 .
At least it appears to have more realistic returns from limit orders.

Clone Algorithm
95
Loading...
Backtest from to with initial capital
Total Returns
--
Alpha
--
Beta
--
Sharpe
--
Sortino
--
Max Drawdown
--
Benchmark Returns
--
Volatility
--
Returns 1 Month 3 Month 6 Month 12 Month
Alpha 1 Month 3 Month 6 Month 12 Month
Beta 1 Month 3 Month 6 Month 12 Month
Sharpe 1 Month 3 Month 6 Month 12 Month
Sortino 1 Month 3 Month 6 Month 12 Month
Volatility 1 Month 3 Month 6 Month 12 Month
Max Drawdown 1 Month 3 Month 6 Month 12 Month
# Backtest ID: 586f6f9c8a9e3c62322157d8
There was a runtime error.

@Charles I wonder if we can correctly model slippage on low volume stocks at all. If you could share with us a comparison of the two slippage models (default and the new one) against live trading results I would really appreciate it. That, of course, once you have collected enough live trading data.

I changed the code here and am testing it:
if remaining_volume < 1:
# we can't fill any more transactions
return None, None
#raise LiquidityExceeded()

That "raise LiquidityExceeded()" seems to occasionally halt the algo.

yeah, I did the same. I erroneously re-defined LiquidityExceeded class but that is originally defined in zipline.finance.slippage.py, as Q restricts what we can import in our algorithms we cannot use that one.

Hi Charles, just wanted to share with you the performance of one of your algos. On December 1st, I put the one from Nov 30th on Q paper trade. Except from 2 weeks in December, the earnings are consistent. This is the performance until now:
Return 12,5%
Alpha 0,86
Beta 0,92
Sharpe 6,1
Vol 0,02

It looks quite ok to me. What do you think? I will now stop it and try some adjustments.

BTW, thanks for sharing your findings. Just wonderful!

I found a post somewhere around here where someone did a study about how much % volume they were able to execute in their real trades and they came up with a value around 2.5%

set_slippage(slippage.VolumeShareSlippage(volume_limit=.025, price_impact=0.0))

This doesn't behave appropriately when stocks are lower priced or if you remove the minimum price.

Also, how would one go about logging securities_to_trade with their associate weight

"Where would I tell this thing to only use X amount of my portfolio (percentage, not dollar amount) - I want to launch it in live trading but only want to allocate a small portion of my account to test the waters with it's execution. And which version is best for accounts not needing to worry about PDT?"

Maybe adjust from:
def my_rebalance(context, data):
cash=context.portfolio.cash
PValue=context.portfolio.portfolio_value
to:
def my_rebalance(context, data):
cash=context.portfolio.cash * 0.20
PValue=context.portfolio.portfolio_value * 0.20

I prefer the latest version because I think it has the highest probability of reaching the 1% target profit in live trading. But others have apparently had some success with some previous versions. Keep in mind the latest version (without modification) requires approx. $3,100 of portfolio value to issue any buy orders, ... because of the 33% and $1,000 limits. So with the above adjusted code, you would need the 20% of portfolio value to be approx 3100 or more and the 20% of cash to be 1000 or more in order for any buy orders to be placed.

Thanks for the reply Charles. I had deleted my original post because soon after posting it, I found the answer to my question just digging through the code and not being lazy. My change was more simple than what you proposed though, all I did was multiply context.portfolio.cash by .01 - everything fired off great today, entered and exited trades as expected and frankly performed fairly well. I'll keep going at this minuscule size to get a feel for it, and ramp up accordingly. I'll report back here with live results as they become substantial/valuable enough to do so.

Has anyone live traded this algo on robinhood. I am curious how live trading compares to paper trading and backtests.

I have, it's not the same as the backtest due to liquidity/volume and PDT rules hindering it.

Just wondering, is anyone making real money with this algo? Thank you!

As previously discussed, the live trade results are not likely to be as good as the back test. You may even lose money.

Clone Algorithm
941
Loading...
Backtest from to with initial capital
Total Returns
--
Alpha
--
Beta
--
Sharpe
--
Sortino
--
Max Drawdown
--
Benchmark Returns
--
Volatility
--
Returns 1 Month 3 Month 6 Month 12 Month
Alpha 1 Month 3 Month 6 Month 12 Month
Beta 1 Month 3 Month 6 Month 12 Month
Sharpe 1 Month 3 Month 6 Month 12 Month
Sortino 1 Month 3 Month 6 Month 12 Month
Volatility 1 Month 3 Month 6 Month 12 Month
Max Drawdown 1 Month 3 Month 6 Month 12 Month
# Backtest ID: 5898b12ab2b03961ed728cdd
There was a runtime error.

What is the best way to increase the leverage of this Algorithm? I'm planning on increasing order price to reduce the amount of volatile stocks purchases. I'm using Robinhood Gold and would like to use at least a portion of my margin. Also, Is this an advisable plan?

I tried paper trading with a version of this algo, but found a difference between the backtest and the live trading.
With the following:
MaxCandidates = 20
MaxBuyOrdersAtOnce = 2
EveryThisManyMinutes = 9

The backtested algo ran through the candidates 2 at a time as expected before starting over at the first candidate again.
In the Live Trading version the algo ran through the list once and stopped.

??

I bought the "Trade Like Chuck" book for $10 from the recent commercials. This is my first version attempting to implement some of the ideas. There are some things about this version which, at first glance, seem better than previous versions. As always, approach carefully. I think you will prefer this version. There is still great risk of losing money. Be careful.

Clone Algorithm
474
Loading...
Backtest from to with initial capital
Total Returns
--
Alpha
--
Beta
--
Sharpe
--
Sortino
--
Max Drawdown
--
Benchmark Returns
--
Volatility
--
Returns 1 Month 3 Month 6 Month 12 Month
Alpha 1 Month 3 Month 6 Month 12 Month
Beta 1 Month 3 Month 6 Month 12 Month
Sharpe 1 Month 3 Month 6 Month 12 Month
Sortino 1 Month 3 Month 6 Month 12 Month
Volatility 1 Month 3 Month 6 Month 12 Month
Max Drawdown 1 Month 3 Month 6 Month 12 Month
# Backtest ID: 589b61f5813bce61ed6142fb
There was a runtime error.

I also use Robinhood Gold. However, so far, I have not been able to get the algo to go beyond 1.0 leverage in Robinhood. You can always do some manual trades of course.

Welcome back. The algorithm seems to not work with lower capitals. I will take a look at the code and see what is going on first.

Clone Algorithm
0
Loading...
Backtest from to with initial capital
Total Returns
--
Alpha
--
Beta
--
Sharpe
--
Sortino
--
Max Drawdown
--
Benchmark Returns
--
Volatility
--
Returns 1 Month 3 Month 6 Month 12 Month
Alpha 1 Month 3 Month 6 Month 12 Month
Beta 1 Month 3 Month 6 Month 12 Month
Sharpe 1 Month 3 Month 6 Month 12 Month
Sortino 1 Month 3 Month 6 Month 12 Month
Volatility 1 Month 3 Month 6 Month 12 Month
Max Drawdown 1 Month 3 Month 6 Month 12 Month
# Backtest ID: 589b6c3b415f175df1d058e9
There was a runtime error.

Probably getting filled faster - due to slippage.

I guess it was a perfect storm for that date range and the default parameters. If you change the parameters to:

context.MyLeastPrice=5.00  
context.MyMostPrice=10.00  
context.MyMinPurchase=250  
context.MyMaxPurchase=500  
context.BuyFactor=0.97  
Clone Algorithm
474
Loading...
Backtest from to with initial capital
Total Returns
--
Alpha
--
Beta
--
Sharpe
--
Sortino
--
Max Drawdown
--
Benchmark Returns
--
Volatility
--
Returns 1 Month 3 Month 6 Month 12 Month
Alpha 1 Month 3 Month 6 Month 12 Month
Beta 1 Month 3 Month 6 Month 12 Month
Sharpe 1 Month 3 Month 6 Month 12 Month
Sortino 1 Month 3 Month 6 Month 12 Month
Volatility 1 Month 3 Month 6 Month 12 Month
Max Drawdown 1 Month 3 Month 6 Month 12 Month
# Backtest ID: 589b844c5a627a61fca16d3c
There was a runtime error.

How did you come up with numbers? If they are not arbitrary, perhaps we could come up with an algorithm based on data to dynamically come up with the parameters?

Arbitrary based on personal preference and test results.
I think I like the following at the moment:

context.MyLeastPrice=5.00  
context.MyMostPrice=25.00  
context.MyMinPurchase=250  
context.MyMaxPurchase=750  
context.BuyFactor=0.99

However, started live trading today with:

context.MaxCandidates=390 #6.5*60  
context.EveryThisManyMinutes=15  
context.MaxBuyOrdersAtOnce=context.EveryThisManyMinutes  
context.MyLeastPrice=2.00  
context.MyMostPrice=5.00  
context.MyMinPurchase=1000  
context.MyMaxPurchase=5000  
context.BuyFactor=.94

Live trading patterns are looking good.
I think I will use some Robinhood Gold to purchase one of the stocks that didn't reach the 6% discount. I will use the cash that is left that does not meet the $1,000 minimum purchase. This purchase will have to be manually placed because I have not figured out how to get the algo to use the Robinhood Gold. It can only use available cash.

By the way, if you have positions that you do not want the algo to decide when to sell it, then manually place a GTC limit sell. That will cause all algo orders to sell that position to be rejected.

I changed it to:

context.MaxCandidates=390 #6.5*60  
context.EveryThisManyMinutes=15  
context.MaxBuyOrdersAtOnce=context.EveryThisManyMinutes  
context.MyLeastPrice=2.00  
context.MyMostPrice=5.00  
context.MyMinPurchase=50  
context.MyMaxPurchase=100  
context.BuyFactor=.99

I'm making weekly auto deposits of at least $50.

Clone Algorithm
474
Loading...
Backtest from to with initial capital
Total Returns
--
Alpha
--
Beta
--
Sharpe
--
Sortino
--
Max Drawdown
--
Benchmark Returns
--
Volatility
--
Returns 1 Month 3 Month 6 Month 12 Month
Alpha 1 Month 3 Month 6 Month 12 Month
Beta 1 Month 3 Month 6 Month 12 Month
Sharpe 1 Month 3 Month 6 Month 12 Month
Sortino 1 Month 3 Month 6 Month 12 Month
Volatility 1 Month 3 Month 6 Month 12 Month
Max Drawdown 1 Month 3 Month 6 Month 12 Month
# Backtest ID: 589e145db74994615e2ffb60
There was a runtime error.

Charles, is there any way to reduce downside risk without giving up too much to the upside? Seeing as we cannot short in robinhood, perhaps some code that would increase the cash position, volatility or inverse ETFS when holding stocks is less favorable?

I used some favorite ETFs and also picked some from http://etfdb.com/type/alternatives/all/#etfs__overview&sort_name=ytd_percent_return&sort_order=desc&page=1

I think this algo has a reasonable chance of short term profit and a higher chance of long term profit. Of course, as always, you may lose your money, so be careful.

I am trading this version live starting a few minutes ago.

Clone Algorithm
474
Loading...
Backtest from to with initial capital
Total Returns
--
Alpha
--
Beta
--
Sharpe
--
Sortino
--
Max Drawdown
--
Benchmark Returns
--
Volatility
--
Returns 1 Month 3 Month 6 Month 12 Month
Alpha 1 Month 3 Month 6 Month 12 Month
Beta 1 Month 3 Month 6 Month 12 Month
Sharpe 1 Month 3 Month 6 Month 12 Month
Sortino 1 Month 3 Month 6 Month 12 Month
Volatility 1 Month 3 Month 6 Month 12 Month
Max Drawdown 1 Month 3 Month 6 Month 12 Month
# Backtest ID: 58a3372bc1f16561d21e3e31
There was a runtime error.

I am live trading this version as of a few minutes ago.

Clone Algorithm
474
Loading...
Backtest from to with initial capital
Total Returns
--
Alpha
--
Beta
--
Sharpe
--
Sortino
--
Max Drawdown
--
Benchmark Returns
--
Volatility
--
Returns 1 Month 3 Month 6 Month 12 Month
Alpha 1 Month 3 Month 6 Month 12 Month
Beta 1 Month 3 Month 6 Month 12 Month
Sharpe 1 Month 3 Month 6 Month 12 Month
Sortino 1 Month 3 Month 6 Month 12 Month
Volatility 1 Month 3 Month 6 Month 12 Month
Max Drawdown 1 Month 3 Month 6 Month 12 Month
# Backtest ID: 58a5d10f5c4ce9619b8ad464
There was a runtime error.

REN Resolute Energy Corp had something like 1500% return during this time period. That accounts for significant portion of the returns.

Cleaned up the code. Perfect storm can definitely lose a lot of money. Be careful.
The purchase is daily recalculated from the current portfolio value.
Trim is turned off by default. If you want additional churn for buying opportunities, then maybe you should turn it on.
I found a logic error that prevented exits. That is now fixed.
Attempting to use:
10 month compared to 1 month
100 days compared to 50 days
Keltner high for sells
Keltner low for buys

Test and adapt to your own preferences and situation. I repeat, a perfect storm of conditions may lose you a lot of money. Be careful.

Clone Algorithm
474
Loading...
Backtest from to with initial capital
Total Returns
--
Alpha
--
Beta
--
Sharpe
--
Sortino
--
Max Drawdown
--
Benchmark Returns
--
Volatility
--
Returns 1 Month 3 Month 6 Month 12 Month
Alpha 1 Month 3 Month 6 Month 12 Month
Beta 1 Month 3 Month 6 Month 12 Month
Sharpe 1 Month 3 Month 6 Month 12 Month
Sortino 1 Month 3 Month 6 Month 12 Month
Volatility 1 Month 3 Month 6 Month 12 Month
Max Drawdown 1 Month 3 Month 6 Month 12 Month
# Backtest ID: 58b3c36c1be8625e55f06c26
There was a runtime error.

Hi Charles,

I haven't read all of this thread. I've skimmed a couple of your posted algos and have been playing around with a few of my own.

Based on your experience live trading, do you have any ideas on exactly what the differences are in simulating algos on past markets, versus real-time live trading on Robinhood? I'm fairly new on Quantopian and have found myself asking critical questions like: how fast do Quantopian algos interact with Robinhood trading? How quickly after I pull the current price can I successfully trade? If I have $25,000 in a Robinhood account (at all times), then how quickly can I buy and sell?

I realize these are basic and general questions, but I've read and searched and haven't been able to find solid answers. If you have found the answers I would greatly appreciate you answering them for me and everyone else here, or pointing us in the right direction.

Thanks and good luck!

For the most part, the trades in Robinhood appear to go smoothly and relatively fast. I expect that execution with IB Interactive Brokers is faster / better for a variety of reasons. I do curiously see somewhat rare market order sell transactions unexpectedly not happen quickly. That may be totally legit though. Just saying I noticed it. You are generally more likely to quickly fill your order with the more liquid high volume stocks / ETFs. Low volume stocks / ETFs are difficult to model and are also generally slower to fill your orders and also with bigger bid / ask spreads, so be aware of that. Also be careful, a stock / ETF can experience near vertical drop in price occasionally.

Just posting mostly for my future reference. It uses exclusively some volatility VIX related ETFs.
I am planning on integrating, to some undetermined degree, one of the algos at https://www.quantopian.com/posts/trade-xiv-based-on-vix-1
Of course, perfect storm, you lose a lot of money.
Those ETFs drop nearly vertically under certain conditions. Be careful and at least try to understand the risks before putting significant money to it.
Anthony Garner seems to give good opinion on this stuff.

Edit: I decided to go ahead and live trade this since I was already 100% in one of these ETFs already anyways.

Clone Algorithm
474
Loading...
Backtest from to with initial capital
Total Returns
--
Alpha
--
Beta
--
Sharpe
--
Sortino
--
Max Drawdown
--
Benchmark Returns
--
Volatility
--
Returns 1 Month 3 Month 6 Month 12 Month
Alpha 1 Month 3 Month 6 Month 12 Month
Beta 1 Month 3 Month 6 Month 12 Month
Sharpe 1 Month 3 Month 6 Month 12 Month
Sortino 1 Month 3 Month 6 Month 12 Month
Volatility 1 Month 3 Month 6 Month 12 Month
Max Drawdown 1 Month 3 Month 6 Month 12 Month
# Backtest ID: 58b77877093be65e3863ae4e
There was a runtime error.

Thank you Charles

Oh, that's good to hear Eric, thanks!

Ok, 99% not my code folks. So credit is due to James Wang https://www.quantopian.com/posts/trade-xiv-based-on-vix-1
I made it Robinhood ready.
Be very careful. You may lose lots of money.
I will probably be tweaking this later.
But it seems quite good out of the box.

Clone Algorithm
474
Loading...
Backtest from to with initial capital
Total Returns
--
Alpha
--
Beta
--
Sharpe
--
Sortino
--
Max Drawdown
--
Benchmark Returns
--
Volatility
--
Returns 1 Month 3 Month 6 Month 12 Month
Alpha 1 Month 3 Month 6 Month 12 Month
Beta 1 Month 3 Month 6 Month 12 Month
Sharpe 1 Month 3 Month 6 Month 12 Month
Sortino 1 Month 3 Month 6 Month 12 Month
Volatility 1 Month 3 Month 6 Month 12 Month
Max Drawdown 1 Month 3 Month 6 Month 12 Month
# Backtest ID: 58b81d1a7bfc9961f01e97e8
There was a runtime error.

Just read through the entire thread. Very well done on your part Charles and thank you for posting all of the steps along the way. Really interesting for a beginner like myself to read through!

Nothing really new here.
I just added Signal to the graph strictly for watching algo decisions. However, strictly not necessary, since purchases / sells are infrequent, so that could be watched instead.
I am trading this live. I did not start until after the UVXY buy signal, 2 or 3 days later. So I manually bought UVXY.
Can it be said often enough? Do not follow me off the cliff folks. If you are going to jump, do your own research and make your own decision.

Clone Algorithm
474
Loading...
Backtest from to with initial capital
Total Returns
--
Alpha
--
Beta
--
Sharpe
--
Sortino
--
Max Drawdown
--
Benchmark Returns
--
Volatility
--
Returns 1 Month 3 Month 6 Month 12 Month
Alpha 1 Month 3 Month 6 Month 12 Month
Beta 1 Month 3 Month 6 Month 12 Month
Sharpe 1 Month 3 Month 6 Month 12 Month
Sortino 1 Month 3 Month 6 Month 12 Month
Volatility 1 Month 3 Month 6 Month 12 Month
Max Drawdown 1 Month 3 Month 6 Month 12 Month
# Backtest ID: 58b998114df7e35e4d59eb4d
There was a runtime error.

Posting this because it seems useful because it can be adjusted to your risk tolerance.
In this example, context.SetAsideLeverage = 0.75 which means 75% of your portfolio goes to the "less risky" route.
context.SetAsideStock = sid(22010) # SPY Value can also be changed to your preference.

Clone Algorithm
474
Loading...
Backtest from to with initial capital
Total Returns
--
Alpha
--
Beta
--
Sharpe
--
Sortino
--
Max Drawdown
--
Benchmark Returns
--
Volatility
--
Returns 1 Month 3 Month 6 Month 12 Month
Alpha 1 Month 3 Month 6 Month 12 Month
Beta 1 Month 3 Month 6 Month 12 Month
Sharpe 1 Month 3 Month 6 Month 12 Month
Sortino 1 Month 3 Month 6 Month 12 Month
Volatility 1 Month 3 Month 6 Month 12 Month
Max Drawdown 1 Month 3 Month 6 Month 12 Month
# Backtest ID: 58bb1dad8fa43862bf8256c5
There was a runtime error.

Hi Charles,

I see that you are interested in VIX algorithms. Here is one that I think would be fantastic if improved. Currently the data is brought in from cboe but it can be pulled internally using pipeline. Pipeline would be much more reliable. https://www.quantopian.com/posts/which-algorithms-did-well-during-the-aug-2015-correction#57c9b5799cef2b197f00008d

This backtest is not fantastic but by changing the zscore values and using pipeline to import data this algo can be greatly improved.

Clone Algorithm
26
Loading...
Backtest from to with initial capital
Total Returns
--
Alpha
--
Beta
--
Sharpe
--
Sortino
--
Max Drawdown
--
Benchmark Returns
--
Volatility
--
Returns 1 Month 3 Month 6 Month 12 Month
Alpha 1 Month 3 Month 6 Month 12 Month
Beta 1 Month 3 Month 6 Month 12 Month
Sharpe 1 Month 3 Month 6 Month 12 Month
Sortino 1 Month 3 Month 6 Month 12 Month
Volatility 1 Month 3 Month 6 Month 12 Month
Max Drawdown 1 Month 3 Month 6 Month 12 Month
# Backtest ID: 58bc33961d91435e458e7f0d
There was a runtime error.

My attempt to use Pipeline in Nick's algo above went bad... Can someone tell where the problem is?

Clone Algorithm
2
Loading...
Backtest from to with initial capital
Total Returns
--
Alpha
--
Beta
--
Sharpe
--
Sortino
--
Max Drawdown
--
Benchmark Returns
--
Volatility
--
Returns 1 Month 3 Month 6 Month 12 Month
Alpha 1 Month 3 Month 6 Month 12 Month
Beta 1 Month 3 Month 6 Month 12 Month
Sharpe 1 Month 3 Month 6 Month 12 Month
Sortino 1 Month 3 Month 6 Month 12 Month
Volatility 1 Month 3 Month 6 Month 12 Month
Max Drawdown 1 Month 3 Month 6 Month 12 Month
# Backtest ID: 58bca9c4f3f5ae5e2e84132b
There was a runtime error.

Pipelined version returns "Line 109: data[sid(N)] is deprecated. Use data.current."

Posting this, some of you might like it considering it is 75% in real businesses.
Edit: I just now noticed that CURE is 3X leveraged though. Still an interesting combination.

Clone Algorithm
474
Loading...
Backtest from to with initial capital
Total Returns
--
Alpha
--
Beta
--
Sharpe
--
Sortino
--
Max Drawdown
--
Benchmark Returns
--
Volatility
--
Returns 1 Month 3 Month 6 Month 12 Month
Alpha 1 Month 3 Month 6 Month 12 Month
Beta 1 Month 3 Month 6 Month 12 Month
Sharpe 1 Month 3 Month 6 Month 12 Month
Sortino 1 Month 3 Month 6 Month 12 Month
Volatility 1 Month 3 Month 6 Month 12 Month
Max Drawdown 1 Month 3 Month 6 Month 12 Month
# Backtest ID: 58bcd610757be65e25b7fad4
There was a runtime error.

34,178 margin, 67,178 total. Here's a simple way to keep an eye on any margin.

def initialize(context):  
    context.cash_low = context.portfolio.starting_cash

def handle_data(context, data):  
    if context.portfolio.cash < context.cash_low:  
        context.cash_low = context.portfolio.cash  
        record(CashLow = context.cash_low)  

I opted to use an etf that tracks the S&P 500 as my set aside stock. I am live trading this algo @ 90% set a side leverage. I will give it more as I see it progress successfully.

Clone Algorithm
42
Loading...
Backtest from to with initial capital
Total Returns
--
Alpha
--
Beta
--
Sharpe
--
Sortino
--
Max Drawdown
--
Benchmark Returns
--
Volatility
--
Returns 1 Month 3 Month 6 Month 12 Month
Alpha 1 Month 3 Month 6 Month 12 Month
Beta 1 Month 3 Month 6 Month 12 Month
Sharpe 1 Month 3 Month 6 Month 12 Month
Sortino 1 Month 3 Month 6 Month 12 Month
Volatility 1 Month 3 Month 6 Month 12 Month
Max Drawdown 1 Month 3 Month 6 Month 12 Month
# Backtest ID: 58bd8737e18cfb4425a12f04
There was a runtime error.

Ok, I added basket of set aside stocks. The weight of the stocks that do exist early in the back test uses the leftover weight not used by stocks that do not exist early on in the test. When the stock does exist later on in the test, it uses the expected weight.

Clone Algorithm
474
Loading...
Backtest from to with initial capital
Total Returns
--
Alpha
--
Beta
--
Sharpe
--
Sortino
--
Max Drawdown
--
Benchmark Returns
--
Volatility
--
Returns 1 Month 3 Month 6 Month 12 Month
Alpha 1 Month 3 Month 6 Month 12 Month
Beta 1 Month 3 Month 6 Month 12 Month
Sharpe 1 Month 3 Month 6 Month 12 Month
Sortino 1 Month 3 Month 6 Month 12 Month
Volatility 1 Month 3 Month 6 Month 12 Month
Max Drawdown 1 Month 3 Month 6 Month 12 Month
# Backtest ID: 58be5a8f1379fe61cf1cb57a
There was a runtime error.

I removed the "Never buy into UVXY first" safeguard. If you liked that behavior, you can add it back in or use an older version.

Clone Algorithm
474
Loading...
Backtest from to with initial capital
Total Returns
--
Alpha
--
Beta
--
Sharpe
--
Sortino
--
Max Drawdown
--
Benchmark Returns
--
Volatility
--
Returns 1 Month 3 Month 6 Month 12 Month
Alpha 1 Month 3 Month 6 Month 12 Month
Beta 1 Month 3 Month 6 Month 12 Month
Sharpe 1 Month 3 Month 6 Month 12 Month
Sortino 1 Month 3 Month 6 Month 12 Month
Volatility 1 Month 3 Month 6 Month 12 Month
Max Drawdown 1 Month 3 Month 6 Month 12 Month
# Backtest ID: 58bf6a23ed088c5e3dcddd10
There was a runtime error.

Charles, could you also share live trading results as you go and reference the algorithm you are running? I'm paper trading with some of my own tweaks but it'll be good to look at actual results produced trading these versions live. Thanks for your efforts to help the community.

Because the current version of this algorithm has changed focus to mostly VIX related investing which is quite different from my earlier versions of this algo, I am starting a new thread Robin Hood VIX Mix.
https://www.quantopian.com/posts/robin-hood-vix-mix

I was taking a look that code and after a few weeks decided to live trade it today on Robinhood. I was disappointed when it returned an error in the first minutes of trading. It attempted to place an order for HEBT which is an American Depository Receipt (ADR). The company was listed on Robinhood but buying it was disabled. Looking back at the code, I noticed that it filters out ADRs.

So my question is, why did it proceed to order shares of HEBT and is there any way to filter out the stocks that cannot be traded on Robinhood?
Thank you

I should've done more research, but I found that Robinhood does not support most Foreign domiciled securities. So I filtered out companies headquartered outside of the United States. Hopefully that fixed the problem

I personally did not profit, not consistently anyways, from this and earlier versions of this algo. I did get the impression however that some people did have some success with them. If you do experience some amount of consistent success, please let us know. I currently am focused on Robin Hood VIX Mix which focuses on VIX related ETFs mostly. This and earlier versions focuses mostly on micro-cap low-volume stocks which are difficult to accurately model in back testing. Live trading seems to be the only accurate testing. Anyways, I haven't looked at the code in quite a few months. But I do wish you best. Again, if you do experience consistent profits, please explain any tweaks that you made. Cheers!

If you do experience some amount of consistent success, please let us know.

Starting with not much more than I might have in my wallet, being cautious, up over 100% since December, it is a very early version of your code with various changes including in pipe though no changes are too dramatic. Have not been able to find a date range that doesn't rocket upward. Some start dates with the early CW version it is based on do run downward in backtesting. My point is, great potential. Lately, flat and only in three stocks today, many orders are made and not filled with the limit not met, that's fine. Hope you are rewarded. If real does anything like backtesting, the check will be in the mail so you can know with certainty I appreciate your willingness to share your work.

Thanks Blue. I suspect that I kept losing money, at least in some more obvious cases, because of emotional decisions and / or bad timing of stop / start of algo with "improvements".

Blue, could you post a backtest of the algo you are trading live? I'm sure Charles and everyone else who has been trying variations of his work would appreciate a glimmer of hope :)

If others run my code, even starting at different times, there's a chance that orders could be the same and the one executed first would reduce performance of the other. I am eager to be altruistic when I have lots of money so if anyone is already there and would like to help me move in that direction and share some of the wealth in exchange for my code, they can click my name and maybe a deal could be possible where I would then change my code to reduce collisions.

@Charles, I am using the stratagy you posted on Feb, 6 in paper trading, Why there are so many orders can not be filled and be cancelled eventually?