Blog Archives

A volatility filter using historical vol

March 6, 2013
By
A volatility filter using historical vol

We have been looking at a way to improve risk adjusted returns by using a volatility filter. Although we could use VIX or equivalent, it turns out that historical volatility will work just as well, if not a little better.You can see part 1 here Digging into the VIX, and part 2 here What can we use...

Read more »

What can we use the VIX for?

March 3, 2013
By
What can we use the VIX for?

In part 1, we took a look at VIX and the relationship it had between historical volatility and realized volatility.Continuing on, I thought I would take a look at next day returns and the VIX. There is a relationship between SPX and VIX in that when SP...

Read more »

Digging into the VIX

March 3, 2013
By
Digging into the VIX

I wanted to revisit using some sort of volatility filter for systematic trading. In particular, if we are trading SPX, can we somehow use the VIX to produce better risk adjust returns? This is not about trading volatility, but more about using addition...

Read more »

Tracking down errors in R

January 29, 2013
By

It's that moment we all know and love, somewhere in our code something has gone wrong. We think we have done everything right, but instead of expected glory we find only terse red text lain below our lintel. This can be very frustrating, and trouble shooting these issues can often be very time consuming. All is not lost. There are a...

Read more »

Density Plot with ggplot

December 18, 2012
By
Density Plot with ggplot

This is a follow on from the post Using apply sapply and lappy in R.The dataset we are using was created like so:m <- matrix(data=cbind(rnorm(30, 0), rnorm(30, 2), rnorm(30, 5)), nrow=30, ncol=3)Three columns of 30 observations, normally distributed with means of 0, 2 and 5. We want a density plot to compare the distributions of the three columns...

Read more »

Using apply, sapply, lapply in R

December 18, 2012
By

This is an introductory post about using apply, sapply and lapply, best suited for people relatively new to R or unfamiliar with these functions. There is a part 2 coming that will look at density plots with ggplot, but first I thought I would go on a tangent to give some examples of the apply family, as they...

Read more »

Multidimensional Scaling and Company Similarity

July 30, 2012
By
Multidimensional Scaling and Company Similarity

Background and ideaOften we are looking at a particular sector, and want to get a quick overview of a group of companies relative to one another. I thought I might apply Multidimensional Scaling (MDS) to various financial ratios and see if it...

Read more »

Another cut at market randomness

May 20, 2012
By
Another cut at market randomness

I have some background in computer security and one day found myself tasked with assessing the quality of randomness for session id tokens generated by popular web frameworks (namely Java and .NET). As it turns out, NIST have developed a series of tests for just this purpose detailed here.As a non-believer in the absolute randomness of markets, I thought...

Read more »

Mebane Faber Tactical Asset Allocation in R

April 13, 2012
By

In 2006 Mebane Faber published a great piece of research detailing an asset allocation system that was both very easy to understand and implement, as well as carrying very respectable risk adjusted returns.The details are available in his paper&nb...

Read more »

Machine Learning Examples in R

February 12, 2012
By
Machine Learning Examples in R

This is a post that has been a long time in the making. Following on from the excellent Stanford Machine Learning Course I have made examples of the main algorithms covered in R.We have Linear RegressionFollowed by Neural NetworksAnd Support ...

Read more »