What is the best day to invest?. Save early, save regularly. All good so... | by Jean-Frederic Plante | Towards Data Science

Save early, save regularly. Great. You are scheduling regular deposits to some indexed investment maybe an ETF, maybe through a robo-advisor like Betterment, WealthFront, etc.
Recurring deposits hedge your bets on market timing. In my case, I set a weekly deposit to a robo-advisor and wondered if there was a weekly pattern in the market showing an advantageous day of the week to invest. Can we get an edge on the average?
Thankfully, all the tools are available for free to try to get a directional answer to this.
Quantopian’s platform offers free data sources and tools to ideate trading algorithms. Great playground for this question, let’s jump into it.
QTradableStocksUS is a large universe of stocks curated by Quantopian which removes penny stocks and other non liquid stocks but is still a large universe. I am looking at all the stocks returns in that universe since 2015.
Number of equities: 3039
Now let’s get the average returns over all symbols for every day of the period considered.
avg_returns = pipeline_output.groupby(level=0).mean()avg_returns.head(2)
Since we want the weekly pattern, let’s add the week day and week number. We want the relative returns with respect to the weekly average returns, not the absolute returns so we normalize weekly by the mean and std.
Based on this, what is average returns per day looks? Over the last 4 years or so, it seems the best day to your scheduled investment would be Monday morning.
Keep in mind the returns are normalized, so the 12% down on Fridays are thankfully not what is happening in the market on a weekly basis.
Well, how much variation do we have?
Ouch. That pattern suddenly seems way less appealing. Still Friday is 5% more likely to be under the average, corresponding to a 0.05 p-value which is borderline statistically significant. YMMV depending on your acceptable p-value threshold.
Let’s keep digging to see how the mean evolves over time.
Let’s check how those relative returns evolve over time for a particular obervation horizon. For instance, if I do the same analysis on a sliding window of 12 weeks over several years, do those days flip all the time or do we see a pattern?
Hard to see, but looking over a 12 weeks sliding window, Friday has been the worse performing for maybe a month? It’s all over the place.
How about a longer time window? Below for 48 weeks.
Over that longer time period, Friday seem to be the worse day overall so Monday doesn’t look like a bad option to have a recurrent deposit from that view.
Not very surprisingly, there is hardly any signal considering anything significant would already have been arbitraged away. However, the slight trend makes me choose my recurrent deposit day for Monday. Disclaimer, this does not constitute an investment advice.
What next? I am curious to see how a long-short strategy based on that factor would perform which is another thing Quantopian has great tools for. Also, I am curious to look whether certain stocks do behave very predictably over the week. Possibly the topic of a follow up post.
Thanks for reaching out for comments or corrections to this post!
Note from Towards Data Science’s editors: While we allow independent authors to publish articles in accordance with our rules and guidelines, we do not endorse each author’s contribution. You should not rely on an author’s works without seeking professional advice. See our Reader Terms for details.