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

From Svendsen Tech PowerShell Wiki
Jump to: navigation, search
(SnP 500 development with years before 1970 excluded, bottom list, 7 day intervals)
Line 57: Line 57:
 
== SnP 500 development with years before 1970 excluded, bottom list, 7 day intervals ==
 
== SnP 500 development with years before 1970 excluded, bottom list, 7 day intervals ==
   
Here are 7-day intervals as of March 16.
+
Here are 7-day intervals as of March 16, 2020.
   
 
<pre>
 
<pre>

Revision as of 12:58, 18 March 2020

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.

Snp500dev-2020-03-16-best-14-day-periods.jpg

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.

Snp500dev-2020-03-16-worst-14-day-periods.jpg

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.

Snp500-14-day-after-1970-bottom.jpg

SnP 500 development with years before 1970 excluded, top list

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

Snp500-14-day-after-1970-top.jpg


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

SnP 500 development with years before 1970 excluded, bottom list, 7 day intervals

Here are 7-day intervals as of March 16, 2020.

UsedStartDate UsedEndDate PercentDevelopment
------------- ----------- ------------------
1987-10-12    1987-10-19        -37,60452789
1987-10-13    1987-10-20        -32,80411533
2008-10-02    2008-10-09        -22,45912276
2008-10-03    2008-10-10        -22,24261198
2020-03-05    2020-03-12        -21,90160892
2008-11-13    2008-11-20        -21,11131460
1987-10-15    1987-10-22        -20,07250232
1987-10-14    1987-10-21        -18,13221035
2008-10-01    2008-10-08        -17,88129801
2008-09-30    2008-10-07        -17,07738257
2008-10-20    2008-10-27        -16,07690286
2020-03-09    2020-03-16        -15,10522032
2011-08-01    2011-08-08        -14,96078340
2020-03-04    2020-03-11        -14,18045840
1987-10-16    1987-10-23        -13,89090761
1998-08-24    1998-08-31        -13,66997974
2020-02-20    2020-02-27        -13,24275768
2020-02-21    2020-02-28        -12,98244656
2002-07-16    2002-07-23        -12,94220740
2020-03-02    2020-03-09        -12,51274007
2011-08-03    2011-08-10        -12,45404500
2015-08-18    2015-08-25        -12,27825610
2002-07-15    2002-07-22        -11,96316642
2008-11-04    2008-11-11        -11,88052579
2008-11-05    2008-11-12        -11,78810670
2000-04-07    2000-04-14        -11,77905217
2015-08-17    2015-08-24        -11,05159936
2009-02-24    2009-03-03        -11,03068892
1987-10-21    1987-10-28        -10,75960481
2008-09-26    2008-10-03        -10,37453873