NexusFi: Find Your Edge


Home Menu

 





Best lookback period when backtesting?


Discussion in Traders Hideout

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




 
 

Best lookback period when backtesting?

(login for full post details)
 
 jaybedreamin 
New York City
 
Experience: Intermediate
Platform: NinjaTrader
Trading: Futures
Posts: 20 since Feb 2023
Thanks Given: 4
Thanks Received: 7

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

Can you help answer these questions
from other members on NexusFi?
Looking for an MQL4 MetaTrader programmer/coder
The Elite Circle
The space time continuum and the dynamics of a financial …
Emini and Emicro Index
Request for MACD with option to use different MAs for fa …
NinjaTrader
ZombieSqueeze
Platforms and Indicators
Futures Close-Out Policy
Commodities
 
Best Threads (Most Thanked)
in the last 7 days on NexusFi
Just another trading journal: PA, Wyckoff & Trends
33 thanks
Daytrading ES & NQ
32 thanks
Battlestations: Show us your trading desks!
30 thanks
Spoo-nalysis ES e-mini futures S&P 500
28 thanks
Retail Trading As An Industry
25 thanks

(login for full post details)
 
Jmang
Chicago, IL
 
Posts: 4 since Jan 2023
Thanks Given: 0
Thanks Received: 0

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?

(login for full post details)
 
abev
seattle washington
 
Posts: 75 since Feb 2019
Thanks Given: 11
Thanks Received: 29



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.

(login for full post details)
 
 
CannonTrading's Avatar
 CannonTrading   is a Vendor
 
Posts: 216 since Mar 2013
Thanks Given: 77
Thanks Received: 183

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
(login for full post details)
 
 jaybedreamin 
New York City
 
Experience: Intermediate
Platform: NinjaTrader
Trading: Futures
Posts: 20 since Feb 2023
Thanks Given: 4
Thanks Received: 7

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
(login for full post details)
 
Jmang
Chicago, IL
 
Posts: 4 since Jan 2023
Thanks Given: 0
Thanks Received: 0

> 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?

(login for full post details)
 
 jaybedreamin 
New York City
 
Experience: Intermediate
Platform: NinjaTrader
Trading: Futures
Posts: 20 since Feb 2023
Thanks Given: 4
Thanks Received: 7


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
(login for full post details)
 
 jaybedreamin 
New York City
 
Experience: Intermediate
Platform: NinjaTrader
Trading: Futures
Posts: 20 since Feb 2023
Thanks Given: 4
Thanks Received: 7


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
The following user says Thank You to jaybedreamin for this post:
(login for full post details)
 
 
CannonTrading's Avatar
 CannonTrading   is a Vendor
 
Posts: 216 since Mar 2013
Thanks Given: 77
Thanks Received: 183

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
(login for full post details)
 
 
Tymbeline's Avatar
 Tymbeline 
Leeds UK
Market Wizard
 
Experience: Intermediate
Platform: Tradovate
Broker: Tradovate
Trading: MES, MNQ
Posts: 640 since Apr 2015
Thanks Given: 2,319
Thanks Received: 1,046



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 - Id 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 datas broadly similar.

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

 




Last Updated on March 6, 2023


© 2024 NexusFi™, s.a., All Rights Reserved.
Av Ricardo J. Alfaro, Century Tower, Panama City, Panama, Ph: +507 833-9432 (Panama and Intl), +1 888-312-3001 (USA and Canada)
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.
About Us - Contact Us - Site Rules, Acceptable Use, and Terms and Conditions - Privacy Policy - Downloads - Top
no new posts