NexusFi: Find Your Edge


Home Menu

 





Absolute vs. percentage price change in backtesting


Discussion in Traders Hideout

Updated
      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 2,856 views
    2. thumb_up 5 thanks given
    3. group 6 followers
    1. forum 11 posts
    2. attach_file 1 attachments




 
Search this Thread

Absolute vs. percentage price change in backtesting

  #1 (permalink)
 Thatsbooo 
Switzerland
 
Experience: Advanced
Platform: Multicharts
Broker: IB
Trading: RB, GC, CL, ES, US, S
Posts: 26 since Jul 2017
Thanks Given: 9
Thanks Received: 2

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!

Started this thread Reply With Quote

Can you help answer these questions
from other members on NexusFi?
NT7 Indicator Script Troubleshooting - Camarilla Pivots
NinjaTrader
Pivot Indicator like the old SwingTemp by Big Mike
NinjaTrader
ZombieSqueeze
Platforms and Indicators
Trade idea based off three indicators.
Traders Hideout
Increase in trading performance by 75%
The Elite Circle
 
Best Threads (Most Thanked)
in the last 7 days on NexusFi
Diary of a simple price action trader
26 thanks
Just another trading journal: PA, Wyckoff & Trends
25 thanks
Tao te Trade: way of the WLD
23 thanks
My NQ Trading Journal
16 thanks
HumbleTraders next chapter
9 thanks
  #3 (permalink)
 iantg 
charlotte nc
 
Experience: Advanced
Platform: My Own System
Broker: Optimus
Trading: Emini (ES, YM, NQ, ect.)
Posts: 408 since Jan 2015
Thanks Given: 90
Thanks Received: 1,148


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 NexusFi Trade Journal Reply With Quote
  #4 (permalink)
 Thatsbooo 
Switzerland
 
Experience: Advanced
Platform: Multicharts
Broker: IB
Trading: RB, GC, CL, ES, US, S
Posts: 26 since Jul 2017
Thanks Given: 9
Thanks Received: 2

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

Started this thread Reply With Quote
  #5 (permalink)
 Thatsbooo 
Switzerland
 
Experience: Advanced
Platform: Multicharts
Broker: IB
Trading: RB, GC, CL, ES, US, S
Posts: 26 since Jul 2017
Thanks Given: 9
Thanks Received: 2

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

Started this thread Reply With Quote
  #6 (permalink)
 iantg 
charlotte nc
 
Experience: Advanced
Platform: My Own System
Broker: Optimus
Trading: Emini (ES, YM, NQ, ect.)
Posts: 408 since Jan 2015
Thanks Given: 90
Thanks Received: 1,148

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 NexusFi Trade Journal Reply With Quote
Thanked by:
  #7 (permalink)
 loantelligence 
Syracuse, NY
 
Experience: Intermediate
Platform: Ninja Trader
Broker: Mirus Futures/Zen-Fire
Trading: NQ
Posts: 218 since Jan 2011
Thanks Given: 31
Thanks Received: 189


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://nexusfi.com/attachments/127775d1383705225

Reply With Quote
  #8 (permalink)
 tpredictor 
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
  #9 (permalink)
 Thatsbooo 
Switzerland
 
Experience: Advanced
Platform: Multicharts
Broker: IB
Trading: RB, GC, CL, ES, US, S
Posts: 26 since Jul 2017
Thanks Given: 9
Thanks Received: 2

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

Thanks a lot for the help!

Started this thread Reply With Quote
  #10 (permalink)
 
SMCJB's Avatar
 SMCJB 
Houston TX
Legendary Market Wizard
 
Experience: Advanced
Platform: TT and Stellar
Broker: Advantage Futures
Trading: Primarily Energy but also a little Equities, Fixed Income, Metals and Crypto.
Frequency: Many times daily
Duration: Never
Posts: 5,048 since Dec 2013
Thanks Given: 4,381
Thanks Received: 10,205


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:	217
Size:	47.3 KB
ID:	248887  
Reply With Quote
Thanked by:




Last Updated on April 24, 2018


© 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