3 Higher Closes Beneath the 50 Day Average: Bullish or Bearish?

After seeing $SPY run up to the 50 day average and then reverse, I was feeling pretty good about my expectation that the correction would continue. Then I read the Quantifiable Edges study, Why The Strong Breadth The Last 3 Days Should Be Viewed Positively By Bulls, posted in What I’m Reading This Weekend. 

After seeing Hanna’s breadth results, I’m very curious about what the results of this study will be. As I’m writing this, I still do not know.

The Rules:

  • Buy $SPY at the close after 3 consecutive higher closes AND the close is beneath the 50 day simple moving average
  • Sell $SPY at the close X days later
  • No commissions or slippage included
  • All $SPY history used

The Results:

3 Consecutive UpDays

There were 94 occurrences of this setup and 39 trades were able to be held for the full 50 days.

As the chart shows, this setup under-performs $SPY buy and hold. This may be due to the requirement that $SPY close beneath the 50 day moving average. I would call the results of this setup neutral to bearish.

The results posted by Quantifiable Edges are more bullish than my results. I would like to see that breadth study add the condition for the close to be beneath the 50 day average.

I have written many, many times about how hard it is to find a study that yields bearish results. The market has a bias to the upside, and study after study shows the bias. This study, however, does not. The results, while not earth-shaking, should be viewed as a caution signal. My interpretation is that we can expect more volatility, more up and down, while ultimately moving sideways, for at least a few weeks.

S&P 500: 12 Consecutive Closes Above the Upper Bollinger Band. Bullish or Bearish?

We are entering historic territory with the S&P 500 closing for the 12th consecutive day above its upper Bollinger Band (50,2). This has only happened 25 times since 1928. When the market reaches historic extremes, it is ordinary to wonder what it all means. Let’s take a look.

The Rules:

  • Buy $SPX at the close after 12 consecutive closes above its upper Bollinger Band (50,2).
  • Sell $SPX at the close X days later.
  • No commissions or slippage included.
  • $SPX history starts in 1928.

The Results:

12 Days Above Upper BB

With only 25 samples, we should be careful about drawing conclusions from these results.

If we ignore the amount of time this rally has persisted and only consider the number of consecutive closes above the upper Bollinger Band, we see that in the past the rally has been able to continue.

The $SPX buy-n-hold results were created by cutting the history into 50 day segments and then averaging those segments together.

For those who might be interested in digging a little deeper into this setup, I’ve posted below all the previous instances.

12 Closes Above Instances

$SPY Closes More than 3.5% Above the 20 Day Average. Bullish or Bearish?

On Wednesday, May 15th, $SPY closed 3.52% above its 20 day moving average.  While this has happened more than 275 times over the history of $SPY, it is not an altogether common occurrence. It is the first time this has happened in 2013, and it did not happen at all in 2012. A quick glance at the list of these events appeared to show some clustering.

So what happens next? Let’s take a look at what happens over the next 50 days.

The Rules:

  • Buy $SPY at the Close when it Closes > 3.5% Above its 20 Day Moving Average
  • Sell X Days Later
  • All $SPY history used
  • No Commissions or Slippage included

The Results:

SPY More than 3.5 Above 20 DMA

While there were 275 occurrences, if we instead look at trades, there were 169 trades held for 1 day and 35 trades held for the full 50 days. This means that there is some clustering occurring. It also means that the further we go out towards 50 days, the more volatile results become, simply because there are fewer trades to average together.

The graph shows that this setup is neutral to slightly bearish. The return is no where near to matching a buy-n-hold return over the same time period. In fact, the return after this setup is about half of what we’d expect after holding $SPY for 50 days.

With $SPY having closed 10 days in a row above its upper Bollinger Band (50,2), many traders are expecting some consolidation. Others are calling for a fairly serious pullback. These results show that in the past, consolidation has been much more likely than a serious pullback.

Improving Sell in May: Use the 200 Day

The previous article, Long Term Investors Crazy Not to Sell in May?, we examined a basic Sell in May and Go Away strategy. This update will add an additional factor to the strategy, which is to use the 200 day simple moving average to keep the strategy out of the S&P when it is in bear market territory.

