Now Reading
Statistics Galore

Statistics Galore

by The MoleAugust 24, 2017

I didn’t know Jason Statham was into statistics but when I told him about my newest project he was more than willing to model for today’s featured image. After which he punched out the camera man, stole my wallet, and ran off with the make up girl. My kind of guy! Alright, obviously we’re all bored to tears here, watching markets pump sideways as investors are waiting for news to emerge out of the annual Jackson Hole symposium tomorrow. So I thought I’d spruce things up a bit by leaking a few goodies:

If you recall, the project I was referring to is related to replicating many of the quant charts that Volar used to post here back in the days (i.e. until 2012). However while he was using Excel to manually slice and dice the numbers I’m actually implementing it all in python code, and the long term goal is to be able to produce a laundry list of statistical analysis for any symbol I damn well please. For now let’s focus only on the S&P 500 which is what I’m using during implementation.


Let’s start out with the easy stuff. Here’s the S&P500 on a percentage basis and averaged over the past 60 years (the SPX as we know it was launched on March 4th 1957). As you can see there’s a reason for the old expression ‘go away in May’ as the price action, for equity investors at least, becomes a lot more volatile after May all the way until mid October. Note how I am highlighting the current month, which of course is done automatically.


Now let’s drill a bit deeper. Here’s the SPX again averaged out on a monthly basis as a bar chart. I’ve plotted the mean % change values on top and below the bars for your convenience. As you can see, as an investor August is a good month to simply head to the beach and until you know how to short sell don’t come back until October. For the bears amongst you however September is your big month of the year, right after June?? Yes, June is actually the second most crappiest month on average. Interesting!


Here we are doing the very same thing but on a weekly basis, which I personally find most compelling as my trading horizon is usually a lot shorter. Highlighting the current week comes really handy here as I personally never know which exact week we are in. Yes, some years actually have 53 weeks, I actually didn’t know that before. Apparently next week is going to be the most bearish week of the year, so if you happen to be a bear or simply like to wear furry hats then you better show up for work!


As always I kept the best for last. This one took me quite a while to figure out as I had to extract each month into separate buckets and then properly plot them. Great exercise for learning python’s plot functions in more detail and it’s been great fun. What you’re looking at obviously is each month of the calendar year averaged and plotted separately. The fat dotted one in blue is of course the current month of September, which to no surprise runs sideways with a little hump during the crazy eighties. So apparently not only the music was better back in those days 😉

The current chart I’m working on takes the above monthly buckets and sorts them by four quantiles, i.e. quartiles. I’m still working on that but in case you’re curious here are the stats:

Quantile 1 (Bad):
September: -11.3
June: -2.8
February: -0.2

Quantile 2 (Moderate):
May: 0.4
August: 4.0
July: 9.0

Quantile 3 (Better):
October: 11.3
March: 13.4
January: 18.2

Quantile 4 (Best):
April: 18.9
December: 19.5
November: 19.8

So apparently June and February are second and third worst months, followed by May, August, and July which are sideways to positive. The better months are October, March, and January, no surprise there. And of course the best months are April, December, and finally November?? Yes, November actually beat the Santa Rally on average, who would have thunk?

About The Author
The Mole
Mole created Evil Speculator amidst the chaos of the financial crisis in early August of 2008. His vision for Evil Speculator is a refuge of reason, hands-on trading knowledge, and inspiration for traders of all ages and stripes. You can follow him and his nefarious schemes at the usual social media waterholes.
Enjoyed this post? Consider a small donation to keep those evil deeds coming!

BTC: 1MwMJifeBU3YziDoLLu8S54Vg4cbnJxvpL
BCH: qqxflhnr0jcfj4nejw75klmpcsfsp68exukcr0a29e
ETH: 0x9D0824b9553346df7EFB6B76DBAd1E2763bE6Ef1
LTC: LUuoD6sDWgbqSgnpo5hceYPnTD9MAvxi6c