Publications by ivannp
Automatic ARMA/GARCH selection in parallel
In the original ARMA/GARCH post I outlined the implementation of the garchSearch function. There have been a few requests for the code so … here it is. Quite easy to use too: library(quantmod) source("garchAuto.R") spy = getSymbols("SPY", auto.assign=FALSE) rets = ROC(Cl(spy), na.pad=FALSE) fit = garchAuto(rets, cores=8, trace=TRUE) After the...
1293 sym R (161 sym/1 pcs)
Analyzing the DVI Indicator
The DVI indicator is a well-known indicator, created by David Varadi from CSS Analytics. It was introduced in 2009 as a good predictor for the S&P 500 over the past 30 years. Its performance on the S&P 500 has been studied in the blogosphere comprehensively. None of these studies, however, contained everything I was looking for, and since I have ...
3342 sym R (1506 sym/4 pcs) 2 img
2013 Summary
2013 was a tough year. Trading was tough, with one of my strategies experiencing a significant drawdown. Research was tough – wasted a lot of time on machine learing techneques, without much to show for it. Also made some expensive mistakes, so all in all – it was a year I’d prefer I had avoided. The strategy I use on the SPY, for which I...
2026 sym R (891 sym/1 pcs) 6 img
Analyzing the DVI Indicator – Entry Power
In a recent post, I did some analysis of the efficiency of the DVI indicator. That was pretty much all I had to say back then, but that quickly changed. While reading Building Reliable Trading Systems, by Keith Fitschen I stumbled upon an alternative way to visualize entry efficiency – the entry power. The chart shows the average return x-days...
1828 sym R (512 sym/1 pcs) 6 img
A Year of Using RStudio
It has been more than a year since I decided to give RStudio yet another try (yes, there were previous attempts) and … I can’t live without it today! Nowadays I use it almost 100% of the time when working on R code, but the reason is not just a preference over my favorite editor/environment (vim). In fact, I still like vim much better for edi...
2867 sym 2 img
Beyond R, or on the Hunt for New Tools
For more than four years now (judging by the first post on my old blog), R has been my primary tool for market research. It has thought me a lot, and it has helped me to me advance smoothly in the field of semi-automated trading. Lately however I started realizing that R is lacking essential tools for my new needs and after some serious deliberat...
3049 sym
Shortcuts for quantmod
Over the years, there have been a couple of issues I have been trying to address in my daily use of this excellent package. Both are “cosmetic” improvements, they only improve the usability of the package. Let me share them and see whether they can be improved further.:) First, let’s reduce the typing involved with getSymbols. Compare what...
1540 sym R (205 sym/2 pcs)
DVI Performance
This is the next post in the DVI indicator series. After the first two (here and here) analyzed in details the post-entry returns and the entry power of this indicator, it’s time to take a look at the trading performance. Using the Systematic Investor Toolbox, we get some pretty decent results: Equity Curve Performance Statistics CAGR of 16.15...
1341 sym R (62 sym/1 pcs) 4 img
Synchronization for R with the flock Package
Have you tried synchronizing R processes? I did and it wasn’t straightforward. In fact, I ended up creating a new package – flock. One of the improvements I did not too long ago to my R back-testing infrastructure was to start using a database to store the results. This way I can compute all interesting models (see the “ARMA Models for Trad...
3083 sym R (1053 sym/3 pcs)
Storing Forecasts in a Database
In my last post I mentioned that I started using RSQLite to store computed results. No rocket science here, but my feeling is that this might be useful to others, hence, this post. This can be done using any database, but I will use (R)SQLite as an illustration. Let’s assume we are running a long ARMA/GARCH simulation (see here for an example)...
2128 sym Python (2623 sym/2 pcs)