Best lookback period when backtesting? - futures io
futures io



Best lookback period when backtesting?


Discussion in Traders Hideout

Updated
      Top Posters
    1. looks_one jaybedreamin with 4 posts (1 thanks)
    2. looks_two Jmang with 2 posts (0 thanks)
    3. looks_3 CannonTrading with 2 posts (0 thanks)
    4. looks_4 Tymbeline with 1 posts (1 thanks)
    1. trending_up 499 views
    2. thumb_up 2 thanks given
    3. group 7 followers
    1. forum 9 posts
    2. attach_file 0 attachments




Welcome to futures io: the largest futures trading community on the planet, with well over 150,000 members
  • Genuine reviews from real traders, not fake reviews from stealth vendors
  • Quality education from leading professional traders
  • We are a friendly, helpful, and positive community
  • We do not tolerate rude behavior, trolling, or vendors advertising in posts
  • We are here to help, just let us know what you need
You'll need to register in order to view the content of the threads and start contributing to our community.  It's free and simple.

-- Big Mike, Site Administrator

(If you already have an account, login at the top of the page)

 
Search this Thread
 

Best lookback period when backtesting?

(login for full post details)
  #1 (permalink)
 jaybedreamin 
New York City
 
Experience: Intermediate
Platform: NinjaTrader
Trading: Futures
 
Posts: 17 since Feb 2023
Thanks: 4 given, 7 received

When backtesting, how far back in time do you usually prefer to observe a profitable system?

Let's say for example, a strategy was significantly profitable in the last 2 years, but in the years prior to that..not so much so. Would you continue to move forward with it?



- Jay

Started this thread Reply With Quote

Can you help answer these questions
from other members on futures io?
Tradingview Phone Call Alert
Trading Reviews and Vendors
ES ATR Volatility
Emini and Emicro Index
 
