Backtesting for confidence

Discussion in 'Strategy Building' started by BornToTrade, Sep 23, 2003.

  1. I found myself in April of this year questioning my trading method. I had been using the same strategy over the last few years, and was quite profitable. Then in April, something changed and I took a big hit.

    I trade an almost purely mecahnical system, although, sometimes I do take some descretion on it (which is part of the problem). I swing trade, and hold trades for 3-5 days.

    I began to question everything I'd done, why had it worked? why did it fail? had the markets changed? had I changed? Was it going to work again? Did I hit a fluke in the market cycle? I'm sure everyone goes through this from time to time.

    I set out to find out if I really had a system, or if I had just been lucky. I primarily use Metastock with a feed from Qcharts. I download data at the end of the day and determine all my entry / exit points for the following day. I use price movement and moving average, and I don't really use many "indicators". I guess you could call it an "adaptive channel" more than anything else. Trades don't happen every day. Maybe get a couple each week. I tend to take larger positions, because the risk, is, relatively low, and the win rate is pretty high. I do lose, but I win more.

    Since all my entry / exit is determined the day before, I figured backtesting would be pretty accurate. Nothing was going to change after the fact. Since I already screened stocks with Metastock, doing system tests was relatively simple. I ran test after test use a basket of 275 stocks, over the last 10 years. Testing, and retesting, refining my rules to make it trade exactly as I do for real.

    I had the advantage of having traded these stocks for real, so the backtest was actually checking my own work. I could recall many of the trades as I reviewed them. I got to compare the "what I did" with "what I should have" and I know the real $$ result. I also found the glaring error that got me started on this in the spring. It stood out on the chart like a sore thumb. So I know where and why I messed up, and I have adjusted my trading style. It was something I'd never been able to quantify, but there it was in black and white.

    I didn't like Metastocks system tester, because it lacked the one thing that I needed, which was a summary of the whole basket of stocks. It would summarize each one, but not the whole basket. So I bought TradeSim and added that to the process to see jsut what I really had.

    What I found out was, my system is pretty profitable. Over the last 10yrs it averaged about 80% winners, and the winners were 1.3:1 vs the losers. It doesn't use a dollar stop, so much as, well a time stop, but that really adjsuts to the stock itself. That was what I was worried about. It still may be be a flaw in the system.

    Then I got wondering. There were some "good" years in the late 90s that made the system very profitable, but were they raising the average over the 10 years and making it "seem" better. So I went back and tested each year individually. What I found surprised Me. Since 1993, every year, the winning % was almost the same. Ranging from 75% - 85%. What changed, and made the system the most profitable in 2000 and 2001 was that there were just more trades, but the averaged the same winning % as any other year.

    So my backtesting has done 3 things for me. #1, I've found where I have made errors in the past, and I have adjusted for it. #2 It has forced me to be more disciplined, and I am okay with that. I now know the reasons why. #3, it's given me much more confidence to let things play out like they need to. The losers will come, some larger than others, but I need to stick with the plan. I figure with the bubble of the 90s and the bear market after, and 9/11, it's a pretty good testing time period, for all kinds of conditions.

    So I am looking for some advice. First, I don't have the Enterprise version of TradeSim, so I can't do some of the more complex statistical calculations that are built into that. I'm not sure the extra $500 is worth it at this point. I know some people have done some monte carlo testing in Excel, and I was wondering if anyone could tell me how exactly to do that?

    And second, does anyone have any advice for automating my system? Pros and cons? Many of the trades have to be "caught" and screened for. If I miss some during the day, the trade has passed. I'd really just like to let it run. I've already had to define my criteria to do the testing, so automating should really be an "Easy" transition.

    I have the actually report from TradeSim. I'll post that as well later tonight.

    I know backtesting isn't a guarantee of anything, but what it has done, is made me believe more in what I'm doing, and to stop thinking about it so much. That alone was worth the exercise.
     
  2. H2O

    H2O

    You can get Monte Carlo software for free here :

    http://www.tickquest.com

    It's called Equity Monaco

    Hope this helps
     
  3. Thanks H20 I'll take a look.

    Here is the results from TradeSim. It uses a fixed dollar for every trade. So even as the equity grows, I'm not taking exponentially larger positions. I can take more positions, and allow the position size to grow slowly as the equity builds. All the trades are all ones that I could reasonable enter and exit without any real problems.
     
  4. and here is the equity graph.
     
  5. H20 - Thanks for that program link. I got it and it is exactly what I was looking for. I'm going to run some tests tonight!
     
  6. ...IMO there is a fundamental flaw in backtesting a strategy on individual stocks. Given the crookedness of the system (specialist/MM games, insider trading, price manipulation, hidden criminal activity, concealed financial events, ad nauseam), it is optimistic to think that a probabilistic method requiring some degree of statistical stationarity can be appled. I believe that it is workable only for stocks in a large ensemble, such as an index. IMO, if backtesting appears to work on an individual stock, it is because of an underlying secular bias in the entire market, which you don't need backtesting to play. I advise specializing in one instrument which you can understand intimately (both analytically and intuitively) by trading it every day. Best regards. - Mike