Intuitively, why are the following 4 variables useful predicting?
var AutoCorrel = Correlation(Price,Price+1,30);
var Volatility = ATR(30)/ATR(1000);
var DomPeriod = DominantPeriod(100);
var FD = FractalDimension(Price,30);
var AutoCorrel = Correlation(Price,Price+1,30);
var Volatility = ATR(30)/ATR(1000);
var DomPeriod = DominantPeriod(100);
var FD = FractalDimension(Price,30);
Quote from jcl:
Thanks for the link! I also tried first to use a tree for generating trade signals, but this didn't work very well. The trees became too complicated and could not be effectively pruned.
CART is indeed not suited in cases where the result can be expressed as a function of products of input variables. I think for this and other reasons, using a decision tree for generating trade signals won't work. However the tree method seems to work quite good as a trade filter. Dependent on input variables the trees look quite simple and have an effectivity in the 70%..90% range.
I'm just testing it with some simple algos. This is the original trade algo with the lowpass filter that I posted in the other thread:
Code:var *Price = series(price()); var *Trend = series(LowPass(Price,1000)); Stop = ATR(100); if(valley(Trend)) { sellShort(); buyLong(); } else if(peak(Trend)) { sellLong(); buyShort(); }
And this is the version with the CART filter:
Code:var *Price = series(price()); var *Trend = series(LowPass(Price,1000)); Stop = ATR(100); var AutoCorrel = Correlation(Price,Price+1,30); var Volatility = ATR(30)/ATR(1000); var DomPeriod = DominantPeriod(100); var FD = FractalDimension(Price,30); if(valley(Trend)) { sellShort(); if(adviseLong(0,Volatility,DomPeriod,AutoCorrel,FD) > 0) buyLong(); } else if(peak(Trend)) { sellLong(); if(adviseShort(0,Volatility,DomPeriod,AutoCorrel,FD) > 0) buyShort(); }
So I'm using some random indicators, such as fractal dimension, dominant cycle and so on, for input to the tree. The generated rul looks like this:
Code:int adviseEURUSD_S(var* signal) { if(signal[1] <= 12.938) { if(signal[3] <= 0.953) return -70; else { if(signal[2] <= 43) return 25; else { if(signal[3] <= 0.962) return -67; else return 15; } } } else { if(signal[3] <= 0.732) return -71; else { if(signal[1] > 30.61) return 27; else { if(signal[1] <= 19.315) return 8; else { if(signal[2] > 46) return -80; else { if(signal[0] <= -9.606) return -63; else return 62; } } } } } }
This is for EUR/USD short trades, for other currencies and long trades there are similar rules. The rules are generated by the optimizer and executed in trade and test mode. This is the implementation:
http://zorro-trader.com/en/advisor.htm
The original algo got about 75% annual profit, the version with the "advise" function got 163% profit on unseen data, although the input variables above are more or less random. I plan to test this with more algos and different input variables in the next time.