Rubber Bands (Mean Reversion Trading)

Pull back that price and then let go!
Pull back that price and then let go!

A couple of days ago I mentioned (here) that I had sold a couple of profitable stocks and was going shopping for more, as part of a discussion on the folly of a “buy and hold” strategy. After yesterday’s big tumble you’re probably thinking, “what, is he an idiot?” Or perhaps just shaking your head at my bad luck.

Well, not to fear! What I didn’t mention was that I was concerned the market was going to take a dive shortly. I have a market-breadth indicator inspired by the one Pradeep Bonde of stockbee uses. Three days ago the indicator went “beep!” (Metaphorically speaking.) This told me I needed to a) take profits on a few swing-trade stocks I had going, and b) prepare to go shopping for some mean-reversion plays when the market took a dive.

Then the next day the indicator went back to normal. Hmm. Was it a false alarm? Probably not, but I decided not to blog about it since a) I’m not in the prediction game and b) I don’t like to look stupid when I make incorrect predictions. I did however tell my 12 year old son, “son, the market is going to fall significantly in the next few days” (pretend you can hear me using my deep ‘Dad’ voice as you read that).

Yesterday I got to show him how amazing I am. Super Stock Dad as far as he’s concerned. Because sure enough, yesterday the market tripped over its own shoelaces and landed face down in the mud. I locked in some profit on a couple of trades, and bought another stock at the close after it had fallen significantly.

Basically there are two types of short-term trades: momentum trades and mean-reversion trades. Pradeep is a big fan on the momentum trade: when a stock has been moving up and then takes a breather, be prepared for when it shoots up again to make a quick profit.

Howard Bandy is more of a mean-reversion kind of guy. Mean reversion is the term for when a stock’s price moves abnormally far in a particular direction, and you catch it at the furthest extension from the ‘mean’ (i.e. the average the price was hanging around before) and ride it as it snaps back. Just like a rubber band.

When you yank that rubber band way back, the big question is whether it’s attached to something or not. If there’s no snap-back, then you just have momentum in the wrong direction!

In my many hours spent backtesting various systems and ideas, I have had very little luck with momentum systems so far. However, the mean-reversion systems are lookin’ tight, yo! In fact, my Band-to-Band system for which I sometimes post signals is basically a mean-reversion system, incorporating a confirmation signal. I’ve come up with some other systems that also look good, and that was what I traded at yesterday’s close.

Some momentum plays just never take off, and head the wrong direction. Some mean-reversion plays don’t bounce back, and keep heading the wrong direction. That’s just how it goes. Here’s hoping my rubber bands are attached at the other end.

 

Party Like It’s 2008…

So this weekend I was at a party, and several of us started chatting about the stock market. I didn’t start the conversation, because I don’t talk stocks with friends. Several people moaned about how they had really suffered in the 2008 crash. And one guy said “my account really got hammered, but luckily I didn’t sell or I would have taken an awful loss. The market came back so it all worked out fine.”

I had to bite my tongue pretty hard.

That’s like five years of his life where his portfolio did nothing. Or worse. Some of the companies he owned could have gone out of business during that period of time, leaving him with what experts call an “Actual Loss.” Imagine if he’d had a simple trailing stop loss of 10% or something…sure he would have taken a little hit at the end, but then he’d have all that cash freed up for when the market bounced back, compounding his way to riches…

But you know that, otherwise you wouldn’t be reading blogs like mine.

While I don’t like taking a loss any more than the next person, I do love to shop. And that’s what the stock market is, a place to buy and sell little tiny pieces of companies! Therefore I look forward to selling stocks, so that I can buy something else. “Buy and Hold” is a sucker’s game, and also pretty damn boring.

Think I’ll go sell a couple of profitable stocks today, so I can do a little shopping…

Rev your engines and grab your shopping carts, because it's time to go shopping!
Rev your engines and grab your shopping carts, because it’s time to go shopping!

 

 

New Swing Trade Signals for 03/17/15

GLW-buy-signal

CDW-buy-signal

Due to a fizzy up day on in the markets today, we have two buy signals for my Band-To-Band swing trade system (which is described in detail here).

We have Corning (GLW) and CDW Corp (CDW). If I had to pick one, I’d go with Corning because it has a higher Bounce Score (which is a secret method I use to rank the volatility and potential profitability of a trade).

Hey all of us stock-market bloggers have to have a Secret and Proprietary Indicator/Oscillator/System etc right? At least I provide the Band-to-Band system for free. Gotta keep some secrets… 🙂

Trading the Gaps: Are they Good For You?

trading-the-gap

I’ve read about a variety of techniques out there for “trading the gap”. A stock opens much higher than the day before, usually showing excitement over some news or earnings event, and then you make your move.