The Rules:

  • Long $SPY from the close of the last trading day of October through the last trading day of April IF $SPY is above its 200 day simple moving average.
  • Long VBLTX (Vanguard Long Term Bond Index Fund) from the last trading day of April to the last trading day of October.
  • First day of test is 6.20.1996. Last day is 3.28.2013. First day is first day of history for VBLTX.
  • No commissions or slippage included.

Note: I spent some time trying to find data for a bond index which would allow me to go back farther than 1996. I did not have any luck. If anyone knows of a suitable government bond / credit index (or mutual fund tracking such an index) with accessible data going back farther than 1996, please let me know.

The Results:

Sell in May with 200 Day Avg

The top pane is $SPY. The middle pane is the equity curve for the strategy. The lower pane shows the drawdowns in percentage terms. The blue portions of the equity curve represents time in $SPY while the green represents time in VBLTX. Compared to the basic strategy, adding the 200 day moving average requirement keeps the system in VBLTX for significant amounts of time.

Statistics:

Sell in May with 200MA Stats

Because of the way I coded his, all the trade information pertains only to the $SPY trades. The returns from VBLTX are built into the overall returns but are not considered to be trades.

If I subtract out the added return from VBLTX, the annualized return from just holding $SPY is 10.69%.

$SPY buy and hold over the same period is 5.26% with a maximum drawdown of -56.47%. So even if you do not rotate into a vehicle to provide a return on your cash, you still double buy and hold just by selling in May.

Historical Profit Table:

Sell in May with 200MA Profit Table

The strategy has performed unbelievably well, any way you slice it.

However, I have my doubts going forward. They are best encapsulated in a comment left by Kill The Banks, in the previous post:

I think there needs to be some evaluation of bonds as an appreciating asset class going forward. There was some blogoland chatter a few months ago regarding the “max theoretical gain” left in bonds (forget if it was the 10yr or the 30yr) and that number being around 17% total net or so (IIRC). Sentiment seems to be that given the current interest rate situation the only direction rates can really go is up, which translates into “bonds down”.

Me, I’d be wary of the forward usefulness of any methodology incorporating bond longs that has good backtest results.

With that comment in mind, what would we rotate into, if not for bonds? Is there another asset class that should be considered during the May – October seasonal period?

Long Term Investors Crazy Not to Sell in May?

I was reading a post from EconomPic called Checking in On the World’s Greatest Rotation Strategy. This strategy is essentially just Sell in May and Go Away, but has one buy the Long government / credit bond index rather than just sitting in cash from May – October.

Oddly enough, I had never tested this simple strategy before, and the results EconomPic posted were good enough that I had to take a look under the hood to see exactly what was making this system run.

The Rules are simple:

  • Long $SPY from the close of the last trading day of October through the last trading day of April.
  • Long VBLTX (Vanguard Long Term Bond Index Fund) from the last trading day of April to the last trading day of October.
  • First day of test is 6.20.1996. Last day is 3.29.2013. First day is first day of history for VBLTX.
  • No commissions or slippage included.

The Results:

Sell in May Basic

The top pane is $SPY. The middle pane is the equity curve for the strategy. The lower pane shows the drawdowns in percentage terms. The blue portions of the equity curve represents time in $SPY while the green represents time in VBLTX.

Statistics:

Sell in May Basic Stats

Because of the way I coded his, all the trade information pertains only to the $SPY trades. The returns from VBLTX are built into the overall returns but are not considered to be trades. Perhaps in future tests I’ll break out both $SPY and $VBLTX as separate trades.

If I subtract out the added return from VBLTX, the annualized return from just holding $SPY is 8.82%.

$SPY buy and hold over the same period is 5.26% with a maximum drawdown of -56.47%. So even if you do not rotate into a vehicle to provide a return on your cash, you still beat buy and hold just by selling in May.

Historical Profit Table:

Sell in May Basic Profit Table

This strategy has just been killing it. I’m leery to assume it can continue killing it. Some questions:

  • Assuming government credit / bonds do not continue to perform as well, with what would we replace VBLTX?
  • Can we add additional robust timing mechanisms to improve performance of $SPY and/or VBLTX?

I’m looking forward to reading your ideas on these questions in the comments.

The next post will add in an additional timing measure for $SPY.

Sustainable, Tradeable Bounce Still Developing

I have a couple of favorite breadth indicators which I use to determine when a bounce is imminent and sustainable. Neither indicator has reached the bounce threshold, but they are near.

