iBankCoin
Joined Nov 11, 2007
1,458 Blog Posts

Measuring Survivorship Bias in the Momentum System

1. Let’s Build a Momentum System

2. Momentum System Proof of Concept

3. Momentum System: Adding Volume, Liquidity, and Price Filters

Before I progress any further with this system, I want to test to see the effect (if any) of survivorship bias.

It is a common misconception that adding de-listed data (the non-surviving stocks) to a backtest will decrease performance.

Systems that swing trade stocks may actually improve when de-listed stocks are included in the backtest. Systems with longer hold times may show a decrease in performance. I attribute this to the fact that short-term systems generally rely on making many trades with a small edge (where the primary driver of profit is lots of opportunity) while longer-term systems rely on catching and riding a trend.

Let me dig a little deeper into this in order to clarify the point…

If the longer-term trend-following style or momentum system attempts to hold a stock for a few months, and the company begins a spiral into bankruptcy while the system is long the stock, the performance of the system will suffer. The swing trading system will likely have stopped out, or sold on a bounce or covered on a dip, long before the company succumbs to bankruptcy. If during backtesting, a large losing trade isn’t included because the data doesn’t include the now defunct company, and the trade is instead replaced with a large winner, it is very clear how misleading the results will be. With a short term system, within the long downtrend of a company circling the drain, there may be many swing-trading opportunities.  Thus, adding this delisted company to the backtest for a swing-trading system can actually improve performance.

Hopefully it is clear why I want to test with delisted data before moving forward.

The essence of what I am doing is handicapping the system. We want to add in all of the real-life factors such as liquidity, volume, delisted data, and commissions, before committing much mental capital to further development. After all, time is money.

Now we take a look at how all the companies that went bankrupt, merged, or were bought-out would have affected the momentum system.

With De-Listed Data

Without Delisted Data

Summary:

Unfortunately, adding de-listed data adds significant doubt as to whether the system would be viable in its current form. The performance was approximately halved when de-listed data was added. Adding in commissions will cause performance to further deteriorate.

A Huge Caveat:

Redshark, in the comments section of the previous post on this system, has pointed out that I may be making a mistake in using split-adjusted data for the requirement that the close must be greater than $5.00. I believe that he is correct. Using open interest rather than split-adjusted prices will likely change the results significantly.

Here is a chart that he sent me. I think it clearly illustrates the issue:

Using split-adjusted closes rather than open interest would have excluded almost 10 years of MSFT history. In fact, I am certain that my tests have indeed excluded MSFT as it did not meet the Close>$5.00. It should be obvious that we would want to have MSFT’s huge trend included to sample in this momentum system.

Up next, I will re-run some tests using open interest rather than split-adjusted data and see how it changes things. Maybe it will make enough of a difference that we will not have to go back to the drawing board.

As an aside, I think it is appropriate to point out the power of collaboration and the benefit of generosity. Leveraging the experience and wisdom of other folks has allowed me to accomplish things that I never could have imagined on my own.

If you enjoy the content at iBankCoin, please follow us on Twitter

