Absolute vs. percentage price change in backtesting - futures io
futures io futures trading



Absolute vs. percentage price change in backtesting


Discussion in Traders Hideout

Updated by SMCJB
      Top Posters
    1. looks_one Thatsbooo with 5 posts (0 thanks)
    2. looks_two SMCJB with 2 posts (3 thanks)
    3. looks_3 iantg with 2 posts (1 thanks)
    4. looks_4 loantelligence with 1 posts (0 thanks)
    1. trending_up 1,240 views
    2. thumb_up 5 thanks given
    3. group 6 followers
    1. forum 11 replies
    2. attach_file 1 attachments




Welcome to futures io: the largest futures trading community on the planet, with well over 100,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
 

Absolute vs. percentage price change in backtesting

(login for full post details)
  #1 (permalink)
Switzerland
 
Experience: Advanced
Platform: Multicharts
Broker: IB
Trading: RB, GC, CL, ES, US, S
 
Posts: 26 since Jul 2017
Thanks: 9 given, 2 received

Hi all,

I trying to develop a breakout strategy with a breakout of yesterday´s High/Low + an additional value.

Now, the additional value should I test it with a absolute price change in Ticks or as a percentage price change?
e.g. Entry Long on Yesterday´s High + "n Ticks" or Entry Long on Yesterday´s High + "n%" ?

I feel insecure when it comes to test price changes on back-adjusted continuous contracts. Which way is more
reliable, absolute or percentage price change?

Thanks!

Reply With Quote

Can you help answer these questions
from other members on futures io?
SPY, QQQ Weekly Closing Range Probabilities
Traders Hideout
Motley fool
Trading Reviews and Vendors
Market Replay and Fills (Denali data)
Sierra Chart
Historical option expirations
Brokers
Chart on TV, what platform is best for swing order entries?
Traders Hideout
 
 
(login for full post details)
  #3 (permalink)
charlotte nc
 
Experience: Master
Platform: ninjatrader
Broker: NinjaTrader
Trading: Emini (ES, YM, NQ, ect.)
 
Posts: 396 since Jan 2015
Thanks: 76 given, 1,069 received


Hi Thatsbooo,

What you are attempting to do is determine which "bet" will pan out the best. But in order to know which one will pan out the best you will need to do some research. The type of data and analysis you need to research this "bet" is:

1. For your given instrument get the raw price data for a few weeks or a month or two. You don't need to burn your self out too much at this point, since this is only a proof of concept validation as a first step.
2. For each day you need to extract the high and low and a full range of data. Maybe hourly, or minute data even...
3. For each day you need to determine if it broke the previous days high or low
4. For each day that broke a previous days high or low, you need to carefully analyze the following:

A: What did it do exactly, was this a trigger for a trend, or just an arbitrary price point that kept getting crossed from both sides.
B: If it did break the high or low did it pick up at least x number of ticks. You can define this.
C: If it did break the high or low, (This is the part you want to test) and it hit some predetermined value (Either your target tick value or target % change) then what happened next.
D: From C Above: Here is where you need to draw a hypothesis and test it such as: I think that if today breaks yesterdays (High or Low) and then moves X amount of ticks, or Y percentage, then Z will occur.
E: From D Above, you need to test your hypothesis and see if you were right or wrong. If you were right considerably more than you were wrong you may have an edge to your bet, but if this is somewhere around 50% / 50% then you don't have any edge with this idea / setting / exact bet, etc.

There is no shortcut you could take to get a quantifiable answer other than doing this in my opinion. The good news is this process is straight forward and can be done in excel in a few hours.

Just be careful to not only look at the potential positive outcomes (I.E did your bet occur the way you are hoping), but also look for any opposite moves that would likely trigger a stop loss. For example, if you are betting that if a price break implies a 20 tick up move, did you end up getting a 20 tick down move also. You can get both of these... and if this is the case you can not just assume the positive outcome without considering the negative outcome as well.

Bets of luck!

Ian





Thatsbooo View Post
Hi all,

I trying to develop a breakout strategy with a breakout of yesterday´s High/Low + an additional value.

Now, the additional value should I test it with a absolute price change in Ticks or as a percentage price change?
e.g. Entry Long on Yesterday´s High + "n Ticks" or Entry Long on Yesterday´s High + "n%" ?

