New Highs: A View From the Top

Yes, the market is going up, up, up. Hopefully you are fully invested and have been so for months.

We have taken a few days off to go to Myrtle Beach for a baseball tournament at the Cal Ripken facility here. With the market at highs, I thought I’d post a few shots from the top of one of the tallest condos in Myrtle Beach.

Breakers Left

That shot is looking towards North Myrtle.

Breakers Middle

Walking out on the balcony feels like you will fall right into the Atlantic. You cannot see beach until the last couple of steps.

Breakers Right

This shot looks south, towards Surfside.

The bracket has 12 teams. The top 4 will advance to the championship on Sunday. Our experience is that the teams that compete here are top notch. Wish his team some luck!

 

$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.

AmiBroker Code for TransDow System

I have been trying to replicate ETF HQ’s TransDow strategy. It is a neat idea, and the simplicity appeals to me. Beyond that, I’ve been working with AmiBroker to get better at coding in multiple time frames. Because this strategy uses weekly closes, I thought it would be good practice. The problem is that I cannot get my results to be any where near ETF HQ’s results. My guess is that my code has an error, but for the life of me, I cannot figure it out.

After emailing with ETF HQ, I was able to determine that their coding has the week close on Monday while my code uses Friday as the last day of the week. This should not make that much of a difference.

The AmiBroker code is below. I have put it within the WordPress quote function, so it should be able to be cut and pasted without error.

*Update* It will not cut and paste without error. The problem seems to stem from the quotation marks. I’ll leave the code here so that others can peruse it. Email me woodshedder73 at google mail and I’ll send the .afl file as an attachment.

/*TransDow as described by Derry Brown: http://etfhq.com/blog/2013/05/04/market-timing-through-market-dominance-transdow/?utm_source=feedburner&utm_medium=feed&utm_campaign=Feed%3A+EtfHq+%28ETF+HQ%29
*/

//Boilerplate options
SetTradeDelays( 0, 0, 0, 0 );

SetOption( “InitialEquity”, 10000 );
SetOption( “MinShares”, 1 );
SetOption( “MinPosValue”, 0 );
SetOption( “FuturesMode”, False );
SetOption( “AllowPositionShrinking”, True );
SetOption( “ActivateStopsImmediately”, False );
SetOption( “ReverseSignalForcesExit”, False );
SetOption( “AllowSameBarExit”, False );
SetOption( “CommissionMode”, 3 );
SetOption( “CommissionAmount”, 0.0 );
SetOption( “InterestRate”, 0 );
SetOption( “MarginRequirement”, 100 );
SetOption( “MaxOpenPositions”, 1 );
SetOption( “UsePrevBarEquityForPosSizing”, True );

RoundLotSize = 1; // 0 for Funds, 100 for Stocks
TickSize = 0; // 0 for no min. size
MarginDeposit = 0;

Totalpositions = 1;
PositionSize = -100/TotalPositions;

// Weekly Bars //
Time=inWeekly;
TimeFrameSet(Time);
DJI=Foreign(“$DJI”, “C”);
DJT=Foreign(“$DJT”, “C”);
Ratio=DJT/DJI;
Ratio10=MA(Ratio,10);
TimeFrameRestore();
RestorePriceArrays();

Ratio=TimeFrameExpand(Ratio,Time);
Ratio10=TimeFrameExpand(Ratio10,Time);

Buy=Cross(Ratio,Ratio10);
Sell=Cross(Ratio10,Ratio);

BuyPrice=SellPrice=Close;

ApplyStop(stopTypeLoss,stopModePercent,4,0,False);

Plot(Ratio, “Ratio”,colorYellow,styleLine);
Plot(Ratio10, “Ratio10”,colorGreen,styleLine);
Filter=True;
AddColumn(Ratio, “Ratio”,1.5);
AddColumn(Ratio10, “SMA10″,1.5);
AddColumn(Buy, “Buy”);
AddColumn(Sell, “Sell”);

