The normal gap trading strategy — that is buy/sell after a weekly gap to profit from gap’s compensation — has a nice statistical evidence behind it. But what do we know about forecasting the weekly gaps based on information available to us on late Friday session?
I have decided to backtest a simple trading system. The idea is to forecast the future gaps by looking at the current daily or weekly range. A trader could buy at the end the bullish Friday session and sell at the end of the bearish one. Assuming there is a positive correlation between the range and the expected gap, the next week would likely open with some profit in that position. The same could be done based on the whole week’s range rather than just Friday.
- 1 Expert advisors
- 2 Backtesting
- 3 Lessons learned
- 4 Further study
Of course, the reality turns out not as optimistic as our assumptions. I have created two expert advisors to test for the correlation:
PreGapOnFriday_daily.mq5 — on Friday at 23:00 (UTC+2, the last hour of Forex session in my platform), it goes Long if the daily Close is above the daily Open and goes Short if the daily Open is below the daily Close. It closes a trade on the Monday’s session opening. No
PreGapOnFriday_weekly.mq5 — works the same as the above EA except that it goes Long if the weekly Close is above the weekly Open and goes Short if the weekly Open is below the weekly Close.
The first expert advisor checks for a correlation between the Friday’s trading session and the future weekend gap. The second expert advisor checks for a correlation between the week’s trading session and the upcoming gap.
Both expert advisors also track spread expenditures for us to see what part of loss can be attributed to this category.
I have run the backtests using the default settings for the period from 2010-01-01 through 2016-03-14 on hourly timeframe on open prices only. I have chosen the period to include as much history as possible without going back to the financial meltdown of 2008 and its consequences. Also, I have tried to avoid testing before the US
You can download all the backtesting reports for your own study.
Below you can see the summary of the results across five currency pairs:
Based on Friday’s daily range
Net profit: $351.06.
Based on weekly range
Net loss: $169.06.
Adjusted for spread ($367.80), the profit would be $718.86 in daily case and $198.74 in weekly. The weekly and especially Friday’s trading range in EUR/USD seems to be quite correlated with the next weekend’s gap. Higher profit for the daily range test hints at higher importance of newer data. Unfortunately, there is no consistency — although the daily backtest had 56% winning ratio, the balance chart suggests that the outcome could be a result of a chance.
Net loss: $601.24.
Net loss: $401.44.
If we remove spread cost ($641.80), the profit would be $40.56 for Friday’s and $240.36 for weekly ranges. Contrary to the EUR/USD case, weekly range seems to be better at predicting the gaps. More clearly than in EUR/USD, the weakness of the correlation can be seen here as the profit is so small that it gets completely consumed by the spread.
Net loss: $903.32.
Net loss: $466.40.
If we consider the spread loss of $515.35, the daily result does not change to profit but remains a loss albeit smaller — $387.97. The weekly range backtest shows insignificant profit — $48.95. USD/CAD demonstrates a negative correlation for Friday’s trading session vs. gap and a nonexistent positive one for weekly trading session vs. gap. Obviously, it is not reliable enough for actual trading.
Net loss: $1,286.83.
Net loss: $678.83.
The spread cost was unusually high for USD/CHF — $927.17. Subtracting it from the loss, we get $359.66 loss from Friday range forecasts and $248.34 profit from weekly range forecasts. The results resemble those obtained with USD/CAD. The negative correlation between the weekly range and gap contrasts with a stronger positive correlation between the Friday’s range and gap. Both are small enough to ignore.
Net loss: $154.77.
Net loss: $483.10.
With $512.31 spread loss removed from the net loss results above, we get $357.54 profit for Friday’s range forecast and $29.21 profit for the weekly range forecast. Both mean positive but weak correlation that can be a consequence of a completely random process.
The results do not seem very exciting considering all the losses and weak correlations. The latter can be easily attributed to some odd price movements. But such results have a tale to tell too:
- The weekly gaps have little to do with pair’s price action during the prior week and are affected more by fundamental events during the weekends.
- Best results have been obtained in EUR/USD — a currency pair with lowest spread and best liquidity. It seems that higher liquidity is crucial to forecasts based on technical analysis.
- In theory, it is possible to profit from weekend gaps by buying and selling EUR/USD during the last hour of Friday’s trading but you have to be prepared for years of drawdowns.
It is potentially possible to add some filters to the buy and sell signals to improve the obtained results. The expert advisors have one input parameter for that (MinPips) — it lets the EA trade only when the checked range is greater than MinPips times current spread. I decided not to use this parameter in order to avoid overoptimization.
A minor improvement could possibly be attained by entering a trade not at 23:00 (UTC+2) but during the final minutes of the trading session. However, it is not an easy feat and is potentially dangerous due to shallow liquidity.
Another path to get some more interesting results would be to perform a more complex analysis of the candlesticks — daily, weekly, and possibly even diving into hourly timeframes.