Backtesting

Discussion in 'Technical Analysis' started by jbusse, May 26, 2008.

  1. jbusse

    jbusse

    I'd like to backtest trends (mainly basic upward and downward trends), but I'm having trouble identifying trends with computer code. That is, I know a trend when I see it, but to exhaustively backtest a few thousand stocks over ~15 years, I need the computer to be able to identify it. For example, one possibility is to sort into deciles based on past return over some specified interval, with the top decile then categorized as the upward trending stocks and the bottom decile as the downward trending stocks. However, this is imprecise, and may even identify as upward trending a stock with one huge return followed by several below average returns. Any ideas on how I might proceed? Alternatively, does anyone know of software that does this type of backtesting?
     
  2. mark2

    mark2

    not sure if this help but you can tell the computer to identify trends based on the price and moving averages position based on different time frames... You can also use trend indicators to help to identify uptrend/downtrend candidates.
     
  3. kut2k2

    kut2k2

    http://www.elitetrader.com/vb/showthread.php?s=&postid=749116#post749116

    You should read the entire thread but in any case, I meant to say "use the signed version", not the unsigned version.
     
  4. jbusse

    jbusse

    Thanks for the help. The efficiency ratio appears to do the trick in most instances. However, suppose a stock goes up 20 one day and nothing for 19 days, compared to 1 each day for 20 days. These two have the same efficiency ratio, right? I guess a combination of the efficiency ratio plus a simple standard deviation would identify the first as an abrupt upward trend and the second as a gradual upward trend. Is there some other standard way of differentiating these two?
     
  5. kut2k2

    kut2k2

    None I know of.