Developing a Trading System Step by Step

Discussion in 'Strategy Building' started by Murray Ruggiero, Jan 16, 2006.

Do you trade mechanical systems

  1. Yes, I buy and trade commerical systems.

    24 vote(s)
    4.7%
  2. I develop and trade my own systems.

    350 vote(s)
    69.2%
  3. I trade both commerical and systems I develop.

    44 vote(s)
    8.7%
  4. I don't believe in mechanical trading systems.

    88 vote(s)
    17.4%
  1. Murray Ruggiero

    Murray Ruggiero Sponsor

    You are correct using any indicator-based approach introduces lag, but also it reduces the noise. In our example we used simple moving averages. There are many other types of smoothing methodologies that have less lag, for example Kalman filters. Most of these add a momentum component back into the average to try to speed it up but they add some noise back in.

    This topic is very interesting and I will discuss it in another thread later. The purpose here is to show how to develop a simple but profitable and robust system using simple tools. By using simple moving average, this system could be coded in TradeStation or even Excel, not just in TradersStudio.

    Our example here is educational, not to develop the best system of all time. We will end up with a good one, even using such crude tools.

    One thing you need to remember is that the Triple MA is only a piece of the system not the system itself. I picked this as the trend detection component, because my plan is to trade in the direction of the long term trend on a short term counter trend move, I wanted to make sure that the trend was real, the Triple moving average might have lag, but it is very good at detecting long term trends.

    I will finish my analysis of my optimization runs and post this weekend. Then I will add the next piece of the system
     
    #41     Jan 28, 2006
  2. Picking MA period is tricky. If it's too short, you get a lot of fake signals. If it's too long, you get lagging signals.
     
    #42     Jan 29, 2006
  3. Hi!why not some different types of moving average for example volume weigthed or DEMA or one that would be really intresting is predicted moving average.

    Also according to robert colbys book i think the smaller the timeframe on the moving average the better they earned
    i think 2, 3, and five for example they was the best they capture the long trend and got out quick they was right only 1/3 and wrong 2/3 the bad thing about this was that colby did not include comissions.

    Best Regards John
     
    #43     Jan 30, 2006
  4. Murray Ruggiero

    Murray Ruggiero Sponsor

    I have many different types of moving average in TradersStudio. I wanted to keep it simple so that people only using Excel could follow along without having to do too much coding to understand how the logic works.

    Most people could not code any of the advance moving averages, so they could only use them if they are built in.
     
    #44     Jan 30, 2006
  5. ok thats a good point, i will follow your thread and hoping that it leads to a great system or at least some good ideers.

    ps. Do you know about the predicted moving average it seems very intresting but also very expensive.

    Best Regards John
     
    #45     Jan 30, 2006
  6. Murray Ruggiero

    Murray Ruggiero Sponsor

    There are a lot of variations of them. Some have been put in the public domain. Look at John Ehlers work on them, he has published the formulas for some of them but , most require understand Trig functions and converting Degree to rads to code.
    We have some of these built into TradersStudio.

    A simplier class of these are Kalman filters, A over simplified explanation is that they add back in the momentum term to speed up the average.
     
    #46     Jan 30, 2006
  7. BENG

    BENG

    How do you determine the Step number for each MA?

    Would you say the finally set of MAs would display the general characteristics of short, medium, and long term trends in most markets?

    Can we rank the optimization by sharpe ratio?

    Is profit factor more important than sharpe ratio?

    Nearly all markets do well if we only go long, should the set of MAs that make the least drawdown in short trades be the most dynamic set of MAs?

    How long did it take you to run the optimization? Would TradersStudio run a lot faster than TradeStation? If so, why?

    Thanks!
     
    #47     Jan 30, 2006
  8. You will find that the strategy for using this info depends more on the exit approach than the entries.

    He is espousing:

    "We will test the premise that many trends are noisy and we get a market breakout, pullback and then a real move. We will develop a trend following system which trades on a pullback in a trend after a trigger to indicate the trend has continued."

    and, further, he says:

    "I picked this as the trend detection component, because my plan is to trade in the direction of the long term trend on a short term counter trend move, I wanted to make sure that the trend was real"

    By this you can see that he does have and entry plan. You may know how to do the exit on this type entry but as yet it is not mentioned. He is still focussed on making sure he is out of the market when the trend starts and, further, he is going to enter only after the first trend peak has occurred.

    If you are not careful in calculating the stuff you desire, you could get into some conventions that are based on actual trend trading instead of partial trends trading.

    For those that are doing optimizations of trend analysis and trend trading, what is going on here is the third trade of the trend.
     
    #48     Jan 30, 2006
  9. Murray Ruggiero

    Murray Ruggiero Sponsor

    Since we are testing it on a portfolio, I would say that in general the best set of parameters would represent an average set of characteristics for short, medium and long-term trends on the basket of markets.

    In terms of Sharpe ratio, I don’t like it as a performance measure because it penalizes sets of parameters that have volatility but positively sloping equity curves. A parabolic upward sloping equity curve would have a relatively low Shape ratio because of volatility.


    I think we want to see at acceptable performance on the short side. Markets do not in general act the same on the long and the short side. It ok to develop different rules for the long and short side as long as the system has enough trades. Human psychology is different on the long side versus the short side; people would rather buy than sell.

    It is not the issue if TradeStation is faster than TradersStudio on the optimization. It is the fact that TradeStation can't optimize across a portfolio of markets. It can only handle one at a time. It kind of like saying an X-ray is cheaper than a MRI; they don't give you the same quality of analysis.

    I realize I am using very simple technology here with my “core methodology” being the three moving average crossover. The point was to develop a system step by step, I wanted to base each piece on simple technology and show a reasonable solution at the end of the process. Yes, this system will pick the middle of wave three or “C” wave in Elliott terms, but my goal is to try to get rid of noisy trades. I will discuss exits after we have developed and tested this systems as a stop and reversal type system. This way we have a baseline to see if our exit methodology helps or is just added curve fitting.
     
    #49     Jan 30, 2006
  10. Murray Ruggiero

    Murray Ruggiero Sponsor

    Here is my analysis relating to the optimization results. It is contained in the PDF attachment.
     
    #50     Jan 30, 2006