Member-only story
Find The Best & Worst Days To Invest In The S&P500 Using Python
The best and worst day to invest
Disclaimer: The material in this article is purely educational and should not be taken as professional investment advice. Invest at your own discretion.
In this article I will attempt to determine the worst & best days for returns in the market by using the python programming language.
If you are interested in reading more on Python one of the fastest growing programming languages that many companies and computer science departments use, then I recommend you check out the book Learning Python written by Mark Lutz’s.
To do this analysis, I will be using about 29 years worth of data from the S&P500 which is made up of 500 large cap companies in the US stock market, and is considered as a benchmark for the US economy.
The idea is to gather stock data from the S&P500, and get the daily simple returns for each day. Once I have that, I plan to average the daily simple returns for each dayand display them visually using a graph. This I believe will tell me the best and worst days to invest.