Get Shorty (again, research, not the movie…)

I’m running a high risk of running out of movies with “short” in the title. So this had better be the last blog post on the subject!

In my previous post (here), I looked at a short-sale signal where a stock was shorted after it averaged 3% gains each day over five days (in any distribution). At the end of five days, it had to be up 15%. Yes, I could have just looked at it that way, but whatever, it all works out the same.

The graphs looked pretty good. Seemed like the basis for a system, yeah?

Not so fast.

I didn’t (purposely) look at a critical element: time. Are these potential returns distributed evenly across the universe, or is the overall market health a big factor?

First, I constructed an actual trading system, with the following parameters:

• average 3% gain per day for five days.

• historical member of the Russell 3000 index at the time of the trade.

• S&P 500 has to be greater than its 5-day moving average (which we found earlier had a big effect on returns).

• the stock’s historical price was >$10 and its median 19-day volume was >100,000 shares.

• Short at next day’s open, hold for five days and cover at the close.

• $1500 per trade (rounded down to an even number of shares), with a $30,000 starting account. No commissions, because I don’t know how much you were paying your broker back then.

3 over 5 short Equity initialThat’s a pretty awkward-looking graph, dontcha think? The gains were made during the bear markets of 2000-2001 and 2008, and then the system just slowly leaked cash in between. Clearly, the larger market has something to say about our system.

Let’s pick a period of time as our in-sample set of data, so we can do some optimization. I picked 2005-2013 because it includes some bull, bear and sideways markets. We’ll then see how this translated to the out-of-sample period of 2014 through Feb 2016.

Let’s zoom in on our initial equity and examining 2005-2013 first.

3 over 5 init IS Portfolio EquityBlech.

Perhaps a simple market-timing filter? How about we calculate the 200-day moving average of the S&P 500? When the price is below the moving average, it’s ok to trade. If it’s above, we don’t go shortin’. Here’s a graph of what that looks like:

3 over 5 200 MA IS Portfolio EquityWe keep more of our profits doing that. Also, our initial run had a CAR/MDD of 0.17 and a hit rate of 50.41%, whereas this new market-filter version has a CAR/MDD of 0.46 and a hit rate of 52.62% That’s an improvement, but I feel like we’re missing out on some profit here and there.

I also tried optimizing for higher values of the signal (i.e. requiring more than a 3%-per-day gain), but 3% turned out to be the best.

In the first post, when I was keeping things strictly in the spreadsheet realm, I had included a couple of other data points with each trade. I calculated where the stock’s price was in relation to its historical price using a “position in range” function. This is calculated like this:

( C – Lpc ) / ( Hpc – Lpc )

Where C is the closing price, Lpc is the lowest close over a certain lookback period, and Hpc is the highest close of a certain lookback period. I recorded this ratio for both 60 and 250 trading days.

PIR 60PIR 250Clearly, when the closing price is in the lower half of its position-in-range (PIR) value, the shorting results are much better. The PIR 60 data is more consistent than the PIR 250 data. This is worth taking an ‘optimization’ look at.

3 over 5 pir per optimizeI optimized for values between 10 and 150 in increments of 10, and 100 looks best without being suspiciously peak-y. All the values longer than 10 days show positive results. Now a look at our in-sample equity using the PIR 100 filter instead of the market-timing filter:

3 over 5 PIR100 IS Portfolio EquityNow that looks better (but remember, this is optimized in-sample data). The gains are still made during the bear market, but there’s an overall upward trend through 2009-2013. The CAR/MDD is a solid 1.14 and the hit rate is 56.34%.

So how does this fare during our out-of-sample period of 2014-Feb 2016? After all, we’ve had a continuation of a bull trend, a flat year, and possibly the start of a bear market (or at least a correction).

3 over 5 PIR100 OOS Portfolio Equity

It’s profitable, but that looks like a pretty hairy ride. And that’s confirmed by our pathetic 0.16 CAR/MDD value (and a 50.12 hit rate). This is certainly not something I’d consider trading.

I’m left feeling like there’s still the germ of a trading idea here, but I haven’t found it to my satisfaction. So for now I’ll leave this as a blueprint for how to go about testing strategies without including too much bias. And how difficult it is to come up with short-sale systems.

Leave a Reply

Your email address will not be published. Required fields are marked *