3_19 breadth

The main chart is $SPY with the major moving averages.

The middle pane, green line, is a percent ranked measure of the daily number of declining stocks. When this indicator gets above 80, I start looking for an immediate, typically next-day bounce. Ideally it is above 85 and nearing 90. These bounces may not last long unless the next indicator is also signalling a bounce.

The bottom pane, red line, is the number of stocks trading above their 5 day moving averages. It closed at 1,170. It needs to fall further to around 700 before I begin looking for a sustainable bounce. By sustainable I mean a bounce which should last for more than a day.

For now I do not see much of a short-term edge in terms of direction. Another moderately strong down day will likely trigger both of these indicators to signal a bounce.

The Market Has Topped! Here’s Why.

Huh.

Your first sign that the title was a load of crap written solely for maximum clickatude is that I used an exclamation point. Only snake oil salesman and Timothy Sykes (but I repeat myself) use exclamation points in their titles. Your second sign that the title is simply bullshit is my post from last night where I wrote about how bull markets are bad for blogging. If those first two clues weren’t enough and you still haven’t figured out how unserious the title is, note the reference to Timothy Sykes in the body of this post, which can only have one purpose: to drive maximum traffic through agitation of the yahoo finance message board rejects.

Now that I have your attention…

I do have something more serious to discuss tonight, and that is the fact that the S&P 500 has traded above its 50 day simple moving average for 46 days. 

Using this statistic as a setup, I’ve come up with a simple little study that should help us determine how much longer this market can trade before correcting.

The Rules:

  • Buy $SPY or $SPX at the close when it has traded above its 50 day moving average for 46 days.
  • Sell $SPY or $SPX at the close when it closes beneath its 50 day moving average.
  • All $SPY and $SPX history used. $SPX history goes back to 1928.
  • No commissions or slippage included.

Results Using $SPY:

SPY 46 Days Above MA50 Study

The equity curve above was generated from trading the setup as a system with starting equity of $10,000.

  • Number of Trades: 26
  • % of Winning Trades: 19.23%
  • Average % Gain / Loss: -0.44%
  • Average Number of Days Held: 29
  • Number of Days in Largest Win: 159
  • Number of Days in Largest Loss: 13

The stats are telling us that if you are waiting for a close beneath the 50 day moving average to sell, there is a substantial chance that the market will be lower than today’s close when that happens. On average, it has taken the market about 5 weeks from this point before it closed beneath the 50 day average, but sometimes it trades higher for much longer (159 more days) and sometimes it starts to correct almost immediately (13 days).

Let’s Look at Results Using $SPX:

SPX 46 Days Above MA50 Study

  • Number of Trades: 107
  • % of Winning Trades: 30.84%
  • Average % Gain / Loss: 0.25%
  • Average % Winning Trade: 5.32%
  • Average % Losing Trade: -2.01%
  • Average Number of Days Held: 30
  • Number of Days in Largest Win: 213
  • Number of Days in Largest Loss: 7

Looking back over 80 years, this setup seems to catch one good trade every decade or so. The rest consistently lose. What I find remarkable is that the average number of days the trade is held is stable over the long term and shorter term at roughly 30 days. If this pattern holds true, we can expect some weakness to begin in late March or early April.

But what if we wanted to be sure to catch the big winning once-in-a-decade trade while not losing too much on the rest? The answer is simple, really. We want to make sure we hold our winners longer while still cutting lose the losing trades before they kill the account. Here is what that looks like.

SPX 46 Days Above MA50 Alternate Study

The only thing different is that now we are selling on a close beneath the 100 day moving average, rather than the 50. This change means our average trade is held for 84 days after the setup (versus 30). Look at how this simple change affects the average winning and losing trades:

  • Average % Winning Trade 11.81% (vs. 5.32% for selling beneath 50 day average)
  • Average  losing trade -3.53 (vs. -2.01% for selling beneath the 50 day average)

This illustrates what happens when we hold winners longer while still selling losers for a reasonable loss. In real-life, most people find it incredibly difficult to hold winners long enough. This may be because their emotions override their knowledge, or because they don’t have enough knowledge to be able to override their emotions.

And that my friends is how you blog during a bull market.

 

