How to do walk-forward testing?

Discussion in 'Strategy Building' started by BrooksRimes, Jun 7, 2005.

  1. Given a system which trades on 5 min bars, generate 30 trades per month and I have 36 months of data to test with.

    What are some good ways to WFT?

    How about optimize for 4 months, test out of sample for 1 month, then move forward 1 month and repeat?

    This will require 32(?) tests which is a lot of work.

    What about optimize on 6 months, test on 3 months, then move forward 3 months? This is 9-10 tests, more managable.

    Or is there a better way?

    What is the best, key statistic to first consider when optimizing? I lean towards Profit Factor. Second choice would be Avg P/L Per Trade. (I know DD and other factors must be considered)

    Thanks!
     
  2. JackR

    JackR

    There are lots of threads on optimization and sampling. If you'll look at a few of them you'll see that there are many more factors to consider than those you ask about. I'd suggest reading through a few of the threads and then reformulating your questions so that the answers pertain to what you really want to know.
     
  3. Brooks,

    Before you do anything, please read Roberto Pardo's book on optimization and walk forward testing. It will give you a good idea on how long you should backtest and what periods should be used for walk forward testing.

    Hope this helps.

    Good trading,
    Maji
     
  4. kut2k2

    kut2k2

    30 trades a month times 36 months is overkill IMO. Do you really think anything that happened more than, say, 360 trades ago has any relevancy whatsoever to what happens tomorrow? Personally I'd cut back to a year's data or 360 trades (whichever is longer), optimize the first two months, then walk forward each month thereafter. But that's just me. :)
     
  5. The more complex your system, the more (independent) trades should be in your optimization period.

    In general, however, I limit my optimization length because I want to see a longer testing period, not because there is a benefit to it.

    Without knowing anything about your system besides 30 trades/mo (so my opinion shouldn't count for too much), I would say 1 year optimization, and 6 month tests would be fine.

    Cents/share is important
    Sharpe ratio of equity curve is important