Exploring mean reversion and cointegration with Zorro and R: part 1

This series of posts is inspired by several chapters from Ernie Chan’s highly recommended book Algorithmic Trading. The book follows Ernie’s first contribution, Quantitative Trading, and focuses on testing and implementing a number of strategies that exploit measurable market inefficiencies. I’m a big fan of Ernie’s work and have used his material as inspiration for a great deal …

Read more

A framework for rapid and robust system development based on k-means clustering

Important preface: This post is in no way intended to showcase a particular trading strategy. It is purely to share and demonstrate the use of the framework I’ve put together to speed the research and development process for a particular type of trading strategy. Comments and critiques regarding the framework and the methodology used are most …

Read more

Unsupervised candlestick classification for fun and profit – part 2

In the last article, I described an application of the k-means clustering algorithm for classifying candlesticks based on the relative position of their open, high, low and close. This was a simple enough exercise, but now I tackle something more challenging: isolating information that is both useful and practical to real trading. I’ll initially try two …

Read more

Unsupervised candlestick classification for fun and profit – part 1

Candlestick patterns were used to trade the rice market in Japan back in the 1800’s. Steve Nison popularised the idea in the western world and claims that the technique, which is based on the premise that the appearance of certain patterns portend the future direction of the market, is applicable to modern financial markets. Today, …

Read more

The Financial Hacker’s Cold Blood Index

This post builds on work done by jcl over at his blog, The Financial Hacker. He proposes the Cold Blood Index as a means of objectively deciding whether to continue trading a system through a drawdown. I was recently looking for a solution like this and actually settled on a modification of jcl’s second example, where an allowance …

Read more

Benchmarking backtest results against random trading part 2

In the first part of this article, I described a procedure for empirically testing whether a trading strategy has predictive power by comparing its performance to the distribution of the performance of a large number of random strategies with similar trade distributions. In this post, I will present the results of the simple example described …

Read more