3 Higher Closes Beneath the 50 Day Average: Bullish or Bearish?

After seeing $SPY run up to the 50 day average and then reverse, I was feeling pretty good about my expectation that the correction would continue. Then I read the Quantifiable Edges study, Why The Strong Breadth The Last 3 Days Should Be Viewed Positively By Bulls, posted in What I’m Reading This Weekend. 

After seeing Hanna’s breadth results, I’m very curious about what the results of this study will be. As I’m writing this, I still do not know.

The Rules:

  • Buy $SPY at the close after 3 consecutive higher closes AND the close is beneath the 50 day simple moving average
  • Sell $SPY at the close X days later
  • No commissions or slippage included
  • All $SPY history used

The Results:

3 Consecutive UpDays

There were 94 occurrences of this setup and 39 trades were able to be held for the full 50 days.

As the chart shows, this setup under-performs $SPY buy and hold. This may be due to the requirement that $SPY close beneath the 50 day moving average. I would call the results of this setup neutral to bearish.

The results posted by Quantifiable Edges are more bullish than my results. I would like to see that breadth study add the condition for the close to be beneath the 50 day average.

I have written many, many times about how hard it is to find a study that yields bearish results. The market has a bias to the upside, and study after study shows the bias. This study, however, does not. The results, while not earth-shaking, should be viewed as a caution signal. My interpretation is that we can expect more volatility, more up and down, while ultimately moving sideways, for at least a few weeks.

S&P 500: 12 Consecutive Closes Above the Upper Bollinger Band. Bullish or Bearish?

We are entering historic territory with the S&P 500 closing for the 12th consecutive day above its upper Bollinger Band (50,2). This has only happened 25 times since 1928. When the market reaches historic extremes, it is ordinary to wonder what it all means. Let’s take a look.

The Rules:

  • Buy $SPX at the close after 12 consecutive closes above its upper Bollinger Band (50,2).
  • Sell $SPX at the close X days later.
  • No commissions or slippage included.
  • $SPX history starts in 1928.

The Results:

12 Days Above Upper BB

With only 25 samples, we should be careful about drawing conclusions from these results.

If we ignore the amount of time this rally has persisted and only consider the number of consecutive closes above the upper Bollinger Band, we see that in the past the rally has been able to continue.

The $SPX buy-n-hold results were created by cutting the history into 50 day segments and then averaging those segments together.

For those who might be interested in digging a little deeper into this setup, I’ve posted below all the previous instances.

12 Closes Above Instances

$SPY Closes More than 3.5% Above the 20 Day Average. Bullish or Bearish?

On Wednesday, May 15th, $SPY closed 3.52% above its 20 day moving average.  While this has happened more than 275 times over the history of $SPY, it is not an altogether common occurrence. It is the first time this has happened in 2013, and it did not happen at all in 2012. A quick glance at the list of these events appeared to show some clustering.

So what happens next? Let’s take a look at what happens over the next 50 days.

The Rules:

  • Buy $SPY at the Close when it Closes > 3.5% Above its 20 Day Moving Average
  • Sell X Days Later
  • All $SPY history used
  • No Commissions or Slippage included

The Results:

SPY More than 3.5 Above 20 DMA

While there were 275 occurrences, if we instead look at trades, there were 169 trades held for 1 day and 35 trades held for the full 50 days. This means that there is some clustering occurring. It also means that the further we go out towards 50 days, the more volatile results become, simply because there are fewer trades to average together.

The graph shows that this setup is neutral to slightly bearish. The return is no where near to matching a buy-n-hold return over the same time period. In fact, the return after this setup is about half of what we’d expect after holding $SPY for 50 days.

With $SPY having closed 10 days in a row above its upper Bollinger Band (50,2), many traders are expecting some consolidation. Others are calling for a fairly serious pullback. These results show that in the past, consolidation has been much more likely than a serious pullback.

Improving Sell in May: Use the 200 Day

The previous article, Long Term Investors Crazy Not to Sell in May?, we examined a basic Sell in May and Go Away strategy. This update will add an additional factor to the strategy, which is to use the 200 day simple moving average to keep the strategy out of the S&P when it is in bear market territory.

