Seeking robustness

Discussion in 'Trading' started by jrkob, Sep 18, 2003.

  1. jrkob


    Let's assume the very simple following strategy: buy when a fast moving average crosses upward a slow moving average, and sell when the fast moving average crosses downward the slow moving average. I am always in the market.

    I want to test this strategy on say 800 bars: let's call them b1 to b800.

    I split these 800 bars into 2 groups: b1 to b400 (Group 1), and b401 to b800 (Group 2).

    I then determine the optimum moving average speeds for Group 1 and Group 2.

    The results are:

    Group 1: optimum speeds are say 10/12. This is not a spike in the middle of losing combinations, all surrounding combinations also show very acceptable results: 10/11, 13/13, 9/13, etc etc... but of course, not as good as 10/12.

    Group 2: optimum speeds are say 20/22. This is not a spike in the moddle of losing combinations, and all surrounding combinations also show very acceptable results: 20/21, 23/23, 20/23, etc etc... but of course, not as good as 20/22.

    Group 1 and Group 2 were actually a little bit different in nature in a sense that Group 1 was a period showing nice trending periods, while Group 2 was a period showing fewer and slower trends.

    For trading in real time now, eg starting at b801, I am thinking of using the couple 11/21. 11 stands for the average of 10 and 12 (optimum fast moving average in Group 1 and Group 2), and 21 stands for the average of 20 and 22 (optimum slow moving averages in Group 1 and Group 2).
    I do that because I think this method is more robust than just taking the latest optimum couple 20/22 hoping that the nature of the market doesn't change too much.

    Note that the moving average concept works on its own reasonably well to the index I'm trading, which shows some nice tradable trends, but having variable speed and length of course...

    Am I fooling myself ? Or does that methodology will likely bring more robustness to my system ?

    Thanks a lot !

    (the above moving average crossing system isn't exactly the system I am using, but I over-simplfied to make it easier to explain here. My question isn't about the system, but about methodology in seeking robustness).
  2. JRKOB - From my experience the larger question is whether or not ma crossovers work at all. I spent about a year backtesting ma crossovers daily and intraday on index issues and attempting to trade them. I concluded, after losing money, that the optimized pairs are simply curve fitted to the data and have zero predictive value. If you have reason to believe otherwise, I would like to hear it. Best regards. - Mike
  3. jrkob


    Please refer to the last sentence of my initial post.

    The point of methodology I am enquiring about can be applicable to many different type of strategies.

    The system in itself isn't my question at all... like you, I can't make simple ma crossing work in many markets.
  4. jrkob


    ... especially not in the US markets actually...
  5. IMO, there is no simple answer. For an excellent book on this, I suggest Stridsman's, TRADING SYSTEMS THAT WORK"

    It is not really about trading systems rather it is a very in-depth look at how to tell if the ones you develop will work well in the future. CAUTION: heavy duty statistics are involved.

    I've used one of the ideas: I use random entries to optimize exit parameters.

    In keeping with the book's themes, I now look statistically at how recent trades compare to older ones. I look for statistical consistency between the most recent 25 trades and the older ones.

    An example of this from recent stock tests:

    64% winners
    avg trade $63
    profit factor=5.6
    86 trades

    Looks kinda good. But, the most recent trades have a Z=-1.5 which tells me that they are statistically worse (93% confidence) than the older trades and that tells me the system is not stable and I won't trade it.

    OTOH: Another stock,

    55% winners
    avg trade $38
    98 trades
    profit factor=3.2

    The numbers are not as good but it is stable and I've been trading it for over 8 months.

    I do this instead of walk forward testing since I use Tradestation and it does not have this capability.

  6. DT-waw



    I would use many systems with different parameter sets and many types of MA (EMA, SMA, TEMA, DEMA, WMA, JMA) instead of one system with some specific MAs lengths.

    That's a pretty strong statement - MA crossovers have zero value. I attach a combined equity curve for 10 S&P systems traded together. 1 contract is traded for the whole period for each system (no position size management). Testing period is over 2 years. Worst drawdown 700 pts. Total net profit over 8,000 pts. These systems are based on various MAs: SMA, EMA, DEMA and TEMA - with profit targets. Do little math to see what % returns this strategy made with aggressive position size mgmt...
  7. jrkob


    Doug: thanks a lot for your input. Can you email me at ? I'm using another concept and would like to know if you're using it.

    DS: you're definately right, I guess the reason why I was saying that I couldn't make ma work with a lot of indices was because of the drawdown basically. 700pts... GLOUPS ! That represents about 50% of the value of the S&P right ? (I'm not trading anything in the US). But I agree to say that if you have balls big enough, and are patient, and are able to sustain extensive period of drawdown, I guess one can make money out of it, definately. On the index I'm trading, it definately works (and EMA much better than SMA for instance), now the reason why I'm not trading that kind of strategy is simply because from a psychological point of view I can't sustain a period of 6 months losing money...:(
  8. I'm sure DT would agree the maxdd is large but he is really trying to emphasize the return on the maxdd. All maxdd's can be tamed with money management.

    You bring up an interesting concept in averaging the profitable parameters. If you are going to do so, I suggest testing it. Simply average them and run a test on group and 1 and 2. Or you could average them and run the test with a 1 line ma system. Long when up etc.
  9. mg_mg


    A trading system involves two things: trend (buy or sell) and timing.

    MA crossing is a technique for timing for most people IMHO.

    One need one more component for determine the trend if ma crossing is used as a timing component.

    Here is a proposal if one really want to use ma crossing for both trend and timing:

    Use ma crossing in high time frame as trend component, and ma crossing in low time frame as timing component.
  10. MAs only works during trending phase. So you must try to know when you are in such phase or not. As already suggested you could use a higher time frame or use indicator that indicates that the market is trending or not like ADX (see other posts on that).
    Only after that you can make some useful optimisation.

    #10     Sep 19, 2003