Back to Community
Mean Reversion for The Little Guy

Hi guys,

Here's a slight modification of the mean reversion from the quantopian examples. I added a feature to eliminate leverage etf's, and
a variable to limit the number of positions long and short (context.separate_positions) . I was curious to see the difference it would make to have no commission fees, but still allowing the normal settings for slippage on very small accounts. In this case I used $6000 in the account. With normal IB fees the thing loses a small fortune, as the position sizes are miniscule and even IB's low fee structure become prohibitive.

I'm a registered investment advisor who has been trading for my larger accounts, but deploys only no load funds and low cost etf's for a handful of small accounts I have under 50k . I would love to be able to use more active strategies, as my larger accounts outperform those balanced portfolios.

Before going with Robinhood, I'd like to know any problems/issues others have had with this relatively new organization. Anyone found any very active user groups around Robinhood that I could peruse?


Clone Algorithm
Backtest from to with initial capital
Total Returns
Max Drawdown
Benchmark Returns
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: 5668d2babf8243115ecb4b66
There was a runtime error.
9 responses

Serge - this is a great little algo, I love it!
Assuming the commissions are zero - as you have stated would be necessary to make this feasible for smaller accounts - I still question whether it would be profitable.
The CAGR on this is quite low - 9% or so. Since the algo short sells, you will be charged interest - possibly wiping out all gains. Of course this would be a bigger problem when interest rates are higher.

At this point in time Robinhood does not allow shorting, so the system wouldn't be viable on there.

Also, the little guy would need to have a margin account to short sell - so the minimum account size would have to be $25k. Let's call it $35k to account for drawdown. Now the little guy is not so little.

Mohammad, can you explain why interest would be charged on the short sells? My understanding is that if the leverage is below 1, meaning that even if short positions go the wrong way, the portfolio is adjusted to maintain no/little leverage, then there should be no reason for the broker to charge interest to the short seller... Am I missing something?

When you borrow for margin, you usually pay something like base rate + 50 or 100 basis points (or something similar) - which is quite reasonable. In fact its lower than most mortgages.

However when you go short, you pay interest for the shares you borrow (to sell) - this is usually high interest; it varies based on the stock you are borrowing and your broker, but it is not uncommon for it to be 7% or 10% or even higher.

If your CAGR is only 9%, you can easily wipe it all out just by paying interest on your shorts.

Hi Mohammad,

Thanks for your reply. Actually, I've found the interest charges on IB to be very low. I'll verify at some point today, but I believe these run under 1% annualized. Of course that could change if interest rates rise significantly in the future.

As far as the 25k requirement, you are right. No way around that, that I know of. With all these new "uber-apps" coming out in finance, I wonder if there is not a legal way around that restriction without running foul of SEC laws.

Actually, Mohammad, I need to correct myself. I was confusing the SEC's frequent trader requirement with its shorting requirement. I just verified it with IB. As long as an account is set up as a margin account, it can sell stocks short. IB has a 10K minimum requirement, but other brokerages have less.
Also IB allows your account to be in good standing if you first open it with 10k, then later withdraw funds, say 5k. You can still trade the remaining 5k normally.

So this does not preclude shorting for smaller accounts.
Small accounts face three limitations, that I can see:

  1. higher proportional trading costs (e.g. min $1 trade if less than 100 shares sold can be very high on buying 1 share of a $9 stock)
  2. day trade limitation . You may not buy and sell the same stock on the same day more than 4 times within a 5 day period, or your account will
    be frozen for 90 days under SEC laws. (This was set up by the government in the bad old days of very high brokerage fees to protect unsuspecting
    clients from brokerage churning by dishonest brokers.)
    1. Cash accounts do not have the 2nd limitation, but they are not allowed to short at all, as you pointed out.

I'm still confused, and a bit skeptical. Someone please post a link to IB's website that shows the rates they charge you when you short a position. I couldn't find anything on their website. A 7-10% interest rate to hold a short position seems extremely steep. If it is a dividend stock it makes sense to me that you need to pay out the dividend now that you sold their stock, but it doesn't make any sense to be paying interest also. Who is the benefactor of this interest? And why?

It really depends on the stock - I don't find the rates reasonable at all except for large cap stocks.

Here are some actual numbers for some of the stuff I am trading.

AAPL: 0.25%
FB: 0.25%
SUNE: 5.04%
UVXY: 7.75%
APPCQ: 11.55%

Keep in mind these rates change all the time. Also keep in mind that sometimes you CAN'T short because there are no shares available to short.

I thought I had found a holy grail strategy once... every time a stock reverse-splits the price moves down on the day the split occurs. Accuracy of this was something like 95%. I started trading it live but got shut down pretty quick ... once I realized how hard it is to find shares of some small caps to short! I.e. sometimes you just cant go short - regardless of how profitable it would be.

The benefactor of the interest is both the broker (who facilitates the trade) and the person who loans you the shares so you can sell them.

Also, I totally forgot about the dividends... you also have to pay out the price of any dividends when shorting (that is ... on top of the interest).

This gives a way to download all the rates, and if you use the SLB tool in IB TWS Mosaic, you can see charts of the history of the rates.