Trade FOREX with FXCM

  • Award-Winning Platform
  • 24/7 Customer Support
  • Trade Directly on Charts
  • Free $50K Practice Account
Register


Results 1 to 7 of 7

Thread: Backtest timeframe

  1. #1
    plainv is offline Member
    Join Date
    Jan 2011
    Posts
    5

    Backtest timeframe

    I've got a question to all experienced algo traders and especially the DailyFX moderators.

    After developing my strategy advisor and modifying it so that it creates the best results, i am now into analyzing its backtest results.

    In those nice DailyFX webinars the moderators often point out that its important to recognize that performance on historical data doesnt give you any security that a strategy will perform in the future as well. So i have always tried to remind myself about that if i saw a nice historical performance on my strategy.

    So how would you judge a strategy that performs like this:

    Symbol EURUSD
    Backtest period: 2002/01/01 until 2010/12/31
    Return on Initial Capital: 17367 %
    Return on Max Strategy Drawdown: 195
    Max Strategy Drawdown (%): -27

    There was only one single month that was negative.

    So to me after testing it on such a long period of 8 eight years, where we had different markets like 2002 crash, ranging, 2008 crash etc., it performed very well, that should indicate clearly that its a robust strategy.

    What do you think about the timeframe of a backtest? The longer it is the more sure you can be about the performance in the future?

    Would you confirm the assumption, "if you have a strategy that performs in a variety of different market circumstances and over period of several years there is a high probability that this performance will remain in the future" ?

    Thanks!

  2. #2
    RobE is offline Member
    Join Date
    Dec 2010
    Posts
    92
    Quote Originally Posted by plainv View Post
    I've got a question to all experienced algo traders and especially the DailyFX moderators.

    After developing my strategy advisor and modifying it so that it creates the best results, i am now into analyzing its backtest results.

    In those nice DailyFX webinars the moderators often point out that its important to recognize that performance on historical data doesnt give you any security that a strategy will perform in the future as well. So i have always tried to remind myself about that if i saw a nice historical performance on my strategy.

    So how would you judge a strategy that performs like this:

    Symbol EURUSD
    Backtest period: 2002/01/01 until 2010/12/31
    Return on Initial Capital: 17367 %
    Return on Max Strategy Drawdown: 195
    Max Strategy Drawdown (%): -27

    There was only one single month that was negative.

    So to me after testing it on such a long period of 8 eight years, where we had different markets like 2002 crash, ranging, 2008 crash etc., it performed very well, that should indicate clearly that its a robust strategy.

    What do you think about the timeframe of a backtest? The longer it is the more sure you can be about the performance in the future?

    Would you confirm the assumption, "if you have a strategy that performs in a variety of different market circumstances and over period of several years there is a high probability that this performance will remain in the future" ?

    Thanks!
    I am no expert but here is my 2 cents.
    To answer your question realty would need to some more about your strategy,first what time resolution does it use, if it is less than 15min I would suggest your results are reflecting flaws in the backtesting system, similarly if the strategy uses small target profit or stop losses I would suggest the results are due to system limitations, I have myself written strategies that match or better your result but which in a live environment are incapable of ever making a profit not even for a single day.

    Personally what I would do to verify the accuracy of such a result is this.

    1) retest with the bar magnifier on and set to 1 minute ticks, does that still show the same level of profitability.
    2) retest the last two weeks of data with bar magnifier on using tick by tick resolution, does the result match that shown in your original back test for the same period.
    3) examine the original back test, look at the points where it takes profit and reopens a position, see if these make sense and that the system is not in fact opening positions at prices that would be impossible to have achieve in the real world.
    4) ensure that one way or another you have allowed for the spread, either you account for it by adding a commission or by using extended testing with bid and ask data.

    If you do that and you still think you have a great strategy forward test it for one week. What you can do is open ST load your strategy into a chart and then leave it open for one week, even though it is not running in auto mode it is taking the tick data and it is getting closer to a real worl situation.

    If after that week it showed the same level of performance that you had in your back test then open a demo account and run it in auto mode for one week on that demo account.

    If after that week it is still turning in results that match your original testing then take it live with a single lot and congratulate yourself.

    Then if it runs for a month profitably reflecting your tested results you could think about using it actively.

    Rob

  3. #3
    Jeremy Wagner's Avatar
    Jeremy Wagner is offline DailyFX Course Instructor
    Join Date
    Sep 2008
    Posts
    1,051
    Quote Originally Posted by RobE View Post
    I am no expert but here is my 2 cents.
    To answer your question realty would need to some more about your strategy,first what time resolution does it use, if it is less than 15min I would suggest your results are reflecting flaws in the backtesting system, similarly if the strategy uses small target profit or stop losses I would suggest the results are due to system limitations, I have myself written strategies that match or better your result but which in a live environment are incapable of ever making a profit not even for a single day.

    Personally what I would do to verify the accuracy of such a result is this.

    1) retest with the bar magnifier on and set to 1 minute ticks, does that still show the same level of profitability.
    2) retest the last two weeks of data with bar magnifier on using tick by tick resolution, does the result match that shown in your original back test for the same period.
    3) examine the original back test, look at the points where it takes profit and reopens a position, see if these make sense and that the system is not in fact opening positions at prices that would be impossible to have achieve in the real world.
    4) ensure that one way or another you have allowed for the spread, either you account for it by adding a commission or by using extended testing with bid and ask data.

    If you do that and you still think you have a great strategy forward test it for one week. What you can do is open ST load your strategy into a chart and then leave it open for one week, even though it is not running in auto mode it is taking the tick data and it is getting closer to a real worl situation.

    If after that week it showed the same level of performance that you had in your back test then open a demo account and run it in auto mode for one week on that demo account.

    If after that week it is still turning in results that match your original testing then take it live with a single lot and congratulate yourself.

    Then if it runs for a month profitably reflecting your tested results you could think about using it actively.

    Rob
    Rob, I think you are touching on something here that is important. Likewise, I have spent many of hours creating and backtesting strategies only to find something wrong with one of my assumptions or a change in the market conditions.

    I consider backtesting like watching a professional baseball game. Ideally, I would like to sit right behind home plate and get a great view of the field. So backtesting simply gets me to the right ball park...a good back test doesn't mean I have great seats...

    I do believe that if you find a nice backtest, that it is wise to forward test it live in the smallest trade size. That way, if the strategy passes that test, you are getting closer to the seats behind home plate. If you want to forward test in a demo, you can do that as an intermediary step. Eventually, you should forward test in the smallest trade size so you have a more accurate picture of spread cost and slippage.

    To me, I will learn more out of the forward test as that is the live environment and I'll know if it is a good strategy then.

    That is a great question and I'm glad you brought it up!


    Take your trading to the next level with DailyFX Educational Services.

    Twitter @JWagnerFXTrader

  4. #4
    plainv is offline Member
    Join Date
    Jan 2011
    Posts
    5
    OK. Thanks to both you!

    Its using 15M and 60M charts, i chose them because i know form manual trading that those lower timeframe are noisy most often time.
    The stop target is 10 and profit target 60. Those values came from genetic optimization.

    A forward test running right now in my demo account..i am excited how it performs during the non-farm-payrolls today.

    I havent used this bar maginifier so far. So this will be next thing to test. But i didnt quite unterstand why this is useful to me as i want to trade higher timeframes anway??

  5. #5
    Thomas Long's Avatar
    Thomas Long is offline DailyFX Power Course Instructor
    Join Date
    Nov 2007
    Posts
    2,364
    Quote Originally Posted by plainv View Post
    OK. Thanks to both you!

    Its using 15M and 60M charts, i chose them because i know form manual trading that those lower timeframe are noisy most often time.
    The stop target is 10 and profit target 60. Those values came from genetic optimization.

    A forward test running right now in my demo account..i am excited how it performs during the non-farm-payrolls today.

    I havent used this bar maginifier so far. So this will be next thing to test. But i didnt quite unterstand why this is useful to me as i want to trade higher timeframes anway??
    It's possible that you could have a 15-minute or hourly candle with a range outside of your 10-pip stop and or 60-pip target. Just looking at the 15-minute or hourly chart will not tell you which was hit first, so there is no way to tell if the trade was a winner or a loser. The Bar Maginifier should do that as it will show the trading within the candle.
    Enroll in our online DailyFX Course today and get personalized instruction from our team of expert traders 24 hours a day. We have taught over 25,000 students and in our online courses in the past. The new DailyFX Course has nearly 600 minutes of content delivered via video so you can learn at your own pace. Join the instructors in live webinars where they will show you how to use the highlighted tool in current market conditions. Click here to get more information.

  6. #6
    plainv is offline Member
    Join Date
    Jan 2011
    Posts
    5
    Thanks again!

    I have added the bar magnifier without a change in performance. BUT what did change everything was adding bid AND ask! Just like RobE suggested in point 4)

    It converts a performance of +17367% into -86%!

    Thats a huge difference to be honest!
    I guess this shows that my strategy isnt what i thought it was!

    So far the forward testing on my demo account shows good performance, but now i think its a matter of time until a drawdown starts.

  7. #7
    Matt Russell's Avatar
    Matt Russell is offline DailyFX Course Instructor
    Join Date
    Jul 2008
    Posts
    660
    Quote Originally Posted by plainv View Post
    Thanks again!

    I have added the bar magnifier without a change in performance. BUT what did change everything was adding bid AND ask! Just like RobE suggested in point 4)

    It converts a performance of +17367% into -86%!

    Thats a huge difference to be honest!
    I guess this shows that my strategy isnt what i thought it was!

    So far the forward testing on my demo account shows good performance, but now i think its a matter of time until a drawdown starts.
    Yes, always remember to consider the bid/ask spread when back testing strategies. It is a common mistake that you will make less and less moving forward.
    Enroll in our online DailyFX Course today and get personalized instruction from our team of expert traders 24 hours a day. We have taught over 25,000 students and in our online courses in the past. The new DailyFX Course has nearly 600 minutes of content delivered via video so you can learn at your own pace. Join the instructors in live webinars where they will show you how to use the highlighted tool in current market conditions. Click here to get more information.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Disclaimer: Trading foreign exchange on margin carries a high level of risk, and may not be suitable for all investors. The high degree of leverage can work against you as well as for you. Before deciding to trade foreign exchange you should carefully consider your investment objectives, level of experience, and risk appetite. The possibility exists that you could sustain a loss of some or all of your initial investment and therefore you should not invest money that you cannot afford to lose. You should be aware of all the risks associated with foreign exchange trading, and seek advice from an independent financial advisor if you have any doubts. Any opinions, news, research, analyses, prices, or other information contained on this website is provided as general market commentary and does not constitute investment advice. Forex Capital Markets LLC. will not accept liability for any loss or damage, including without limitation to, any loss of profit, which may arise directly or indirectly from use of or reliance on such information.