## Finding Reversal Zone in Intraday FX prices

There is no holy grail in trading instead there are strategies that work for a while or in a specific market environment. The role of the analyst is therefore twofold. First find a good trading strategy, second find the right environment for this strategy. The present post focuses on the latter. More specifically it aims at estimating good entry/exit point for mean reverting strategies in the FX market. Obviously this does not guarantee good performance but it does guarantee to raise the odds in the trader’s favour. This is what quantitative trading is about.

As I advocated in a previous post, it always starts by knowing what you’re trading. In that respect, I’ll gather here the necessary stylized facts to design a systematic action plan.

**Daily range completion**

The graph below shows the cumulative probability of hitting the high and low by hour within the day for the EURUSD future contract from October 7th 2009 to September 14th 2011. The obvious point is that after 3:00 PM (timezone GMT+1) the probability of the daily range being completed is higher than 60% (grey line).

**Price distribution**

In the context of intraday trading, it’s key to understand where the current price fits in the daily price distribution. Two elements are needed to define the position of the last price. First, a proper estimate of today’s range, second, a synthetic measure of position within this range.

Regarding the former using an ATR (Average True Range) over the past 20 days is a good generic metric. It doesn’t rely on a single day and doesn’t look too far back in the past. Obviously this has to be tailored to individual needs.

The price position within the daily range is expressed in percentage term relative to the day high and low. I named this indicator **LRTDR** (Last Relative To Daily Range) and it’s inspired from the QUSMA blog. The exact calculation is:

As this indicator is used at any point in time during the day, high and low are not the final high and low for the day but the highest and lowest prices up to the calculation time. As such LRTDR constantly adjusts itself during the day and oscillate between 0 and 100%.

Let’s take an example: On September 15^{th} 2011 (chart above) the ATR is 179 pips. At 09:00 AM, the daily range is 55 pips (1.3749-1.3694) and . This means that 31% (55/179) of the ATR has been completed so far that day and the last price stay in a well bounded range relative to recent history. All in all, no exciting news at 9:00 AM.

Now let’s do the same calculation at 3:30 PM. The daily range is 160 pips (1.3854-1.3694) or 89% (160/179) of the ATR have been completed so far, and . In a nutshell, the last price stands at an extreme and the majority of the daily range has been completed. This sounds like a good entry/exit point for someone’s playing the reversal.

**Volatility**

The volatility level gives a confidence intervale around the price forecast. If current volatility is high then the 3:00 PM cut off defined above might be less reliable than in a low volatility environment. I’m going to use the ATR as a measure of volatility.

There are many possible improvements for the volatility estimation: GARCH modeling, Garman-Klass etc…but for the purpose of this post a simple ATR is good enough.

**Putting all the pieces together
**

Assuming I’m trading a mean reversion strategy, by now you should see where I’m heading to! Let’s get back to the example above. It’s 3:30 PM , the probability of range completion is above 60%, EURUSD has completed 89% of the average daily range, price stands at an extreme for the day and historical volatility is high but not at an extreme. No maths is required to realize that all indicators (but volatility) are pointing toward a high probability reversal. I deliberately chose an example where not all metrics where pointing toward a reversal as this is what to expect in real life trading: reality comes in shades of grey not black and white.

The good thing about approaching the problem from the perspective above, is that you get a reversal probability that is constantly updated along the day. Essentially this approach systematizes what a lot of (professional) traders do manually.

The data used in this post is the 5min bars for the EURUSD future contract. High and low prices are mid range values (average of bid and ask). The timezone considered is GMT+1.

Any comments welcome

If its a big range day and the price is near the high of the day, the probability is that it will close near the high of the day. Test this out and you will find it to be true.

Thus, a mean reverting strategy is not likely to work on large range days (as the price will close near the high).

DR

Thank you. This is exacly the kind of feed back I like to see.

In this blog the research posts (and this is the first one) will always be ideas or work in progress so any suggested improvement is welcome. I didn’t do any formal back test for the post above but I’ll probably include your tip if I decide to do so.

Intra-day seasonality is going to have an impact on this strategy. Also, as DR says, how confident are you that higher volatility days lead to reversals of price direction?

Thank you for your feed back.

Regarding intra-day seasonality you’re right this is going to affect this approach but how and in which proportion I don’t know (yet).

I’m not saying that higher volatility will lead to reversal. I’m just saying that volatility is something to consider. I actually think that higher volatility means an higher confidence interval around the price target. This remains to be tested properly however.

On a related note, this is not a strategy by any means, I didn’t perform any formal back test. This is just a research idea: I’m trying to connect the dots between stylized facts.

It’s very unlikely that I post any live strategy on that blog for 2 reasons. First this is proprietary information second I do think everyone has to do its homework. I’m happy to share ideas however.

Would you mind pointing me in the direction of where I can find the code you used on the data to find Daily Range completion? Many google searches have revealed nothing…

Your post mentions quite a few areas I plan to investigate more however I really need to get confident with using R. I would like to examine daily range on a daily basis throughout the month. For example if we look at the EURUSD the last days of the month has many high impact releases like NFP etc however other days of the month have very little releases that can make an impact and so should have lower volatility.

I think a lot of styles can be very successful if applied at a statistically optimised time.

Thank you for reaching out.

Regarding the daily range completion I came up with this by myself. Unfortunately I can’t give away the code, it’s proprietary but I can point you in the right direction. If you want to analyse daily range you need intraday data. An efficient way to deal with this in R is to use

data.table(read my post from Sept. 2013 “Working with Intraday Data”). In a nutshell you loop through your data by day and do your analysis within each day but data.table make it much faster. An alternative is to use theapplyfamily functions.Hope this helps

R Trader

Could you offer a brief explanation on how to calculate the developing daily high, and daily low from intraday data?

I’m not sure what you mean by “developing daily high and daily low from intraday data”. If you mean cumulative probability of hitting high and low, this is a straightforward calculation. For each expanding time bucket (1am to 2am, 1am to 3am, 1am to 4am etc…) you count all the highs that fall into that time bucket over your sample period and you divide by the number of days. You do the same for the lows and you’re done.

Hope this helps

Acrary/ JupiterOGX?

Interesting post!

Where did you got the data? Which specific data set did you use?

Appreciate your reply!

Thank you for reaching out. I used futures data from Bloomberg. Bloomberg got the data straight from the exchange I guess

Thx for your fast answer!

I already read that your R code was proprietary. If things have changed, I would appreciate to read the logic in your data.table function.

If not, how are you getting the daily range probabilities. As I understand you calculated the daily range for each day(like `open` minus `closing` price). How do you arrive at a probability for daily range completion, splitted by high and low?

I really would appreciate any hint from your site!

Thx in advance!

Things haven’t change regarding my code.

Regarding the daily range. Over a given period of time, each day, you simply record where the daily high and low fall within the trading session. This gives you a probability distribution of hitting the high and the low for at a certain time during the day. This is your probability of daily range completion. No magic it’s a very simple concept.

hi Arnaud, i’ve admittedly struggled to replicate the % prob of range completion chart for years… even tried to learn dplyr just to replicate it. before i throw the towel, i was hoping to ask – is there any chance that you’d consider changing your stance on sharing the code? a lot of us are terrible at writing R functions…

I’m sorry but my position didn’t change: I’m not going to share the code

Arnaud