Implementing Elo Ratings in Python

So my previous post looked at the maths behind Elo ratings and this post will go over how I’ve coded the rating system up in python. When I originally coded this up it was mainly to see how Elo ratings looked in the context of Prem rugby however now I plan to update them each week in light of the prem results and post predictions prior to each round. In terms of the code, in the words of Prussian field marshall Helmuth Karl Bernhard von Moltke: “No battle plan ever survives contact with the enemy.” What do I mean by this? I mean the code is probably going to change once the season starts as it was initially written to do a single piece of analysis but will need modified to make it easier to update on a weekly basis.

Read More