Described here are some of the early (still yet unsatisfactory) attempts that I have obtained from using a two-layered neural network (one hidden layer and one output layer) with the sets of data that I have downloaded from dukascopy.com.
1. Network structure: feed-forward back-propagation, with the hidden layer containing somewhere between 20-50 neurons (Anything much above 40 will cause overfitting, or just plain unfitting).
2. Learning algorithms used: Levengerg-Marquandt, Scaled Conjugated Gradient , some others on a few instants. Transfer function is tanh(x) or as referred to in Matlab, tansig.
3. Data sets used are 5000 hourly bars from USDJPY, 3700 daily bars from Nasdaq-100, and 30,000 Minute bars from EURUSD. All contain Saturday and Sunday data. After cleaning up and isolating the cross points of SMA(10)-SMA(20) (in the Nasdaq case it was SMA(3)-SMA(8)) along with the MACD and RSI data at those points, I ended up with around 193 data items for USDJPY, 142 data items for Nasdaq, and around 1200 data items for EURUSD. Another test on EURUSD with the crossing of SMA(50) and SMA(100) yielded around 200 data items. A smaller data pool but way less noisy.
around 70-80% of the data was used for training, 10-15% for validation and 10-15% for testing.
Results were similar after a few epoch’s of training. Better with around 40 nodes in the hidden layer, however (in the USDJPY test) in a target vector where elements vary considerably between 5 to 150 pips (with a few noisy results above 250-300 pips), the mean square error was around 0.4-0.7, which after applying square root to, would give 50-80 pips away from targets. Still not an acceptable result.
The diagram below represents one of the tests:
However, for a data that is completely random, and inputs that are not supposed to be very intelligent in telling how the market trend is going to be, this is not bad at all. Of course many improvements will need to take place on both data quality and network structure before a satisfactory result can be reached. I’m thinking of the following:
1. Smooth target data: make it less noisy, clip very high targets so that over-fitting does not occur.
2. Increase either data pool so that I obtain more crossing points, or change the entry system rules to get more crossing points. The results where I had over 1000 items was considerably better than the cases with under 200 items.
3. Increase number of inputs to the network. Right now I only have 3 elements as inputs, MACD histogram, MACD signal, and RSI. This is clearly not enough and also pretty weak in determining a trend. The point though was to try out a simulation. More quality technical analysis tools are needed, such as surrounding point moving averages, several RSI’s, slow and fast stochastics, support and resistance, ADX and trend-angles, bollinger bands, etc…
4. Also, for approximation tasks, in previous research, it is best to use 2 hidden layers instead of one, with a higher number of inputs. a schema of 40-20-10-1 or 20-10-5-1 is preferred to the 3-40-1 I’m forced to use nowadays.
With all those improvements, I expect to see some advanced results with the following simulations. I just need to import way more CSV data (and clean it up), and learn more about creating custom neural networks (Chapter 12 of my 900+ book) and either create or import the unavailable technical indicators in matlab (such as ADX). On a second thought, they can be done with Qtstalker, if only I could find a nice way to export them.