I thought I'd share with you a little experiment I'm performing to see if a neural network can be trained to successfully trade an index and/or forex.

Generally speaking, neural networks are trained by comparing the output it produces with an expected result and feeding the error back into the network so it can correct itself slightly. The next time the neural net is tested the output is slightly closer to the expect result.

But herein lies the problem with teaching a neural network how to trade - who's to say the way you are teaching it is either the best or correct way. You are teaching it with your own knowledge and therefore own misconceptions and mistakes and the neural net will repeat those mistakes after training. I've seen neural nets use moving averages, entry/exit rules and other such inputs to make trading decisions. I want to get away from this.

Wouldn't it be better to let the neural network figure out how to trade for itself?

So the aim of the experiment is to start off with a completely random network and let it trade and record the results. I am not going to tell it what results I am expecting, but just reward the best results. I am going to use Darwins theory of natural selection to let the network "evolve" itself into a better trader. The network will spawn off several copies of itself with small random variations, let them all trade and take the best few networks and discard the rest. Then repeat the process until consistent and reliable results are achieved and no more improvements can be found.

I also want to see what the optimum amount of data is necessary to produce the best network - e.g. for trading on daily candles do you need only 1 week of data or several months to make an accurate prediction.
That's the theory anyway. Currently I have no idea if it will work and it may take several neural net configurations before I have some consistent data. What will be interesting is to see what kind of trading approach evolves, I'm going to start trading with daily candlesticks and it'll be interesting to see whether it decides buy and hold is the best or whether it tries to trade short term swings.

Simple steps to start with, I am going to build a direction predictor. The output of the network will be a single neuron with 2 states - either BUY or SELL. I will input a range of candlestick data into the net and count how many pips are won/lost by the time the next candlestick is completed, then the net will evaluate BUY/SELL again.