Some techniques use this gap signal as a “buy” as it could signal the start (or continuation) of a trend. Others see this as a signal to sell (i.e. “fade the gap”), as it could be an over-extension and turn into a mean-reversion trade.

I’ve noticed – and I’m sure you have too – that big gaps seem to behave differently than small gaps. So I got to wondering what the statistics might be for different size gaps. And voila, I have some data for you! The results are interesting.

First off, some definitions. What’s a gap? Well it could be defined as an open that is higher than the high of the day before. But if the stock trades down below the previous day’s high, that doesn’t feel like much of a gap. So I’ve defined a gap as a low that is higher than the previous day’s high. It can be as little as $0.01 difference, or as great as whatever…40%? Double? We want to look at all sorts of gaps.

I took Yahoo historical data from 2000 to the end of 2014, for the NYSE and NASDAQ. No filtering for any market conditions or anything else except: the close of the day in question had to be >$15, and the average 10-day volume had to be >100,000 shares. Low-priced or low-volume shares behave less predictably, so I’ve left them out.

I filtered out results that were obvious errors (it’s not the cleanest of data), and ended up with a mere 115,394 data points. Erroneous data usually shows up as massive gaps, so I probably was able to remove most of the offenders.

I took note of a few things:

– the percentage gap between the current day’s low and the previous day’s high.

– the opening price

– the closing price

– the closing price of the 5th day after the ‘gap’ day

My trading hypothesis here was to spot a large gap in intraday trading, and then make a decision to buy at the close of that day. The stock would be held through the fifth day and then sold at the close (with day 1 being the day of the gap). While you can’t know for sure the exact high or low for the day until after the close, you can usually get a good sense for most trades within the last 15 minutes of the day.

That seems a reasonably practical system, although I’m not fleshing out anything beyond that at the moment. This is just hypothetical, to see what sort of gaps yield what sort of results.

I could have divided up the data into vigintiles, but that would have yielded results that would be more complicated to work with in real life. It’s much easier to ask “is this gap between 5% and 6%?” than it is to ask “is this gap between 1.0045% and 2.3311%?” In the real world, we’ll be looking for nice round numbers to simplify our decisions. So I use round numbers for the gap percentages to divide the data up into groups. The vast majority of gaps are of course in the tiny-sized realm, under 1%. As the gaps get bigger, the data points get fewer, and the reliability and/or statistical meaningfulness gets lower.

So each gap-percentage group averages the gain/loss of each trade within that group, to yield a single number for that group. A positive number does NOT mean there are more winners than losers in this group, only that the average of all the trades is positive.

So first I looked at the overall results for all gap-day closes through the close of the 5th day. Note that the percentage groupings do NOT include the lower groups in the average. For labeling purposes I’ve used “<5%” but that does not mean “0% to 5%”. It means “less than 5% but greater than the next lowest group”. Not cumulative, in other words.

gap-up-close-5daySo without regard to whether the “gap day” turned out to be an up day or a down day (comparing the close to the open), we get the above chart. The conclusion: buying at the close and selling at the 5th day’s close is likely to be a losing proposition unless your gap is at least 7% or greater. The dip for the range of 10-15% is odd, so perhaps we would focus on gaps that are between 7% and 10%.

You may have noticed in your chart-gazing that some gaps are really big but then fall throughout the day as sellers take their surprise profits. And other stocks just keep going up and up all day. So is there a difference if we buy at the close of a ‘green’ day rather than a ‘red’ day? Let’s take a look:

For "up" days, where the close is higher than the open.
For “up” days, where the close is higher than the open.

 

The chart above shows what happens when you buy at the close of a “green” day and sell at the close five days later. Basically it’s a bad idea to do this for most percentage gaps! Why gap values between 7-8% show an average gain while the rest of the graph is negative (ignoring the infrequent >15% trades) is a mystery. Possibly erroneous data, so I wouldn’t blindly trade it without further investigation. But overall it looks like green-day gaps only lead to misery unless you’re shorting the stock.

Ok so what if there’s a gap up, but then the day closes in the red? Is there an opportunity there?

For "down" days, where the close is lower than the open.
For “down” days, where the close is lower than the open.

 

Sure looks like there might be. Between 5-6% is still a losing (aka “shorting”) proposition even with a down day, but get into the 6-15% range and you’ve got a winner. Note the average gain/loss for the 7-8% range here, at just under 1.4%, is higher than any other percentile on any of the other graphs.

So from this very basic data, without filtering for any other conditions in the stock or the wider market, there are two areas that warrant research: shorting any gap that is in the 5-6% range, or going long any gap in the 6-15% range that also has a “down” day as the first day.

If I get around to it, I’ll take a further look at some other variations, like buying at the next day’s open, or setting limit orders etc. For example, what happens if in the following few days the gap is “filled”, i.e.  the price drops down below the low of the gap day? Will it go back up? Maybe if I don’t get lazy or distracted, we’ll find out!