The Rules:

  • Long $SPY from the close of the last trading day of October through the last trading day of April IF $SPY is above its 200 day simple moving average.
  • Long VBLTX (Vanguard Long Term Bond Index Fund) from the last trading day of April to the last trading day of October.
  • First day of test is 6.20.1996. Last day is 3.28.2013. First day is first day of history for VBLTX.
  • No commissions or slippage included.

Note: I spent some time trying to find data for a bond index which would allow me to go back farther than 1996. I did not have any luck. If anyone knows of a suitable government bond / credit index (or mutual fund tracking such an index) with accessible data going back farther than 1996, please let me know.

The Results:

Sell in May with 200 Day Avg

The top pane is $SPY. The middle pane is the equity curve for the strategy. The lower pane shows the drawdowns in percentage terms. The blue portions of the equity curve represents time in $SPY while the green represents time in VBLTX. Compared to the basic strategy, adding the 200 day moving average requirement keeps the system in VBLTX for significant amounts of time.

Statistics:

Sell in May with 200MA Stats

Because of the way I coded his, all the trade information pertains only to the $SPY trades. The returns from VBLTX are built into the overall returns but are not considered to be trades.

If I subtract out the added return from VBLTX, the annualized return from just holding $SPY is 10.69%.

$SPY buy and hold over the same period is 5.26% with a maximum drawdown of -56.47%. So even if you do not rotate into a vehicle to provide a return on your cash, you still double buy and hold just by selling in May.

Historical Profit Table:

Sell in May with 200MA Profit Table

The strategy has performed unbelievably well, any way you slice it.

However, I have my doubts going forward. They are best encapsulated in a comment left by Kill The Banks, in the previous post:

I think there needs to be some evaluation of bonds as an appreciating asset class going forward. There was some blogoland chatter a few months ago regarding the “max theoretical gain” left in bonds (forget if it was the 10yr or the 30yr) and that number being around 17% total net or so (IIRC). Sentiment seems to be that given the current interest rate situation the only direction rates can really go is up, which translates into “bonds down”.

Me, I’d be wary of the forward usefulness of any methodology incorporating bond longs that has good backtest results.

With that comment in mind, what would we rotate into, if not for bonds? Is there another asset class that should be considered during the May – October seasonal period?

Long Term Investors Crazy Not to Sell in May?

I was reading a post from EconomPic called Checking in On the World’s Greatest Rotation Strategy. This strategy is essentially just Sell in May and Go Away, but has one buy the Long government / credit bond index rather than just sitting in cash from May – October.

Oddly enough, I had never tested this simple strategy before, and the results EconomPic posted were good enough that I had to take a look under the hood to see exactly what was making this system run.

The Rules are simple:

  • Long $SPY from the close of the last trading day of October through the last trading day of April.
  • Long VBLTX (Vanguard Long Term Bond Index Fund) from the last trading day of April to the last trading day of October.
  • First day of test is 6.20.1996. Last day is 3.29.2013. First day is first day of history for VBLTX.
  • No commissions or slippage included.

The Results:

Sell in May Basic

The top pane is $SPY. The middle pane is the equity curve for the strategy. The lower pane shows the drawdowns in percentage terms. The blue portions of the equity curve represents time in $SPY while the green represents time in VBLTX.

Statistics:

Sell in May Basic Stats

Because of the way I coded his, all the trade information pertains only to the $SPY trades. The returns from VBLTX are built into the overall returns but are not considered to be trades. Perhaps in future tests I’ll break out both $SPY and $VBLTX as separate trades.

If I subtract out the added return from VBLTX, the annualized return from just holding $SPY is 8.82%.

$SPY buy and hold over the same period is 5.26% with a maximum drawdown of -56.47%. So even if you do not rotate into a vehicle to provide a return on your cash, you still beat buy and hold just by selling in May.

Historical Profit Table:

Sell in May Basic Profit Table

This strategy has just been killing it. I’m leery to assume it can continue killing it. Some questions:

  • Assuming government credit / bonds do not continue to perform as well, with what would we replace VBLTX?
  • Can we add additional robust timing mechanisms to improve performance of $SPY and/or VBLTX?

I’m looking forward to reading your ideas on these questions in the comments.

The next post will add in an additional timing measure for $SPY.

Sustainable, Tradeable Bounce Still Developing

I have a couple of favorite breadth indicators which I use to determine when a bounce is imminent and sustainable. Neither indicator has reached the bounce threshold, but they are near.

