Articles by ivannp

Parallelism via “parSapply”

December 13, 2014 | ivannp

In an earlier post, I used mclapply to kick off parallel R processes and to demonstrate inter-process synchronization via the flock package. Although I have been using this approach to parallelism for a few years now, I admit, it has certain important disadvantages. It works only on a single machine, ... [Read more...]

Storing Forecasts in a Database

November 29, 2014 | ivannp

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’... [Read more...]

Synchronization for R with the flock Package

November 20, 2014 | ivannp

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 ... [Read more...]

DVI Performance

September 24, 2014 | ivannp

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 ... [Read more...]

Shortcuts for quantmod

May 28, 2014 | ivannp

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’... [Read more...]

Beyond R, or on the Hunt for New Tools

May 12, 2014 | ivannp

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 ... [Read more...]

A Year of Using RStudio

February 25, 2014 | ivannp

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 ... [Read more...]

Analyzing the DVI Indicator – Entry Power

January 15, 2014 | ivannp

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 ... [Read more...]

2013 Summary

January 6, 2014 | ivannp

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 ... [Read more...]

Analyzing the DVI Indicator

November 30, 2013 | ivannp

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 ... [Read more...]

Automatic ARMA/GARCH selection in parallel

March 24, 2013 | ivannp

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: After the last code line above, fit contains the best (according to the AIC statistic) model, which is ... [Read more...]

Adding Comments to CSV Files

January 11, 2013 | ivannp

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 ... [Read more...]

2012 Summary and 2013 Plans

January 6, 2013 | ivannp

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 ... [Read more...]

ARMA+GARCH Experiences

December 27, 2012 | ivannp

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 ... [Read more...]

Trading with SVMs: Performance

December 13, 2012 | ivannp

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 ... [Read more...]

Trading with Support Vector Machines (SVM)

November 30, 2012 | ivannp

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, ... [Read more...]

Parallelized Back Testing

November 16, 2012 | ivannp

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) ... [Read more...]

Back-testing Rules

November 10, 2012 | ivannp

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 ... [Read more...]

A Greedy ARMA/GARCH Model Selection

October 26, 2012 | ivannp

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 ... [Read more...]
1 2

Never miss an update!
Subscribe to R-bloggers to receive
e-mails with the latest R posts.
(You will not see this message again.)

Click here to close (This popup will not appear again)