Category Archives: Research

Forecasting Opportunities

The previous post in this series, showed a way to identify trading opportunities. The approach I implemented used time series daily data to identify good entry points in terms of risk-reward. The natural next step is to try to make use of these opportunities using machine learning.

Read More

Adding back the Swiss Franc, or not?

The recent move by the Swiss National Bank (SNB) to remove the peg between the Swiss Franc and the Euro has caused lots of turmoil (see here and here) in an already volatile environment. The magnitude of the event was a pure surprise to me. Yes, this is Switzerland, and this is the Swiss Franc, but, from a mere technical point of view, after the peg in September 2011, the Franc should not have been treated any more as a major currency. Consider, which currencies are pegged? If China removes the peg between the Yuan and the US dollar, would it send the same shock waves through the world markets? I doubt it.

Read More

Is the Russell 2000 primed for a Long?

Today over a coffee, me and a friend did a quick analysis on the Russell 2000. The reason was that I was holding a short, and was debating whether to close it or not. Not only the outcome of this analysis made my action clear, but it also surprised me quite a bit. Here are the monthly statistics for the month of December.

Read More

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.

Read More

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 a few indicators on my todo list, I decided to use the DVI to create an approach for analyzing indicators.
Read More

On-Close Trading with LOC & MOC Orders

In a previous post I discussed how to implement in real trading a strategy back-tested on the close (the signal is generated on the close and the trading is performed on the close too). The main tool was pre-computing what I call tables of actions. In my opinion, the complexity of implementing a strategy in real trading depends on the types of tables of actions the strategy generates, and in this post I am going to show you a system which can be implemented using only the two on-close orders provided by Interactive Brokers and other retail brokerages.

Read More

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 last code line above, fit contains the best (according to the AIC statistic) model, which is the return value of garchFit. The function has reasonable defaults, but also provides controls over various aspects of the model selection – check the code.

The function is called garchAuto, following the naming convention of the fGarch package. In fact, I am trying to get it into the fGarch package, but haven’t heard back yet. There are reasons why I don’t feel too optimistic about this happening, hence, my decision to publish it here.

Last, if you wonder why I abandoned the original garchSearch name, the reason is that a similar function from the forecast package is called auto.arima (“auto”, not “search”).