Publications by ivannp

ARMA Models for Trading

21.08.2012

In this tutorial I am going to share my R&D and trading experience using the well-known from statistics Autoregressive Moving Average Model (ARMA). There is a lot written about these models, however, I strongly recommend Introductory Time Series with R, which I find is a perfect combination between light theoretical background and practical imple...

7779 sym R (4979 sym/7 pcs) 4 img

A Greedy ARMA/GARCH Model Selection

26.10.2012

An idea that I have been toying for a while, has been to study the effect of a domain-specific optimization strategy in the ARMA+GARCH models. If you recall from this long tutorial, the implemented approach cycles through all models within a the specified ranges for the parameters and chooses the best model based on the AIC statistic. One idea wh...

2722 sym R (1982 sym/2 pcs)

Unstable parallel simulation, or after finishing testing, test some more

02.11.2012

Lately I have been working on a trading system based on Support Vector Machine (SVM) regression (and yes, if you wonder, there are a few posts planned to share the results). In this post however I want to share an interesting problem I had to deal with. Few days ago, I started running simulations using my latest code over years of historic data. ...

3221 sym R (56 sym/1 pcs)

Back-testing Rules

10.11.2012

Nowadays there are many trading strategies shared online with reproducible, decent, results. Have you asked yourself, if the strategies are so profitable, why the author bother even sharing them, when the path to riches is clear – just implement the strategy and use it? There are people, of course, who are fascinated and challenged by the marke...

4728 sym R (384 sym/1 pcs) 2 img

Parallelized Back Testing

16.11.2012

As mentioned earlier, currently I am playing with trading strategies based on Support Vector Machines. At a high level, the approach is quite similar to what I have implemented for my ARMA+GARCH strategy. Briefly, the simulation goes as follows: we step through the series one period (day, week, etc) at a time. For each period, we use history of p...

3272 sym R (4005 sym/1 pcs)

Trading with Support Vector Machines (SVM)

30.11.2012

Finally all the stars have aligned and I can confidently devote some time for back-testing of new trading systems, and Support Vector Machines (SVM) are the new “toy” which is going to keep me busy for a while. SVMs are a well-known tool from the area of supervised Machine Learning, and they are used both for classification and regression. ...

3354 sym R (698 sym/1 pcs) 6 img

Trading with SVMs: Performance

13.12.2012

To get a feeling of SVM performance in trading, I run different setups on the S&P 500 historical data from … the 50s. The main motif behind using this decade was to decide what parameters to vary and what to keep steady prior to running the most important tests. Treat it as an “in-sample” test to avoid (further;)) over-fitting. First the pe...

3070 sym 4 img 2 tbl

ARMA+GARCH Experiences

27.12.2012

A reader’s comment on my ARMA Models for Trading post asked about different aspects of my experience with ARMA+GARCH for trading forecasting. The more I thought about it, the more it looked like a full post. So here we go. Starting with the high level – what packages did I try? I have tried a few, the functions from the standard distribution...

3297 sym

2012 Summary and 2013 Plans

06.01.2013

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% (avoidi...

1807 sym R (891 sym/1 pcs) 2 img

Adding Comments to CSV Files

11.01.2013

Various of my R scripts produce csv files as output. For instance, I run a lengthy SVM back test, the end result is a csv file containing the indicator with some additional information. The problem is that over time one loses track what exactly the file contained and what parameters were used to produce it. I have considered various solutions. F...

1218 sym R (639 sym/1 pcs)