BACKTESTING: only 25% winners on MA crossovers?

Discussion in 'Automated Trading' started by clambill, Mar 8, 2009.

  1. What is SPM?
     
    #51     Mar 15, 2009
  2. All the Hershey aliases,helpers and those arrested development types controlled by his psychological programming all in one thread.Put all these 'people' on ignore.
     
    #53     Mar 17, 2009
  3. neye_eve

    neye_eve

    Backtesting the S&P against moving averages is something I've done recently, on a long term scale.

    Rules for backtesting:
    Rule 1) If a price crossover happens, you buy/sell at the closing price of that day (this assumes you have a good enough inclination of whether the crossing held that day).

    Rule 2) You follow this automatedly, buying one day, selling the next, regardless of "feeling" or artistry.

    Rule 3) You only trade based on closing prices.

    Results...

    Looking at this long term trend, here's a graph of it (attached).

    The vertical bars represent time spans of 10 years. So, in the first set of dots vertically (before the first line) are 5 year periods using this system. Because of the data I have (daily closing prices going back to 1951), I arbitrarily started with 1/1/1953 (all time spans start on the first trading day of the years involved). So, one of those dots is 1/1/1953 to 1/1/1958. Another is 1/1/1958 to 1/1/1963. Another is 1/1/1998 to 1/1/2003.

    The third vertical line then would be 30 year time periods, like 1/1/1973 to 1/1/2003 or 1/1/1968 to 1/1/1998.

    The vertical position represents the *total*, not annualized % difference in the model account comparing value of the 200 day moving average technique to a Buy and Hold technique for the time period.

    This graph tells me that a person following this technique has a small advantage over the person doing just a buy and hold, but that you can't tell ahead of time if you're going to end up better off or worse off.

    This stuff is of course old news to pro's, which I am not in any capacity. But, after looking at the pretty graphs and dreaming about 100 or 200 day moving averages and how much money *seemed* to be left on the table, I had to convince myself mathematically that there really is no free lunch, even on a long time scale when you're not looking for huge returns.

    It would have sucked to try the Moving Average back in the mid 70s when it would have left you 30% worse off over 30 years compared to buy and hold.

    Last statement - this graph looks really different if you include the first 3 months of 2009. Then there's a huge upward bias because it would have kept you out of the market all together from Late Nov 2008 onwards. You can fiddle with the start and end dates to see whatever results you want, really.

    As for authenticity, anyone can fully replicate this study by downloading the daily prices of ^GSPC from yahoo and making a spreadsheet that does exactly what I described above.

    Sorry in advance if this is a sucky first post.
     
    #54     Mar 17, 2009
  4. An interesting post, neye_eve. Thanks for sharing. :)
     
    #56     Mar 25, 2009
  5. neye_eve

    neye_eve

    It was unfortunately sobering :-( I wanted a free lunch with little effort ;)

    In any case, I'm going to keep doing backtesting on various systems to try to keep eliminating them so as to prove to myself that there's no magic bullet.

    Next up will be EMA's instead of SMA's, and then I'll take a look at some of the more popular candlestick patterns.

    The drawback to all of this testing is that it doesn't include volume, which is likely pretty darn important. As I go through this, I'll hopefully figure out a good way to incorporate that as well.
     
    #57     Mar 25, 2009
  6. toc

    toc

    should be no problem is end of the period the system has made some solid profits! :D
     
    #58     Mar 25, 2009
  7. Keep it to yourself,love.We don't need more H-ite aliases 'round these parts.Go bust on your own time.
     
    #59     Mar 26, 2009
  8. Gyles

    Gyles

    The main problem with crossover system is the lag of moving averages. Therefore, has anyone used a neural network to predict the crossovers a few days ahead or to reduce lag?
     
    #60     Mar 28, 2009