**Quintuitive » R**, and kindly contributed to R-bloggers)

2012 was a very important year for me. It was my first full year of trading only pure quantitative strategies. It was a very successful year as well, despite the fact that the S&P 500 returned 16% (including dividends) – a tough to beat benchmark.

The strategy I use on the SPY, for which I share my entries and exits, returned about 25% (avoiding precise numbers here on purpose) in “theoretical” setting (before accounting for leverage, trading and other fees)! With leverage the returns were well above 35%. The maximum drawdown was mere 6%. How did I do in real life? I did manage to capture a good portion of the theoretical returns.

The ARMA+GARCH strategy was also a good performer, netting 20.6% returns, with a maximum drawdown of 6.6%.

As the following chart illustrates, 2012 was a year of low volatility on historic basis:

The following code confirms:

library(quantmod) getSymbols("DJIA", src="FRED", from="1800-01-01") # Use FRED, Yahoo does not provide Dow Jones historic data anymore dji = na.exclude(DJIA["/2012"]) djiVol = aggregate( dji, as.numeric(format(index(dji), "%Y")), function(ss) coredata(tail(TTR:::volatility( ss, n=NROW(ss), calc="close"), 1))) ecdf(as.vector(djiVol))(as.numeric(tail(djiVol,1))) # The result is 0.2905983, the 29nd quantile # Compute the absolute returns absRets = na.exclude(abs(ROC(dji["/2011"], type="discrete"))) # Summarize annually yy = as.numeric(format(index(absRets), "%Y")) zz = aggregate(absRets, yy, function(ss) tail(cumprod(1+ss),1)) print(as.vector(tail(zz,1))) # The result is 3.96

The second computation shows how much money an owner of a crystal bowl would have made at best – he would have been able to multiply his money less than four times!

Turning to the future, my main goal for 2013 is to move my infrastructure supporting trading and blogging to the Amazon’s EC2. Thus, expect a slight shift in focus on this blog. Only slight, because my hopes are that I will have sufficient time for new strategy research. My todo list in this area is quite long, the main factor, as always, is time.

**leave a comment**for the author, please follow the link and comment on his blog:

**Quintuitive » R**.

R-bloggers.com offers

**daily e-mail updates**about R news and tutorials on topics such as: visualization (ggplot2, Boxplots, maps, animation), programming (RStudio, Sweave, LaTeX, SQL, Eclipse, git, hadoop, Web Scraping) statistics (regression, PCA, time series, trading) and more...