Best Threads (Most Thanked)
in the last 7 days on futures io
NinjaTrader Brokerage Services (www.ninjatraderbrokerage …
151 thanks
Big Mike in Ecuador
63 thanks
New NinjaTrader
41 thanks
Selling Options on Futures?
12 thanks
Gradient Color Bars
7 thanks
 
(login for full post details)
  #2 (permalink)
Jmang
Chicago, IL
 
 
Posts: 3 since Jan 2023
Thanks: 0 given, 0 received

For me that would depend on if it's a short term or a long term strategy. For how long does this strategy dictate that you keep your trades / positions open?

Reply With Quote
 
(login for full post details)
  #3 (permalink)
abev
seattle washington
 
 
Posts: 57 since Feb 2019
Thanks: 10 given, 25 received



jaybedreamin View Post
When backtesting, how far back in time do you usually prefer to observe a profitable system?

Let's say for example, a strategy was significantly profitable in the last 2 years, but in the years prior to that..not so much so. Would you continue to move forward with it?



- Jay

Hey Jay; Depends upon your strategy's timeframe. If you're swing trading in the daily chart, and volatility of the instrument has been roughly the same during those two years, I'd say your time frame is two years (or 480 days) of daily candles. Round up to 500. If your trading in the 1 hour chart, then the past 500 hours, the one minute chart, then the past 500 minutes.

That's the basic answer to your question but leaves a lot out when in comes to back testing.

E.g., to differentiate between upswings due to positive economic performance and upswings due to ...oh... prolonged stock buybacks, I back test enough periods to catch a sustained down market, up market, and (if I'm lucky) sideways market. I perform a walk forward and then look at the walk forward intervals to see how the strategy performed in the up, down, and sideways market. If the overall affect of the strategy is positive, I look first for consistency between markets -- i.e. are all the down markets more profitable than the up markets, etc. Then I look at what inputs change that result. Then I decide what the current market is doing and apply the strategy to the past 500 periods and play with the inputs.

And I consider that the tip of the iceberg when it comes to back testing. Back testing is notorious for being inaccurate for a host of reasons. The most obvious is the oft seen statement "Past results does not guarantee future results." or something similar. Another is the temptation to follow the results of a curve fitting back test. I consider back testing to be best used as an indicator that adds a few percentage points of probability to your strategy. E.g. when back testing shows me a 70% win rate and a profit factor of 3.5 or something like that, I feel more comfortable with the possibility of at 51% or better chance of being profitable over a series of trades. I don NOT expect a 70% win rate or a p 3.5 profit factor.

Hope that helps on some level or another.

Reply With Quote
 
(login for full post details)
  #4 (permalink)
 CannonTrading   is a Vendor
 
 
CannonTrading's Avatar
 
Posts: 201 since Mar 2013
Thanks: 69 given, 162 received

Like said before me it depends on what time frame you are using for your system?

Hourly chart? daily chart?
perhaps volume or range bar charts that are very short term?
Also depends on the market? specific contract?
Does the system works well on more than one market?

PM with any questions about Cannon Trading (800) 454-9572 (310) 859-9572. Trading commodity futures, forex and options involves substantial risk of loss. The recommendations contained in this post are of opinion only and do not guarantee any profits. These are risky markets and only risk capital should be used. Past performance is not necessarily indicative of future results.
Follow me on Twitter Reply With Quote
 
(login for full post details)
  #5 (permalink)
 jaybedreamin 
New York City
 
Experience: Intermediate
Platform: NinjaTrader
Trading: Futures
 
Posts: 17 since Feb 2023
Thanks: 4 given, 7 received

Thanks for the replies all, I guess should've been more clear. I was talking about intraday strategies, say on a 5 minute chart. Is 2 years of backtest data enough? What if the strategy proved to be profitable in the past 2 years, but not in the 2 years prior to that. Would you move forward with it in terms of further development and possibly simulation testing?

Started this thread Reply With Quote
 
(login for full post details)
  #6 (permalink)
Jmang
Chicago, IL
 
 
Posts: 3 since Jan 2023
Thanks: 0 given, 0 received

> What if the strategy proved to be profitable in the past 2 years

How profitable was it?

> Would you move forward with it in terms of further development and possibly simulation testing?

Yes, I'd move forward -- why not go ahead with some live simulated testing? The sim testing will give you more data to evaluate the strategy.
The main cost of going forward with simulated testing is the opportunity cost of time spent getting that extra data, isn't it? The question in my mind would be: what are the odds that this strategy will pan out to be profitable, and is it worth spending the time required to find out?

Reply With Quote
 
(login for full post details)
  #7 (permalink)
 jaybedreamin 
New York City
 
Experience: Intermediate
Platform: NinjaTrader
Trading: Futures
 
Posts: 17 since Feb 2023
Thanks: 4 given, 7 received


CannonTrading View Post
Like said before me it depends on what time frame you are using for your system?

Hourly chart? daily chart?
perhaps volume or range bar charts that are very short term?
Also depends on the market? specific contract?
Does the system works well on more than one market?


5 minute bars, intraday strategy. MES and MNQ only. Proved to significantly profitable in 2022. on MES > 20% return on a 50k account, after commission and slippage. Unprofitable in 2019 and 2020 but only small red on the year.

I was trying to get feel of how others decide to move forward with a strategy. Some folks need 5, 10+ years of profitable results so I am wondering if just 2 is enough.

Started this thread Reply With Quote
 
(login for full post details)
  #8 (permalink)
 jaybedreamin 
New York City
 
Experience: Intermediate
Platform: NinjaTrader
Trading: Futures
 
Posts: 17 since Feb 2023
Thanks: 4 given, 7 received


Jmang View Post
> What if the strategy proved to be profitable in the past 2 years

How profitable was it?

> Would you move forward with it in terms of further development and possibly simulation testing?

Yes, I'd move forward -- why not go ahead with some live simulated testing? The sim testing will give you more data to evaluate the strategy.
The main cost of going forward with simulated testing is the opportunity cost of time spent getting that extra data, isn't it? The question in my mind would be: what are the odds that this strategy will pan out to be profitable, and is it worth spending the time required to find out?

+20% return on 50k capital in 2022, meh results in 2021 and negative in 2019 and 2020 but tiny red after commission and slippage.

Good point about opportunity cost. I guess it wouldn't hurt to throw it in a sim for a month and see the results

Started this thread Reply With Quote
The following user says Thank You to jaybedreamin for this post:
 
(login for full post details)
  #9 (permalink)
 CannonTrading   is a Vendor
 
 
CannonTrading's Avatar
 
Posts: 201 since Mar 2013
Thanks: 69 given, 162 received

I would probably run it until i see it is running out of steam or behaves "out of character".
Would not hurt to run it back a bit more and evaluate results based on volatility / ATR?

PM with any questions about Cannon Trading (800) 454-9572 (310) 859-9572. Trading commodity futures, forex and options involves substantial risk of loss. The recommendations contained in this post are of opinion only and do not guarantee any profits. These are risky markets and only risk capital should be used. Past performance is not necessarily indicative of future results.
Follow me on Twitter Reply With Quote
 
(login for full post details)
  #10 (permalink)
 Tymbeline 
Legendary Market Wizard
Leeds UK
 
Experience: Intermediate
Platform: Tradovate
Broker: Tradovate
Trading: MES, MNQ
 
Tymbeline's Avatar
 
Posts: 594 since Apr 2015
Thanks: 2,066 given, 937 received



jaybedreamin View Post
how far back in time do you usually prefer to observe a profitable system?


jaybedreamin View Post
Is 2 years of backtest data enough?


jaybedreamin View Post
Some folks need 5, 10+ years of profitable results so I am wondering if just 2 is enough.


Sorry if my answer's unhelpful, but these aren't really quite the questions I ask myself.

For me, it isn't about "how long" as much as about "over what range of conditions". I want to test robustness, and for that - in principle - I’d much rather have four 6-month (or maybe even 3-month) data-periods when the market was behaving differently than a single 2-year period in which most of the data’s broadly similar.

Reply With Quote
The following user says Thank You to Tymbeline for this post:


futures io Trading Community Traders Hideout > Best lookback period when backtesting?


Last Updated on March 6, 2023


Upcoming Webinars and Events
 

NinjaTrader Indicator Challenge!

Ongoing
     



Copyright © 2023 by futures io, s.a., Av Ricardo J. Alfaro, Century Tower, Panama, Ph: +507 833-9432 (Panama and Intl), +1 888-312-3001 (USA and Canada), info@futures.io
All information is for educational use only and is not investment advice.
There is a substantial risk of loss in trading commodity futures, stocks, options and foreign exchange products. Past performance is not indicative of future results.
no new posts