17 comments

  1. bgpl

    hi Wood,
    a couple of points..
    – if the momentum utility function for ranking had been setup correctly, when the stock which was going bankrupt was going down in value, it would have gone out of the momentum ranks, and “stopped out” (to use the term very loosely) since it got removed by the scoring / ranking. Unless the corner case of your filter of having a position for atleast 30 days and the company having been in the top N of momentum but getting bankrupt in the 30 days kicked in – unlikely scenario.
    – i removed all filters of some_limit;
    I know you have used this filter in the past.. so maybe you need to use that.
    thanks for your insights !
    bgpl

    • 0
    • 0
    • 0 Deem this to be "Fake News"
    • Woodshedder

      bgpl, you are exactly right. My description of why using delisted data is important in regards to bankruptcy was too simplistic. Especially for hold times of a month or so. With a short hold time, no doubt, the system would rotate out of the position. However, as the hold times approach six months, the bankruptcy scenario becomes more possible. Perhaps bankruptcy is a bad choice of terms. Perhaps it would suffice it to say that the company hits a rough patch, begins a long-term downtrend, and then eventually goes bankrupt a year or more later. Or maybe it would be better to think of the business environment for ABC company suddenly changing. Regardless, catching a long downtrend when holding a stock for 6 months is likely.
      Thanks for pointing that out bgpl!

      • 0
      • 0
      • 0 Deem this to be "Fake News"
  2. bgpl

    for some reason, the comment got chopped off in my second point..
    – i was saying that the avg price filter is a poor filter : as you observed it removes a lot of the great growth stocks in the years they were going up in value.
    I think a better filter is average dollar volume, which i believe you used in the past.
    Anyway, that reflects liquidity better…
    thanks again,
    bgpl

    • 0
    • 0
    • 0 Deem this to be "Fake News"
    • Spyder_Crusher

      I agree, that was the first thing I thought–if the company was in a strong trend, it would end and the system would close it before it went bk. think homebuilders 2003-2005 and then 2007-09

      • 0
      • 0
      • 0 Deem this to be "Fake News"
    • Woodshedder

      Yes, I am considering removing the average price filter. Still, volume is also split-adjusted, and so I am going to need to account for that.

      • 0
      • 0
      • 0 Deem this to be "Fake News"
  3. Doug

    I don’t understand the open interested vs split adjusted. can someone explain?

    I know what splits are but I don’t get why the charts look so different if the market cap remains the same

    • 0
    • 0
    • 0 Deem this to be "Fake News"
    • Redshark

      First a technical introduction to Open Interest:

      Open Interest is actually a term for futures and not stocks. However, most programmers try to keep fields universal to the data they are associated with. And since the open interest field applies to futures, it also applies to stocks programatically speaking. Consequently, some data providers and technical analysis software platforms have an open interest field for stocks as a result of simplicity and not utility. However, generally this field would be NULL for stocks since no such information exist from many data providers.

      Premium Data cleverly uses this field to put the non-split adjust close in since no other data exist in this field for stocks. So users can go back and see what the price of a stock actually was on any given date. On the chart I provided Woodshedder of Microsoft the red line shows the non-slit adjusted price (or Open Interest as it is referred to by Amibroker and Premium Data).

      ****

      Generally, non-split adjusted prices are not important in backtesting because this price is absolute, and mostly we are concerned with prices on a relative basis over some period. In this case, Woodshedder was trying to filter out lower priced stocks. Without using non-split adjusted prices, he was ignoring what (I would guess) could be a significant portion of the stock universe.

      For example, assume for the sake of the conversation that Woodshedder took this backtest and turned it into a real-life trading system. Microsoft could have possibly been a trade prior to the middle of 1995. However, backtesting only using a filter of adjusted split price above $5 would not have included Microsoft (or any other similar stock).

      I hope this clarifies your question. This is one of those scenarios that is complex in understanding because we are not accustom to seeing the non-adjusted price. As I pointed out to Woodshedder, I can only think of a very few instances where this data would be meaningful, and I really have to give it an extensive amount of thought to come up with such scenarios.

      • 0
      • 0
      • 0 Deem this to be "Fake News"
      • Woodshedder

        Thanks Redshark for the excellent explanation. These are technicalities, but they are very important to consider and adjust for if we want accurate results.

        • 0
        • 0
        • 0 Deem this to be "Fake News"
  4. Toptick

    Hi, Wood:

    If your data source includes both split- and dividend-adjusted prices with non-adjusted prices (Yahoo does this), you could filter on non-adjusted prices but ‘trade’ the adjusted prices.

    Thx!

    • 0
    • 0
    • 0 Deem this to be "Fake News"
  5. Troy S.

    Do you get your de-listed data from Premium Data?

    • 0
    • 0
    • 0 Deem this to be "Fake News"
    • Woodshedder

      Yes, my de-listed is from Premium Data. By far the cheapest de-listed data I could find. I highly recommend doing business with them. Great people, great service.

      • 0
      • 0
      • 0 Deem this to be "Fake News"
  6. Woodshedder

    Hey folks, working my ass off today. I’ll have to check in later and answer some questions and leave some thoughts. Thanks for the great comments though!

    • 0
    • 0
    • 0 Deem this to be "Fake News"
  7. Jeff P

    This is an important piece. To Troy’s point, a post identifying and comparing historical data providers would, in itself, be terrific. I know, not very sexy — but hey — it’s system trading!

    • 0
    • 0
    • 0 Deem this to be "Fake News"
    • Woodshedder

      Good idea Jeff. I’m going to file that one in the “when I’m not feeling inspired” folder. Its nice to have those ideas in your back pocket for those times when the muse is gone!

      • 0
      • 0
      • 0 Deem this to be "Fake News"