Let me know in the comments if there are any questions about the code. My data provider uses $DJI for the Dow Jones Industrial Average and $DJT for the Dow Jones Transportation Index. These symbols may have to replaced with whatever symbol your data provider uses for the $DJI and $DJT.

Fidelity Sector Rotational System Drops Defensive Funds

After months of defensive sector utility funds moving up to populate the majority of the top fund rankings, within a couple of weeks, these sector funds have dropped completely out of the rankings. As of last night, Utilities were still in the top three. After today’s trading, it is ranked 7th.

The top 5 funds are now all pursuing a similar theme. I think you’ll be able to discern what it is…

  1. FSPHX (Health Care)
  2. FPHAX (Pharmaceuticals)
  3. FBIOX (Biotechnology)
  4. FDFAX (Consumer Staples)
  5. FSPCX (Insurance)

Any guesses as to why the top 5 is almost all following a similar theme?

The system is currently long FSUTX (Utilities, but will be rotated out of and into FSPHX tomorrow); FBMPX (Multimedia, but will be rotated out of and into FPHAX tomorrow); FBIOX, which will be held since it is still in the top 3.

The system is up 14.5% YTD, compared to $SPY, which is up 14.8% YTD.

5 $SPX Closes Above the Upper Bollinger Band: What Happens 50 Days Later?

Today, despite closing slightly lower, the S&P 500 closed for the 5th day above its upper Bollinger Band (50,2). I have written previously how closes above the the upper band are typically bullish and may signal an abnormal market. This evening we’ll examine what happens after 5 consecutive closes above upper Bollinger Band.

The Rules:

  • Buy $SPX at the close after it has made X consecutive closes above its upper Bollinger Band
  • Sell Y days later
  • $SPX history starts in 1928
  • No commissions or slippage included

The Results:

5 Closes Abv BB

The results are more bullish than I expected, and they improve as the number of closes above the upper band increases.

  • This setup was not nearly as rare as I had imagined.
  • There were 126 occurrences of 5 closes above the upper band with 110 trades held the full 50 days.
  • After 5 closes above the upper band, $SPX has closed higher 50 days later 67.27% of the time.
  • Buy-n-Hold results are calculated by cutting $SPX history into 50 day segments and then averaging the segments.

The number of samples should be sufficient to lend reliability to the results, but I am honestly a little disappointed because I suspected the results would be either extremely bullish or extremely bearish. I was looking for some drama and didn’t find it. Instead, this study just presents another reason to lean bullish.

Major US US Futures Europe Asia Commodities 2yr Euro Yields 10yr Euro Yields Oil
  • DOW 15,354.40 0.80%
  • NASDAQ 3,498.97 0.97%
  • S&P 500 1,667.47 1.03%
  • VIX 12.45 -4.74%
  • SPX 500 (CFD) 1,665.90 -0.01%
  • DOW (CFD) 15,345.00 -0.06%
  • NASDAQ 100 3,025.10 -0.13%
  • EURUSD 1.283 -0.05%
  • UK 6,723.06 0.53%
  • GERMANY 8,398.00 0.34%
  • FRANCE 4,001.27 0.56%
  • SPAIN 8,582.40 0.47%
  • H. KONG 23,082.70 0.17%
  • JAPAN 15,138.10 0.67%
  • KOREA 1,986.81 0.79%
  • SHANGHAI 2,282.87 1.38%
  • NAT GAS 4.10 -0.24%
  • GOLD 1,453.60 -0.60%
  • SILVER 23.76 -0.77%
  • COPPER 3.19 0.32%
  • FRANCE 2YR 0.19 -10.90%
  • GERMAN 2YR -0.03 -314.29%
  • ITALIAN 2YR 2.18 27.59%
  • SPAIN 2YR 2.81 8.21%
  • FRANCE 10YR 1.86 -0.96%
  • GERMAN 10YR 1.33 -0.38%
  • ITALIAN 10YR 3.90 -2.04%
  • SPAIN 10YR 4.21 -2.35%
  • WTI 96.02 0.90%
  • BRENT 104.72 0.00%
  • WTI/BRENT 8.70
  • 321 CR SPR 21.96 10.04%