Blog Archives

Were markets exceptionally volatile in 2011?

January 2, 2012
By
Were markets exceptionally volatile in 2011?

2011 was a volatile year, no doubt about that, but was it exceptionally so from a historic point of view? To quantify the volatility, I used the Dow Jones Industrial average, which goes back to 1928 on Yahoo Finance: A volatile year no doubt, but once again confirming the fact that, in markets behaviour at

Read more »

More orthodox ARMA/GARCH trading

December 14, 2011
By
More orthodox ARMA/GARCH trading

The system described in the earlier series for ARMA trading was in fact an “extreme” version of the more common, orthodox approach prevailing in the literature. Recently I tried using R to reproduce the results of a particular paper, and that lead to a lot of new developments … How is typically ARMA trading simulated?

Read more »

Pre-computing a trading plan in parallel

November 11, 2011
By
Pre-computing a trading plan in parallel

R version 2.14 introduced a new package, called parallel. This new package combines the functionality from two previous packages: snow and multicore. Since I was using multicore to parallelise my computations, I had to migrate to the new package and decided to publish some code. Often trading strategies are tested using the daily closing price

Read more »

Covered Call ETF Performance

October 31, 2011
By
Covered Call ETF Performance

Covered call ETFs have become quite popular lately. Living in Canada, I have been holding a couple Canadian members of this family for the last few months. When I purchased them, I liked the benefits and since I wasn’t expecting any bull markets on the horizon, I bought some. These were new products back them,

Read more »

R. I. P. EMA

October 19, 2011
By
R. I. P. EMA

That’s right, I am moving away from exponential moving averages. Originally, I decided to use them somewhat arbitrary, probably because they tend to swing faster. Last night, after spending two and half hours debugging an issue which yet again turned out to be a particular property of these averages, I made my mind. I am

Read more »

Summarizing Returns with R

August 2, 2011
By
Summarizing Returns with R

Often I like to see the performance of a trading strategy summarized annually, quarterly or by month. In R, we start off with the summary function: Given a series xx, usually a chunk of the original, this function returns the accumulative returns for the period. The leverage is useful to somewhat simulate leveraged ETFs. The

Read more »

Yet another reason to avoid loops in R

July 12, 2011
By
Yet another reason to avoid loops in R

In some previous posts I have mentioned my struggles with the performance of the computations needed to implement the ARMA strategies in practice. Finally I have found a worthy solution, and as usual, there is a programming pattern to learn from it – avoid loops in R. My first approach was to optimize the algorithms.

Read more »

ARMA Models for Trading, Part VI

July 5, 2011
By
ARMA Models for Trading, Part VI

All posts in this series were combined into a single, extended tutorial and posted on my new blog. In the fourth posting in this series, we saw the performance comparison between the ARMA strategy and buy-and-hold over the last approximately 10 years. Over the last few weeks (it does take time, believe me) I back-tested

Read more »

Low-hanging R Optimizations on Ubuntu

July 1, 2011
By
Low-hanging R Optimizations on Ubuntu

A friend of mine brought my attention recently to the fact that the default R install is way to generic and thus sub-optimal. While I didn’t go all the way rebuilding everything from scratch, I did find a few cheap steps one can do to help things a little. Simply install the libatlas3gf-base package. That’s

Read more »

ARMA Models for Trading, Part IV

May 31, 2011
By
ARMA Models for Trading, Part IV

All posts in this series were combined into a single, extended tutorial and posted on my new blog. The last post promised to show some back testing results for the ARMA techniques. I decided to use the S&P 500 index for this purpose. What really impresses me in the above char it the staggering performance

Read more »