Best Day Of The Week To Trade And How To Test For It
What is the best day of the week to algo trade? Actually, this is a tricky question – let me explain…
Part of my normal routine is developing new trading strategies. I am always testing new ideas, creating new strategies, and adding the successful ones to my live portfolio. That is what most of my Strategy Factory students do too – producing new strategies is really the lifeblood of any serious systems trader.
Anyhow, the other day I was looking at a strategy I developed. It had a pretty nice walkforward (out-of-sample) equity curve, and it was profitable most years, and even most months. Then I looked at results for each day of the week, and I was shocked. If my strategy did not trade on Thursdays, my backtest profit would increase by over 60%! WOW!
My first reaction was to then adjust my strategy code, and prevent trades on Thursday. My second reaction was to admire the greatly improved non-Thursday equity curve. I was ecstatic! My third reaction was to throw away those results, and stick to the original strategy.
Why?
Simply put, I realized I was just optimizing for a day of the week. It did not seem like optimization – after all, I did not run my trading software through any kind of computerized optimization – but it was optimization just the same. I took existing results, and then when I found something better, I accepted the improved results. That is optimization. It certainly creates an improved backtest, but it is bad.
Many people do things like this, with either day of the week, time of the day, or even certain months of the year. They will look at results, and then decide what to keep and what to eliminate. Then they’ll go back with their filtered strategy, and bask in the glory of the improved results.
Wrong, wrong, wrong…
Could there be some significance to certain times of the day, days of the week, or months of the year? Absolutely! I am not saying that you can’t develop a strategy that takes advantage of these situations. You just have to do the development correctly.
So, what is the correct way to frame this problem?
Here is what I do…
BEFORE I do any testing, if I think time/day/month matters for my strategy, I’ll develop a hypothesis or guidelines. For example, I might be developing a natural gas system, and I don’t want to get bounced around by the weekly US government energy report (usually on Thursdays), so I’ll just eliminate that from the strategy – no Thursday trading. Or, maybe I’ll make sure all Fridays end flat, to eliminate weekend risk. Maybe I’ll even exclude certain months for stock index futures (the old “go away in May” adage).
The point is I develop the idea before I test it, not after. It is easy to look at results, and then develop a reason why certain periods should be excluded. But that is just hindsight bias – Monday morning quarterbacking.
It is much, much harder to come up with the reason before you test. But it is the right way to do things.
So, there may be a best or worst time, or day, or month to trade your system. But don’t look for that after you test. If you instead come up with your filtering/exclusion approach before you test, you’ll probably get worse results (no more cherry picked results), but those results might just work better going forward.
Do you do things differently? Maybe this example will persuade you...
I have a strategy, one that I share with Strategy Factory students. It was borne of a simple idea - that geopolitical fear causes people to inflate the price of the instrument (it could be soybeans, or gold, or crude oil, etc.) . Many times, being short is a good idea.
So, the strategy itself is pretty simple:
1. Sell short on the open of a new session
2. Exit with either a profit target, or at the open of the next session (day)
So, you could test this over each day of the week:
Sell short Monday open, exit Tuesday open
Sell short Tuesday open, exit Wednesday open
Sell short Wednesday open, exit Thursday open
Sell short Thursday open, exit Friday open
Sell short Friday open, exit Monday open
BUT, that is not the way I recommend to do it - it is just optimizing!
Instead, I tried to formulate a hypothesis - an idea - of what day would be the best to enter this trade. After thinking about it for a while, I picked a day, and THEN developed the system.
Do you see how different this is than optimizing for the "best" day? I hope you do.
So, how did that work out? To make a long story short, here is what I found:
1. For the in-sample test period of 2009-2017, the optimized version of the strategy dramatically outperformed my version. (I felt pretty stupid!)
2. For the out-of-sample period of 2018 and 2019, my version dramatically outperformed the optimized version. (I felt pretty smart!)
So, at least in this case, optimizing for best day of the week was actually a terrible thing to do!
Keep that in mind the next time you see great performance a certain day of the week after you test. There is a good chance it will not be the best day going forward...
Part of my normal routine is developing new trading strategies. I am always testing new ideas, creating new strategies, and adding the successful ones to my live portfolio. That is what most of my Strategy Factory students do too – producing new strategies is really the lifeblood of any serious systems trader.
Anyhow, the other day I was looking at a strategy I developed. It had a pretty nice walkforward (out-of-sample) equity curve, and it was profitable most years, and even most months. Then I looked at results for each day of the week, and I was shocked. If my strategy did not trade on Thursdays, my backtest profit would increase by over 60%! WOW!
My first reaction was to then adjust my strategy code, and prevent trades on Thursday. My second reaction was to admire the greatly improved non-Thursday equity curve. I was ecstatic! My third reaction was to throw away those results, and stick to the original strategy.
Why?
Simply put, I realized I was just optimizing for a day of the week. It did not seem like optimization – after all, I did not run my trading software through any kind of computerized optimization – but it was optimization just the same. I took existing results, and then when I found something better, I accepted the improved results. That is optimization. It certainly creates an improved backtest, but it is bad.
Many people do things like this, with either day of the week, time of the day, or even certain months of the year. They will look at results, and then decide what to keep and what to eliminate. Then they’ll go back with their filtered strategy, and bask in the glory of the improved results.
Wrong, wrong, wrong…
Could there be some significance to certain times of the day, days of the week, or months of the year? Absolutely! I am not saying that you can’t develop a strategy that takes advantage of these situations. You just have to do the development correctly.
So, what is the correct way to frame this problem?
Here is what I do…
BEFORE I do any testing, if I think time/day/month matters for my strategy, I’ll develop a hypothesis or guidelines. For example, I might be developing a natural gas system, and I don’t want to get bounced around by the weekly US government energy report (usually on Thursdays), so I’ll just eliminate that from the strategy – no Thursday trading. Or, maybe I’ll make sure all Fridays end flat, to eliminate weekend risk. Maybe I’ll even exclude certain months for stock index futures (the old “go away in May” adage).
The point is I develop the idea before I test it, not after. It is easy to look at results, and then develop a reason why certain periods should be excluded. But that is just hindsight bias – Monday morning quarterbacking.
It is much, much harder to come up with the reason before you test. But it is the right way to do things.
So, there may be a best or worst time, or day, or month to trade your system. But don’t look for that after you test. If you instead come up with your filtering/exclusion approach before you test, you’ll probably get worse results (no more cherry picked results), but those results might just work better going forward.
Do you do things differently? Maybe this example will persuade you...
I have a strategy, one that I share with Strategy Factory students. It was borne of a simple idea - that geopolitical fear causes people to inflate the price of the instrument (it could be soybeans, or gold, or crude oil, etc.) . Many times, being short is a good idea.
So, the strategy itself is pretty simple:
1. Sell short on the open of a new session
2. Exit with either a profit target, or at the open of the next session (day)
So, you could test this over each day of the week:
Sell short Monday open, exit Tuesday open
Sell short Tuesday open, exit Wednesday open
Sell short Wednesday open, exit Thursday open
Sell short Thursday open, exit Friday open
Sell short Friday open, exit Monday open
BUT, that is not the way I recommend to do it - it is just optimizing!
Instead, I tried to formulate a hypothesis - an idea - of what day would be the best to enter this trade. After thinking about it for a while, I picked a day, and THEN developed the system.
Do you see how different this is than optimizing for the "best" day? I hope you do.
So, how did that work out? To make a long story short, here is what I found:
1. For the in-sample test period of 2009-2017, the optimized version of the strategy dramatically outperformed my version. (I felt pretty stupid!)
2. For the out-of-sample period of 2018 and 2019, my version dramatically outperformed the optimized version. (I felt pretty smart!)
So, at least in this case, optimizing for best day of the week was actually a terrible thing to do!
Keep that in mind the next time you see great performance a certain day of the week after you test. There is a good chance it will not be the best day going forward...
About The Author: Kevin Davey is an award winning private futures, forex and commodities trader. He has been trading for over 25 years.Three consecutive years, Kevin achieved over 100% annual returns in a real time, real money, year long trading contest, finishing in first or second place each of those years.
Kevin is the author of the highly acclaimed book "Building Algorithmic Trading Systems: A Trader's Journey From Data Mining to Monte Carlo Simulation to Live Trading" (Wiley 2014). Kevin provides a wealth of trading information at his website: https://kjtradingsystems.com
Copyright, Kevin Davey and KJ Trading Systems. All Rights Reserved. Reprint of above article is permitted, as long as the About The Author information is included.
Kevin is the author of the highly acclaimed book "Building Algorithmic Trading Systems: A Trader's Journey From Data Mining to Monte Carlo Simulation to Live Trading" (Wiley 2014). Kevin provides a wealth of trading information at his website: https://kjtradingsystems.com
Copyright, Kevin Davey and KJ Trading Systems. All Rights Reserved. Reprint of above article is permitted, as long as the About The Author information is included.