Historical view of the SnP 500 Index since 1927, when corona is rampant in mid-March 2020

From Svendsen Tech PowerShell Wiki
Revision as of 18:07, 17 March 2020 by Wikiroot (talk | contribs)

Jump to: navigation, search

In this article you will find an historical view of the SnP 500 Index, and access to the code to produce it yourself, available on GitHub here. Here I use 14-day periods

I won't say or conclude much, but just present the numbers and the tool to acquire the same knowledge. I should optimize it as it took about 3 hours or so to process from December 1927 to today. I use the Yahoo financial data here, available for free.

The best SnP 500 index 14-day periods ever

I took every SnP 500 14-day period (or as close as possible, according to my algorithm) from December 30, 1927 to March 13, 2020 and pulled out the best ones. With my current code and method it will take about 3 hours for each time period you want to calculate for, so if I want to know the 7-day trend, I will have to re-run the code that populates the variable "$weekly" and change to subtract 7 days instead of 14. It occurs to me that I could use a 1-day interval and aggregate the results with post-processing to calculate all other intervals, based on that. It might not even be faster though, I haven't thought it through.

Incidentally, I read that yesterday represented the worst 18-day streak in history (March 16, 2020), without calculating myself, which is what gave me the idea to write this. Apparently, we have not yet hit the worst 14-day streak in history if my calculations are to be trusted.


The worst SnP 500 index 14-day periods ever

This shows the worst 14-day periods in history on the US SnP500 Index from December 30, 1927 to March 16, 2020.

We see the 2008 crash represented twice, the 1987 crash, and a lot of crazy around 1929 and going forward.

We also see that 2020 isn't included yet, but as I mentioned above, I read that March 16 represented the worst 18-day period since the 1929 crash, so it's a matter of details, most likely.

I clearly see that the code appears to be working as intended, though, by picking out the 1929 + aftermath and the 1987 crash and the 2008 crash.


The last two months on the S&P 500 Index

Indeed we see that March 2nd to March 16th 2020 is not so good for the SnP 500 index. Down 29.5 % according to my calculations.

Snp500 dev last couple of months.jpg

SnP 500 development with years before 1970 excluded, bottom list

Still 14-day intervals of the SnP 500 index. Now I've excluded years before 1970 to inspect more recent times.


SnP 500 development with years before 1970 excluded, top list

Here's the top list in descending order. Still 14-day intervals.


Here's a PowerShell transcript file with some of my session that gives the right people all they need to do the same: https://github.com/EliteLoser/Finance/blob/master/SnP500/snp500-14-dagers-analyse.txt