I feel insecure when it comes to test price changes on back-adjusted continuous contracts. Which way is more
reliable, absolute or percentage price change?

Thanks!


In the analytical world there is no such thing as art, there is only the science you know and the science you don't know. Characterizing the science you don't know as "art" is a fools game.
Visit my futures io Trade Journal Reply With Quote
 
(login for full post details)
  #4 (permalink)
Switzerland
 
Experience: Advanced
Platform: Multicharts
Broker: IB
Trading: RB, GC, CL, ES, US, S
 
Posts: 26 since Jul 2017
Thanks: 9 given, 2 received

Hi iantg

Thanks for your reply!

What I have to know, is how reliable are tests with price changes on history data.

Maybe I have to specify my question:

Lets say, on the 9th of february 2017 the price closed 2% or respectively 10 ticks above the previous Day High. (on the single contract)

So, on back-adjusted continuous contracts where the contracts are merged together to remove the roll over gap, did the price also raise up 2% or 10 ticks on 9th of february 2017 in comparison to the day before?

I hope my question is now clearer

Reply With Quote
 
(login for full post details)
  #5 (permalink)
Switzerland
 
Experience: Advanced
Platform: Multicharts
Broker: IB
Trading: RB, GC, CL, ES, US, S
 
Posts: 26 since Jul 2017
Thanks: 9 given, 2 received

I thought I read somewhere that backtests with percentage price changes are not accurate.

Reply With Quote
 
(login for full post details)
  #6 (permalink)
charlotte nc
 
Experience: Master
Platform: ninjatrader
Broker: NinjaTrader
Trading: Emini (ES, YM, NQ, ect.)
 
Posts: 396 since Jan 2015
Thanks: 76 given, 1,069 received

Hi Thatsbooo,

To your questions:

1. Historical data at this level of detail can be considered very accurate. Where you might find flaws with data would be extremely granular level 2 events, and price level events where you may have thousands of data points in just a few seconds. If we are taking about using a minute, or hour time series just get H,L,O,C type of data, then you will have no issues with accuracy.
2. I think your second question concerns building an unabridged linear data set with no gaps. This is fairly easy to do as well. The key is that if there are overlapping contracts you just need to pick the one that is relevant to your use case. Some people arbitrage when there are two concurrent futures contract for the same instrument for example last month we have a few days where both the ES 03-18 and the ES 06-18 were actively traded. So if you pick a random da in March you could have data for either contract (3-18 or 6-18) available. There are two popular ways to construct data sets that run through multiple contracts: (A: As soon as the new contract is available to trade simply switch. B: Only once the volume on the new contract > the volume on the old contract switch). This just comes down to your preference.

3. To your specific questions on the back-adjusted contract: I suppose there can be variations with different data feeds, trading software, etc. But in general I see no reason why connecting 2 contracts together would produce an anomaly if done correctly. The easiest use case will be to switch contracts on the first day available. So in your analysis you would have one day on the old contract and one day on the new contract back to back. The first data point on the open of the new contract connected to the last data point from the old contract might have a large gap that inflates any real move that ever occurred because you are switching contracts. For rollover days I would just omit these from your analysis. Depending on your instrument this only occurs 1x per quarter or 1x per month. Don't make your work ahead more complex than it needs to be, just eliminate these on your first pass. Focus on the only 95% of the days that are easy to analyze and try to determine if you have a viable bet first.

In case you can't tell, I am assuming that you are downloading your data and working manually in excel. I know there are charting tools that can attempt to tie things together but since you will need to get this data in a more granular format for your analysis I am talking more to the technical aspects of building an unabridged data set with downloaded data.

Hope this helps!

Ian



Thatsbooo View Post
Hi iantg

Thanks for your reply!

What I have to know, is how reliable are tests with price changes on history data.

Maybe I have to specify my question:

Lets say, on the 9th of february 2017 the price closed 2% or respectively 10 ticks above the previous Day High. (on the single contract)

So, on back-adjusted continuous contracts where the contracts are merged together to remove the roll over gap, did the price also raise up 2% or 10 ticks on 9th of february 2017 in comparison to the day before?

I hope my question is now clearer


In the analytical world there is no such thing as art, there is only the science you know and the science you don't know. Characterizing the science you don't know as "art" is a fools game.
Visit my futures io Trade Journal Reply With Quote
The following user says Thank You to iantg for this post:
 