3_19 breadth

The main chart is $SPY with the major moving averages.

The middle pane, green line, is a percent ranked measure of the daily number of declining stocks. When this indicator gets above 80, I start looking for an immediate, typically next-day bounce. Ideally it is above 85 and nearing 90. These bounces may not last long unless the next indicator is also signalling a bounce.

The bottom pane, red line, is the number of stocks trading above their 5 day moving averages. It closed at 1,170. It needs to fall further to around 700 before I begin looking for a sustainable bounce. By sustainable I mean a bounce which should last for more than a day.

For now I do not see much of a short-term edge in terms of direction. Another moderately strong down day will likely trigger both of these indicators to signal a bounce.

The Market Has Topped! Here’s Why.

Huh.

Your first sign that the title was a load of crap written solely for maximum clickatude is that I used an exclamation point. Only snake oil salesman and Timothy Sykes (but I repeat myself) use exclamation points in their titles. Your second sign that the title is simply bullshit is my post from last night where I wrote about how bull markets are bad for blogging. If those first two clues weren’t enough and you still haven’t figured out how unserious the title is, note the reference to Timothy Sykes in the body of this post, which can only have one purpose: to drive maximum traffic through agitation of the yahoo finance message board rejects.

Now that I have your attention…

I do have something more serious to discuss tonight, and that is the fact that the S&P 500 has traded above its 50 day simple moving average for 46 days. 

Using this statistic as a setup, I’ve come up with a simple little study that should help us determine how much longer this market can trade before correcting.

The Rules:

  • Buy $SPY or $SPX at the close when it has traded above its 50 day moving average for 46 days.
  • Sell $SPY or $SPX at the close when it closes beneath its 50 day moving average.
  • All $SPY and $SPX history used. $SPX history goes back to 1928.
  • No commissions or slippage included.

Results Using $SPY:

SPY 46 Days Above MA50 Study

The equity curve above was generated from trading the setup as a system with starting equity of $10,000.

  • Number of Trades: 26
  • % of Winning Trades: 19.23%
  • Average % Gain / Loss: -0.44%
  • Average Number of Days Held: 29
  • Number of Days in Largest Win: 159
  • Number of Days in Largest Loss: 13

The stats are telling us that if you are waiting for a close beneath the 50 day moving average to sell, there is a substantial chance that the market will be lower than today’s close when that happens. On average, it has taken the market about 5 weeks from this point before it closed beneath the 50 day average, but sometimes it trades higher for much longer (159 more days) and sometimes it starts to correct almost immediately (13 days).

Let’s Look at Results Using $SPX:

SPX 46 Days Above MA50 Study

  • Number of Trades: 107
  • % of Winning Trades: 30.84%
  • Average % Gain / Loss: 0.25%
  • Average % Winning Trade: 5.32%
  • Average % Losing Trade: -2.01%
  • Average Number of Days Held: 30
  • Number of Days in Largest Win: 213
  • Number of Days in Largest Loss: 7

Looking back over 80 years, this setup seems to catch one good trade every decade or so. The rest consistently lose. What I find remarkable is that the average number of days the trade is held is stable over the long term and shorter term at roughly 30 days. If this pattern holds true, we can expect some weakness to begin in late March or early April.

But what if we wanted to be sure to catch the big winning once-in-a-decade trade while not losing too much on the rest? The answer is simple, really. We want to make sure we hold our winners longer while still cutting lose the losing trades before they kill the account. Here is what that looks like.

SPX 46 Days Above MA50 Alternate Study

The only thing different is that now we are selling on a close beneath the 100 day moving average, rather than the 50. This change means our average trade is held for 84 days after the setup (versus 30). Look at how this simple change affects the average winning and losing trades:

  • Average % Winning Trade 11.81% (vs. 5.32% for selling beneath 50 day average)
  • Average  losing trade -3.53 (vs. -2.01% for selling beneath the 50 day average)

This illustrates what happens when we hold winners longer while still selling losers for a reasonable loss. In real-life, most people find it incredibly difficult to hold winners long enough. This may be because their emotions override their knowledge, or because they don’t have enough knowledge to be able to override their emotions.

And that my friends is how you blog during a bull market.

 

2014 iBankCoin Investors Conference
Previous Posts by Woodshedder