Discussion in 'Strategy Building' started by dunitlongpole, Aug 13, 2006.

  1. Hi Aaron and fellow traders,

    I have been trading for about 3 years, 2 as a position trader and 1 as a day trader. I am interested in learing how to improve my trading through backtesting. Write now I do it manually, it takes a very long time. Is there a direction you could point someone like me whom want to learn backtesting. Is there a preferred book or software. I looked briefly at traderstudio, and that's about it. I day trade futures. Thank you in advance.

    #11     Aug 13, 2006
  2. Aaron


    I would recommend backtesting newbies try Tradestation. Also, take a look at the book "Trading as a Business" by Charlie Wright if you can find a copy (

    I currently use Wealth-Lab, but have used Tradestation in the past and think it is easier to learn and use.

    There is another thread currently talking about what platform to use for backtesting:

    Aaron Schindler
    Schindler Trading
    #12     Aug 14, 2006
  3. rickty



    Do you use Wealth Lab for auto-trading? If so, I assume it's with

    #13     Aug 16, 2006
  4. Markets change. If that 30 trades are enough... fine...
    #14     Aug 16, 2006
  5. tireg


    EDIT: Instead of trying to test on a generic 'x years/months/days', I would suggest testing on conditions and environments. Obviously the length of time for these conditions must be meaningful; generally a minimum of 1 year is what I like, but it can vary depending on your intended timeframe.

    In order to backtest properly you must understand the purpose of it, which is to get an intimate view of how your system(s) work in different market timeframes, types, and under different conditions. From this you can extrapolate in general terms how your system might perform under similar conditions. Anything more than this would assume too much.

    Sampson had it generally right.

    By this time you should have a good idea of the market conditions the system is meant for. For example, let's take one of the most popular types, a long-only trend following strategy. This would likely be targeted for a bull market condition. Note that there are different degrees of bull market, depending on the steepness of rise - data in the US stock market that ranges from 1995-2000, and all of 2003 will be an extreme bull, whereas 1990-1994 or 2004-2006 is a less 'steep' version - yet both are bull market types. This will be your 'in sample' market condition that you initially test on.

    Then tests must be performed for each 'out of sample' market condition so you know how the changes affect the performance in markets its not designed for - such as a bear market (2000 to 2002).

    Now, taking this idea a step further, one can also pick baskets of vehicles or portfolios to test on - in US equities, for example, this can be large cap, mid cap, and small cap.

    By the end of your first few runs, you should have a better idea of what types of market your system is suited for, as well as which type of vehicle tends to do better with it. You should also get a good feeling of how robust the system is - does it hold up across different markets and changing conditions? What are its strengths and weaknesses? Later on you can diversify across any and all of these parameters, tweaking the system for each vehicle - this goes into the next topic, optimizing.

    On the idea of optimizing, or changing certain parameters to fit your needs, you first must determine which parameter you want to optimize for: lowering MAX DD/Avg. loss, increasing APR % or Avg. win, increasing winning %, improving profit factor or sharpe, etc. You may find that improving your APR% in the 'in sample' market condition increases your MAX DD in out of sample conditions.. this is where you must make the tradeoff between a 'well rounded' system or an extreme-performance system depending on your preferences. Before, manually optimizing meant keeping all variables the same while changing just one, but luckily computers have made it a lot easier and some programs (WL) allow for up to 10 variables at a time, although it can eat up some processing power and can take a lot longer. Nonetheless, I still like seeing what changes to one or two related variables will have to the equity curve of various portfolios in different timeframes.

    OP, I know you meant for this to be for forex but I don't have much experience in that area but I'm sure you can apply the ideas to that market as well.
    #15     Aug 16, 2006
  6. Aaron


    I tried Wealth Lab for trading through IB, but there was some memory leak or something and after a couple hours my computer would bog down, the CPU would be pegged, and it ground to a halt. This was on intraday data -- examining every tick -- and was a couple years ago. Maybe a more recent version works better. And I wouldn't hesitate to recommend Wealth Lab for end-of-day trading.

    I use eSignal EFS script for automated trading. The orders are routed to IB through Dynaorder.

    Aaron Schindler
    Schindler Trading
    #16     Aug 16, 2006