(login for full post details)
  #7 (permalink)
Syracuse, NY
 
Experience: Intermediate
Platform: Ninja Trader
Broker: Mirus Futures/Zen-Fire
Trading: NQ
 
Posts: 102 since Jan 2011
Thanks: 20 given, 79 received


Thatsbooo View Post
I thought I read somewhere that backtests with percentage price changes are not accurate.


Thatsbooo View Post
Hi iantg

Thanks for your reply!

What I have to know, is how reliable are tests with price changes on history data.

Maybe I have to specify my question:

Lets say, on the 9th of february 2017 the price closed 2% or respectively 10 ticks above the previous Day High. (on the single contract)

So, on back-adjusted continuous contracts where the contracts are merged together to remove the roll over gap, did the price also raise up 2% or 10 ticks on 9th of february 2017 in comparison to the day before?

I hope my question is now clearer

You may be interested in Dynamic SR Lines.....I use what looks like their equal on the price chart looking for breakout when the price crosses the line....the Blue and Purple lines on the price chart....
https://futures.io/attachments/127775d1383705225

Reply With Quote
 
(login for full post details)
  #8 (permalink)
North Carolina
 
Experience: Beginner
Platform: NinjaTrader, Tradestation
Trading: es
 
Posts: 644 since Nov 2011

Most futures contracts need to be tested in ticks because of back adjustment. This is not perfect. There is also a percentage back adjusted contract that is not common. Actually, I think it applies to any type of division. However, the ticks/points is not ideal either because percentage change is more likely to be robust when applied to an underlying. For example, today a 2% move on something like ES is going to be larger in points/ticks then several years ago. The nominal value changes over time.

The only real solution is to develop on the cash when possible, re-optimize, and/or test to see if your case matters. A rolling optimization is probably the easiest way to handle as it will help deal with the nominal value change which is slower. However, it won't handle certain types of changes.

Reply With Quote
 
(login for full post details)
  #9 (permalink)
Switzerland
 
Experience: Advanced
Platform: Multicharts
Broker: IB
Trading: RB, GC, CL, ES, US, S
 
Posts: 26 since Jul 2017
Thanks: 9 given, 2 received

So, I think I will test it with ticks even if it's not the perfect solution.

Thanks a lot for the help!

Reply With Quote
 
(login for full post details)
  #10 (permalink)
Legendary Market Wizard
Houston, TX
 
Experience: Advanced
Platform: Trading Technologies
Broker: Primary Advantage Futures. Also ED&F and Tradestation
Trading: Primarily Energy but also a little ES, GE, GC, SI & Bitcoin
 
Posts: 3,700 since Dec 2013
Thanks: 2,964 given, 7,084 received


If your trading stocks, feel free to use either.

If you trading futures, your prices are normally "roll adjusted" by taking the outright spread between the prompt and second contract on a predefined date. If this is the case, you can not use percentage anything - percentage breakouts, stops, profit targets etc etc - in long term back tests, as your historical prices will change on every roll over. While with some contracts (index's, currencies) this may not be a huge factor, in other commodities it can be. As an example of this I've attached a 20 year chart on the NYMEX Gasoline / RBOB / RB contract. You'll see that it will show that prices used to be negative - obviously they weren't!

You can also "roll adjust" by taking the percentage spread between the prompt and second contract on a predefined date. This will maintain price integrity for things like percentage stops etc. Unfortunately you can now no longer use anything in fixed points or dollars (including commissions).

The only way I know to use percentage's with roll adjusted futures contracts is to use two different contract price feeds, one roll adjusted and one not roll adjusted. Hence the 100 day percentage change becomes
(Close of today of roll adjusted contract - Close of 100 days ago of roll adjusted contract) / Close of 100 days ago of non-roll adjusted contract

Attached Thumbnails
Click image for larger version

Name:	180421 RBOB.png
Views:	31
Size:	47.3 KB
ID:	248887  
Reply With Quote
The following 3 users say Thank You to SMCJB for this post:


futures io Trading Community Traders Hideout > Absolute vs. percentage price change in backtesting


April 24, 2018


Upcoming Webinars and Events
 

Bookmap

Nov TBD
     



Copyright © 2020 by futures io, s.a., Av Ricardo J. Alfaro, Century Tower, Panama, +507 833-9432, 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