It's undoubtely so that there is an edge in keeping positions overnight. It's connected to a higher risk as the market can open below your stoploss level, but you get paid for it over time.
I was intrigued to investigate if there are certain nights in the weeks that have a stronger edge than other nights. And the difference between the nights were bigger than I thought.
In this study I'm looking at the France CAC40 index. The backtest period is from March 2009 until today.
So what we are backtesting here is the results if you enter a long trade at 17:20 and exit the trade at the open the next day. ProRealTime™ allow only entres at the beginning of of a candlestick, so we can't backtest entering the trade at the market close at (17:30)
EntryNight | Gain | Trades | % Winrate | Avg. gain | Max Drawdown |
Monday | €172.99 | 758 | 54.22% | €0.23 | €149.38 |
Tuesday | -€243.45 | 775 | 52.52% | -€0.31 | €297.90 |
Wednesday | -€53.67 | 776 | 54.38% | -€0.07 | €200.31 |
Thursday | €361.05 | 777 | +53.67% | €0.46 | €130.59 |
Friday | -€321.41 | 757 | +50.33% | -€0.42 | €369.50 |
The results are clear. The best night to keep a position is from Thursday to Friday, with a gain twice as high as the gain from Monday to Tuesday. And you should definitely avoid keeping long position from Friday to Monday. I was suprised to see that only two nights of the week are positive. I was also suprised to see that entering long trades on Fridays at 17:20 and exiting the trade at market open on Mondays barely was so terrible. My gut feeling was that you would be rewarded for taking the risk of keeping a position over the weekend, but actually you're not.
Here are the equity curve of the Thursday edge compared to the Friday edge
So, if you're swing trading CAC40 or building a strategy for CAC40 one should really consider closing positions before the weekend. To keep position over the weekends are often also connected to high overnight fees,
We'll keep these statistics in mind and will most definitely use it in any algo we build for the CAC40 in the future.
Please note that we're entering the trades 10 minutes before the market close, and please note that the results are not including transcation fees.
The ProRealTime™ backtest report
The ProRealTime™ code
IF time = 172000 and DayOfWeek = WhichDayOfWeek THEN
BUY 1 CONTRACTS AT MARKET
ENDIF
if OnMarket AND (BarIndex - TradeIndex) >= 0 Then
Sell at Market
Endif
Create a variable named "whichDayOfWeek" and optimize it between value 1 and 5 with step size 1 to reproduce this backtest. Run it on the 40 minute timeframe
留言