Thursday, December 20, 2012

Beating market with technical analysis... by pure chance

Many people believe in power of technical analysis. Plenty of trading strategies are based on signals generated by technical indicators.

Much fewer people are trying to verify the quality of these indicators, though.

While working on some prediction models I have decided to put some of these technical indicators to the test.

First I would like to see, how these indicators are correlated among each other:

Fig. Cluster Dendogram for selected Technical Indicators

One can clearly see that some indicators - like RSI and CCI for example - are pretty close to each other.

Nevertheless none of the indicators were found to be correlated 0.95 or more to any other (note: the methodology for checking correlations between indicators was a little different than the one used for constructing the dendrogram)

Knowing something about the connections between the indicators is one thing. The totally different story is to verify their predictive power in relation to returns.

Here we can once more start with correlation:

     [,1]       [,2]        [,3]              [,4]         [,5]           [,6]             [,7]           [,8]            
[1,] "x.skew25" "x.trend25" "x.HH_LL.25.High" "x.change25" "x.up.ratio25" "x.MACD.12.26.9" "x.Ultimate.7" "x.kpss.level25"
[2,] "0.23541"  "0.22487"   "0.20162"         "0.18177"    "0.16651"      "0.16404"        "0.14708"      "0.14135"       

     [,9]      [,10]      [,11]      [,12]      [,13]       [,14]       [,15]            [,16]           [,17]    
[1,] "x.sd25"  "x.CCI.20" "x.ADX.14" "x.RSI.14" "x.OBV.252" "x.DVI.252" "x.kpss.trend25" "x.scaleTau225" "x.adf25"
[2,] "0.12177" "0.12023"  "0.11260"  "0.10858"  "0.10350"   "0.09826"   "0.09149"        "0.06537"       "0.05890"

[1,] "x.hurst25"
[2,] "0.03247"  

As you can see, correlation coefficient rarely reaches 0.2.

Additionally, we can use RELIEF algorithm, that should help us identify non-linear relations in our model:

RELIEF: 0.2 
         x.sd25 x.HH_LL.25.High       x.OBV.252   x.scaleTau225  x.MACD.12.26.9        x.ADX.14      x.change25 
    0.194510019     0.193041550     0.189254007     0.168264622     0.137401102     0.125753731     0.083702019 
   x.up.ratio25       x.hurst25        x.skew25        x.RSI.14       x.DVI.252       x.trend25  x.kpss.level25 
    0.071718162     0.069785953     0.062099966     0.053276906     0.042572825     0.028786406     0.018634994 
 x.kpss.trend25    x.Ultimate.7         x.adf25        x.CCI.20 
    0.018233187     0.011072828     0.009101300     0.003876559 

Unfortunately, RELIEF seems to confirm the low correlation scores we got in the previous step :(

We can also try to combine some of our features (i.e. technical indicators in this case), using PCA:

Fig. PCA components for selected technical indicators

However, while ordinary PCA gives us some hopes for increasing the predictive value of the features we use here, the much powerful Kernel PCA is not so promising:

Fig. Kernel PCA for selected technical indicators

While the predictive power of technical indicators (at least as used in this analysis) seems to be virtually non-existent, it is not impossible to beat the market using it. Occasionally...

Fig. Some AT-based model realization
(market=+0.9%; strategy=+6.3%)

No comments: