Extreme Value Theory

Let’s talk about tail risk modelling today. In this blog, I want to introduce Extreme Value Theory (EVT) which concerns itself with modelling of the tails of a distribution, and its key results.  As we go along we will work through a toy example with basic R implementation.  There are two popular parametric approaches to … More Extreme Value Theory

Quantile Regression

In this post, I would like to quickly introduce what I believe to be an underutilized modelling technique that belongs in most analysts’ toolkit: the quantile regression model. As I am discussing some of the main points, I will be working with R’s quantreg package that is maintained by the inventor of quantile regression. See … More Quantile Regression

Flexible Distributions for Asset Returns – Part I [Generalized Lambda Distribution]

It is commonly known that financial returns exhibit characteristics that are not captured by the widely applied normal and log-normal distributions.  In a series of posts I want to present some flexible distributions that are well suited to model financial returns.  We will work our way through quick modelling exercises in R that show how … More Flexible Distributions for Asset Returns – Part I [Generalized Lambda Distribution]

Support Vector Machine Without Tears- Part3 [Kernel Trick]

The previous two posts have dealt with hard and soft margin SVM.  In both cases our model used a linear (hyperplane) decision boundary.  The only difference between the two is that the soft margin classifier does not split the two classes perfectly because the data is not linearly separable.  We still used a hyperplane but … More Support Vector Machine Without Tears- Part3 [Kernel Trick]

Support Vector Machines Without Tears – Part 2 [Soft Margin]

Today I will continue with the topic of SVM and extend the discussion to include classification problems where the data is not linearly separable.  In the previous post I described the hard margin classifier where we derived its mathematical formulation and implemented it in a spreadsheet. Hard Margin Classifier Recap We decided to use a … More Support Vector Machines Without Tears – Part 2 [Soft Margin]

Support Vector Machines Without Tears – Part 1 [Hard Margin]

I have been on a machine learning MOOCS binge in the last year.  I must say some are really amazing.  The one weakness so far is the treatment of support vector machines (SVM).  It’s a shame really since other popular classification algorithms are covered.  I should mention that there are two exceptions, Andrew Ng’s Machine … More Support Vector Machines Without Tears – Part 1 [Hard Margin]

Nonfarm Payrolls – 1900 Model Challenge

With the disappointing Nonfarm Payrolls print this Friday I decided to have a systematic look at how well common machine learning algorithms can nowcast this particular series. Dataset Description Private Nonfarm Payrolls. The most important statistic in the market and generates the most volatility.  Released on first Friday of a month and measures the monthly … More Nonfarm Payrolls – 1900 Model Challenge

Web Scraping and Text Mining in R

For a while now I had the intention of trying to use text mining techniques on central bank news releases.  Until today I have been hesitant because I was not sure of how to scrape the text from webpages.  Today I bit the bullet and went through R’s documentation and scoured coding forums.  Below is … More Web Scraping and Text Mining in R

Fitting Elastic Net Model in R

Quick Refresher: I have previously discussed penalized regression models in the context of ridge regression and the LASSO model.  These two models are special cases of the elastic net model.  Recall that in Ridge regression we included an L2 penalty term in our sum of squared errors loss function which we attempt to minimize to … More Fitting Elastic Net Model in R

Replicating GS-EQMOVE Model

As I sit here with a fresh pile of snow being dumped on Toronto I realised that most of my recent posts have been a little light on markets and a little heavy on machine learning.  I am reluctant to let all those efforts go to waste so I thought we can use some of … More Replicating GS-EQMOVE Model