Anchored Walk Forward Optimization to Avoid Curve Fitting

Discussion in 'Automated Trading' started by fiverr, Sep 14, 2016.

  1. fiverr

    fiverr

    Hi there,

    I am looking for some feedbacks. My trading logics are on the 30M chart and I am optimizing from Jan 1, 2010 to Jan 1, 2016. My out-of-sample data step is 6 months and I am optimizing with 6 parameters. What are my chance of curve fitting with these parameters.

    Many thanks.
     
  2. IAS_LLC

    IAS_LLC

    100% . You need to provide much more detail about your optimization process and trade logic if you hope to get a worthwhile answer.
     
  3. fiverr

    fiverr

    Here are my parameters:

    1) take profit from $60 to $200
    2) Stop loss from $100 to $200
    3) LWMA Moving Average 1 period 30, level values from -30 to 30
    4) SMMA Moving Average 2 period 30, level values from -30 to 30
    5) LWMA Moving Average 3 period 30, level values from -30 to 30
    6)SMMA Moving Average 4 period 30, level values from -30 to 30
     
  4. I would bet a good chunk of my trading portfolio that you'll over-fit...but why not take guidance from your out-of-sample results? Have you already done the analysis?
     
  5. Metamega

    Metamega

    From my research this becomes more art then science.

    Right off the bat your out of sample results will tell you your overfitting. Sample A returns 87% but out of sample A returns 4%.... Obviously you overfitted....

    Also a big portion of it would be the number of trades( your sample size). If it's taking 30 trades in 6 months off 1 minute bars, I wouldn't consider that a good sample size for the amount of bars in the sample data.

    Also with something like Moving Averages, it'll be very easy to overfit if your optimization target is simply looking for best net returns. You'll always find some sort of pair of MA that find a homerun in the sample. If you optimize for something like CAR/MDD or MDD or number of trades, perhaps you'll find some tiny edge.
     
    Last edited: Sep 14, 2016
  6. fiverr

    fiverr

    What software are you using for your WFO?
     
  7. I use R. That said, what's best for you depends on your background, skill set and objectives. I mostly use R because I learned it during my masters and so I'm already familiar with its extensive statistical capabilities. I'm sure others will have other suggestions.
     
  8. Metamega

    Metamega

    I use Amibroker
     
  9. Amibroker is good. I use it with Price Action Lab which generates code for it for complex price action strategies. It's a winning combination. You can also use R with Amibroker. R is good for things like statistical analysis and machine learning. For trading strategies I prefer a proven platform like Amibroker that minimizes development time.
     
  10. I really appreciate that comment, bashatrader. I've actually been considering combining R with something like Amibroker and was getting around to asking someone about it.

    I don't really use any of the standard "strategies" though. Let me think up a couple examples to illustrate what I do and then would you mind me asking if you think Amibroker would be good for them?
     
    #10     Sep 20, 2016