iBankCoin
Joined Nov 11, 2007
1,458 Blog Posts

Testing End-of-Month Markup with a Survivor-Free NDX Database

Kick off post: Is the End-of-Month Markup a Myth?

Next post: End-of-Month Markup and the Nasdaq 100

And now we will examine the first caveat of the last post, where I noted that survivorship bias may affect performance.

Indeed, the previous test suffered from survivorship bias.

Frank Hassler from Engineering Returns contacted me and generously offered a survivor-free Nasdaq 100 database with which to test this idea. If you haven’t been checking out Frank’s blog, you are missing out on some fresh ideas as well as the code behind them. I mean really, the ideas are money. The fact that the code is also provided is just icing on the cake. Truly, he is one of the good guys in the whole system-trading/backtesting blogosphere.

Understand that Frank’s database replicates the additions and deletions of stocks on the Nasdaq 100 as they would have actually happened in real-time. This is much different from testing over the current 100 stocks of the NDX as many of these 100 stocks would not have belonged to the index earlier in the decade.

Do not underestimate the effect of survivorship bias. Many traders read about it but have no way of actually seeing it or understanding the implications.

What is being fleshed out here is a real-life lesson on the impact of survivorship bias on a trading system.

The Rules:

(Same as before but re-posted for clarity)

  • Using the Nasdaq 100, select the 5 stocks with the highest rate-of-change over the last 252 bars (roughly one calendar year) and buy them at the close 5 days before the month’s end. Sell on the close of the 1st day of the next month.
  • I’m testing from 1/1/2001 to 10/8/2010. I’ve not included any commissions or slippage.

The Results:

Summary:

Compare the original results without a survivor free database to the results above.

There is quite a difference, and it is due to survivorship bias.

If we were to include commissions, the system would be only marginally profitable, while the original results looked very promising with an annual return of 15.80%.

The good news is that now we can accurately answer Steve Place’s original question- Is the month-end markup on the Nasdaq 100 a myth?

Stay tuned, there is more to come.

Read the next post in this series: Which is the Best Day of the Month to Buy the QQQQ?

Comments »

Obligatory: Impending Golden Cross Post

Soon we’ll have a Golden Cross on the S&P500.

I have written about this numerous times, but it is always fun to revisit.

Setup:

  • Buy the SPY at the close when the 50 day simple moving average crosses above the 200 day simple moving average.
  • Sell the open SPY position at the close when the 50 day simple moving average cross beneath the 200 day simple moving average.

No commissions or slippage were used in the test.

Results:

I find it interesting that the last exit from the Golden Cross was pretty horrible. I’ve included a chart below of the entry and exit. Note that the exit was almost at the exact low of 2010.

All in all, this setup remains appealing and will likely continue to maintain a prominent position in trend-following lore.

Comments »

Behold: Recent Power Dip Winship

As always, the 3-day trial is free, requires only a valid email address, and includes all the functionality and benefits of full membership.

The green arrow shows the purchase at the open of the bar, and the red arrow shows the sell at the close of the bar.

Comments »

End-of-Month Markup and the Nasdaq 100

Read the kick-off post here….

Here are the rules.

Using the Nasdaq 100, select the 5 stocks with the highest rate-of-change over the last 252 bars (roughly one calendar year) and buy them at the close 5 days before the month’s end. Sell on the close of the 1st day of the next month.

Seems simple enough, no?

I’m testing from 1/1/2000 to 10/6/2010. I’ve not included any commissions or slippage.

The Results:

Equity Curve:

Profit Table:

Summary:

Not bad, eh? Did we just get lucky? It is really too early to tell. There are some limitations/caveats that should be discussed.

1. The Nasdaq 100 database is accurate for the present but would have some different stocks in the past that are not included in the current construction. I could recreate each year’s construction to match the addition/deletion process and then use them to test over, but I didn’t. Perhaps I will do that in the future. It would take a fair amount of time.

2. We are looking at the best performing stocks of the past year and these stocks continue to exhibit momentum. This means that often, for months in a row, the same stocks are being bought. For example, BIDU has consistently been at or near the top of the list for 2010. This means that BIDU was one of the 5 stocks purchased every month-end for most of 2010.

3. We might have just gotten lucky. To truly determine if we are capturing seasonality, or just catching 6 days worth of momo from the best stocks of the past year, the tests will have to run through every day of the month, holding for six days, and then comparing results. Even doing that, we may never be sure that we aren’t just capturing some momentum.

Where to Next?

There are many variations on this theme. For example, what if we bought the worst performing stocks of the Nasdaq 100? (Spoiler Alert: Results improve). What if we shortened the look-back period? Used stops? Filtered the picks for volatility?

Before we get to that fun stuff, I’m going to try and figure out if we are catching seasonality or momentum.

Thanks to Howard Bandy for his help with the code for this project.

Here is the next post in this series: Testing End-of-Month Markup with a Survivor Free NDX Database.

Comments »

Is the End-of-Month Markup a Myth?

Steve Place, friend of iBC asked,

I have a study request.

Is the EOM/EOQ markup just a myth?

Strategy: buy the 5 largest gainers in the QQQQ 5 days before month’s end, sell on the 1st. Any edge?

Steve wasn’t very specific when he said to “buy the 5 largest gainers.” I’m hoping he’ll stop by and elaborate a bit more in the comments section about how he would quantify the 5 largest gainers. By that day? The past week? The past month or year?

The code is set up and ready to go.

I’m interested in hearing what the rest of you think about this setup. Will it work? What would you do differently?

Next post in this series is here: End-of-Month Markup and the Nasdaq 100

Comments »

The Line in the Sand

Back on September 12th, I posted this chart:

Here is where we are now. Note the resistance line I drew on 9/12 has stayed on the chart, in the same place. Note what happened as the SPY approached and traded above and below the line. It almost looks easy, no?

Bottom line: There is a ton of support in this area. In fact, it is the glorious trifecta, where we have 3 different technical areas of support: The support/resistance line, the 200 day average, and the rising 50 day average.

I am a dip-buyer here.

Comments »

Power Dip September Results

The system had a respectable gain this month.

I have added a new metric (rightmost cells) which is the Net Risk Adjusted percentage gain. To calculate this metric, you divide net percentage gain by the exposure. Let’s look at this. The 1% Risk, 10% Stop model had the best risk adjusted performance because it kept more cash on hand (less exposure) than the other models. The 2% Risk, 3ATR model had both poorer net gain and risk adjusted gain. Because that model risks 2% on every trade, it took on more exposure (less cash on hand).

The 2% risk models have averaged about 66% exposure this year. This means that many times you will have 1/3rd of your account in cash, in money markets, whatever.

A note about how the report is generated. The monthly statistics, %P/L (% profit or loss) and %CAR (% compound annual return) are calculated from January 4th (first trading day of 2010) to the present, NOT starting from September 1st to September 30th. The difference is that the system may have been holding open positions going into September that affect that months performance where if one started trading the system on September 1st, there wouldn’t have been any already opened positions.

The rest of the statistics, W/L% , Avg.Trade, and Trades are calculated from September 1st to September 30th in order to give an accurate account of one month’s performance.

I would like to highlight Hawaii FiveO’s comment from Friday where he listed his PDS trades for the month and calculated the percentage gain of his average trade. He has come very close to replicating backtested results (although I believe he may alter an exit every now and again). This is what we want to see for any system- that subscribers can replicate the results in their own accounts.

Year-to-Date Performance As of 9/30/10:

Again, note the exposure levels and Risk Adjusted returns.

Overall, it has been a difficult year, with headfakes left and right. I’m happy to see PDS pulling ahead of the benchmarks.

Comments »