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 →

Creating Algorithmic Trading Portfolios with Quantopian (PART I)

Catching up My goals for this summer are to firstly, keep studying portfolio management and start reading Meucci Risk and Allocation; secondly, develop trading strategies and find some cheap way to implement them.  My current focus is on FX, due to its cheap spreads, however that seems to be changing as I realize a lot of the limitations of Metatrader. Moving onto API-based systems also present itself a problem since Questrade is currently stocks and options only... Side objective this summer is to casually read sports analytics cause it's extremely interesting (Did you know that the inferred probability of England […]

Continue reading →

K-Means Portfolio for Value Investors

The Matlab code to easily create your own K-Means Portfolio is up!!  Click here to see it on my Github K-Means Clustering is the simplest clustering algorithm for discovering patterns and structure in data among many dimensions.  Can it work for Value investors? Let's do a simple test to see if it holds up in out-of-sample testing. Basic Overview Without getting into much of the math (a simple google search will suffice), K-Means clusters data through a simple iterative algorithm that initiates centroids and moves each centroid toward an optimized mean where the cost function : euclidean distance between each point and the […]

Continue reading →

A Forex News Trader called "Newspaper"

School is continuing as usual and I have been doing a lot of reading in portfolio optimization/management as part of my position in The Fund.   Recently, I've been coding on the side for an automated forex trader that trades off of economic indicator releases.  The other algorithmic pursuits I have been working on such as AREMA, etc hasn't been working well.  I spent a lot of time on debugging it but when it comes to backtesting, it is very difficult to churn a positive profit.  I haven't bothered with the machine learning aspect of it either but it might be […]

Continue reading →

Cointegration and Statistical arbitrage

Recently, I was introduced to the concept of Cointegration analysis in time-series.  I first read this in a HFT blog at Alphaticks and then the concept came up again when I was looking into Spurious Regressions and why they occur.  Lot's of Quants have blogged about this idea and how it can be applied to the premise of Statistical Arbitrage.  I will do the same and apply this to the not-so-recent Google stock split, however, I will also try to add some math into the mix, briefly touch on Error-correction mechanism and spurious regression.  Finally, I will also give a few criticisms against […]

Continue reading →

U.S Unemployment Time-Series Modelling (Part 1)

One of the many benefits of improving economic forecasts is being able to trade releases with better information through forex and stocks.  Certain sites such as Forexfactory provide a forecast parameter and I was able to play around and figure out some just use standard ARIMA models.  In Part 1, I will show how to estimate unemployment rate log changes and Part 2, I will implement this through a modified BP neural network (if i can get it to work...).  I will be benchmarking my residuals with a standard ARIMA model along with an exogenous regressor (initial claims).  The data was obtained […]

Continue reading →