Analyzing stock market myths with data visualization

Ruben Orduz
4 min readJun 11, 2023
Generated in PromptHunt

Over the past few decades, very few things have fascinated me as much as the concept and practice of capital markets. It’s a topic that ignites my curiosity and engages my thinking on various levels: data, computing, money, analysis, and more. Throughout the years, whether through television, books, online forums, or lately, social media, I’ve come across countless tautologies, truisms, and financial slogans that are repeated endlessly. In this blog post, I will highlight a few of the most prominent ones and employ data visualization in a Noteable notebook, Github gists and TradingView strategy tester to determine if they fall short or not.

Free Money Friday

This slogan gets thrown around a lot, especially on social media. The premise is markets tend to go up on Fridays — disproportionally so from other days of the week. However, it’s easily debunked when we look into the data and plot percent daily performance grouped by day of the week.

SPX Daily Performance Mean, Grouped by Day of Week
SPX Daily % performance, grouped by day of week (0=Monday, 4=Friday)

If you are using this slogan to guide your trading: good luck.

Sell in May And Go Away

The premise of this stock market slogan rests on the assumption that big market participants sell in May to go on vacation and don’t come back until September for rebalancing their funds before the end of the federal fiscal year. Let’s look at the data and see if this often-repeated adage holds any water.

SPX Daily % Performance, grouped by month, 5Y

This is of the more interesting ones because data seems to indicate some “seasonality” selling but in August and September, and both June and July have historical positive percent returns. So perhaps there’s some edge to be found by selling at the end of July and deploying capital again in October. However, even this hypothesis is flimsy given the large variation and ranges. It’s plausible this adage held some truth before the advent of algorithmic trading and massive retail participation, but, as of today, selling in May would cause you to lose alpha in the months of June and July.

Buy when RSI is under 30, sell when RSI is over 70

This is one of those adages or slogans that every newbie reads about and keeps getting perpetuated as gospel. The problem is a fundamental misunderstanding as to what the RSI is, how it’s calculated and what does it mean, if anything, when it’s “out of bounds”.

So to test this let’s first reduce the data set to when RSI is “out of bounds” i.e. over 70 or under 30. The filtered data is here but was not embedded due to its size (for Medium embedding purposes). We then need to sort chronologically to find the first instance of RSI under 30, which is Dec 26th, 2018 when the S&P closed at 2467.7, then we look for the first time when the RSI was over 70 after that, which happened on Jan 19th, 2019 when the S&P closed at 2610.53, this would have netted us roughly 5.7% profit. Not bad at all! Alright, now we just need to wait until the RSI is under 30 again, which happens on May 19th, 2019 when the S&P closed at 2811.87. Then we sit on our hands until the RSI is over 70 again which happens on Jun 19th, 2019 when the S&P closed at 2917.75 when we close the trade for a 3.7% profit. And so forth.

If we repeat this process on every trigger, it turns out that in the last five years our total profit would be a mere 0.17%! If instead we had bought on Dec 26th, 2018 and held until today, we’d have a 74% or so profit so far.

Closing Thoughts

Trading and investing are topics that should be taken seriously and attention should be paid when advice or strategy suggestions are given without details. Adages and “inside baseball” phrases are often used even though they are either outright not true or only work on hand-picked data or certain situations, as seen above. Before committing real money on any strategy whether your own or someone else, you should study the data and run ‘backtesting’ (easy to do in TradingView).



Ruben Orduz

Software, 3D Printing, product reviews, data, and all things AI/ML.