Hierarchical bayesian rating model in PyMC3 with application to eSports

Suppose you are interested in measuring how strong a counterstrike eSports team is relative to other teams.  This measure will need to be able to predict the outcome of a  heads-up matches between two teams. We can use bayesian analysis to do this through inferring a latent rating variable for each team that predicts match results.  This rating variable should reflect the relative strength and consistency of a team since all sports outcomes are inherently probabilistic. Quick debrief on Counterstrike Professional counterstrike consists of two teams of 5 players playing head to head on one of the seven available maps with first to reach 16 rounds […]

Continue reading →

Lifetimes Part 2: Gamma Spend Model and Financial Valuation

See here for the full iPython Notebook code.  Some of the descriptions are outdated but the code is almost the same. After getting to know what lifetimes can provide, I started applying it from a financial perspective.  I wanted to answer the most important question for Zakka Canada:  Leveraging our customer analytic models, how can I estimate the firm value that Zakka Canada is worth as of today? The rest of this post is divided into two parts: 1) modelling the monetary value of our customer base and 2) estimating the price of Zakka Canada through a simple present value cash flow valuation […]

Continue reading →

Lifetimes Part 1: Customer Analytics

What is Customer Analysis?   Customer analysis, being such a vague phrase, can mean a lot of different things whether that's from businesses, financial analysts or everyday ordinary people.  The work I will be drawing upon comes from Peter Fader, Bruce Hardie as well as Cameron Pilon.  The research by Fader and Hardie matches the math with the customer behavioral story.  This is often referred to as Customer Lifetime Value (CLV), Recency, Frequency, Monetary Value (RFM) or Customer Probability Models, etc. etc.  These models focus exclusively on how customers make repeat purchases over their own lifetime relationship with the company.  Cameron Pilon later transformed their work into an easily implementable […]

Continue reading →

Optimal Alphadraft Bankroll Management with Beta-Beta Model and Kelly Criterion

For context, you can read my previous post on alphadraft betting for CS:GO here. After we have developed a concrete model for drafting our line-ups, we want to focus more on the bettor's bankroll management over time to minimize risk, maximize return and reduce our probability of ruin.  In this blog post, I will first describe the typical scenarios behind Alphadraft contests and how that can be translated to our probability model for win/loss (Beta-Beta Model).  We can then modify the standard Kelly Criterion to fit our case and calculate the optimal % bankroll to bet per game. Note that the concepts […]

Continue reading →

Volatility Models and Backtests on Quantopian

In this blog post, I will present some backtest results on volatility models.  The list I present here are not exhaustive and there are still a gargantuan set of papers focusing on this issue (a good place to start is on vlab).  In the next section, I present some simple notations to define financial volatility and then define each model and show general backtest results with risk attributes.  The premise of the backtest is as follows: financial volatility of an investment portfolio is able to be minimized globally through allocating the correct amount of dollar toward each asset within the portfolio. […]

Continue reading →