My most recent advancements into machine learning
Hey guys, I'll come up with a more detailed explanation of my experiences at RBS, but for those going into neural networks and other forms of machine learning, I suggest you go through these three websites.
These three websites explain to an extent a new application of genetic networks. I'm currently doing some research in conjunction with University of Texas and Columbia University to develop a testing model for forex. Here are the two models we are testing:
Phase 1: Initial Seeding
During this phase, I just threw four different trading systems:
I then had all of them run against one year of data. The system then picks the system with the highest success score (see my signature "How I Rate Trading Systems").
I have gone through 77 weeks and generations so far. There are a total 43 offspring in this current generation. Average success score is about 160, ranging from 50 to 200.
Current bid: 1.23456
The success score of this model is around 90.
Obviously, the first project is starting to show more promise, and I would love for there to be a competing project hosted here on ForexFactory (Oh Twee-ee...).
Anyway, have a look around. I would love to see how the FF community evolves this project =D
This is interesting stuff, I was looking though some of these papers about a year ago, it certainly solves the problem of the best network topology and doing the evaluation genetically means one does not have to write all sorts of nasty equations to perform a gradient decent/ascent. Anything which cuts down the number of free parameters is a good thing. The only problem with reading the literature surrounding AI & trading is that they always evaluate their systems in such a hopelessly naive way (e.g. trying to predict the direction of the next bar, for example).
From what I've read of the research paper, the idea behind the NEAT method is baby steps.
For example, you do not try to teach a newborn child stochastic calculus the day he/she's born. You follow a sequence:
The progression I intend to go on is fairly basic and should be simple enough:
I don't expect to be right 100% of the time, but the closer I get, the more valuable this is to me.
To elaborate, look at the evolution of this drawing on this website: http://www.cs.utexas.edu/users/kstanley/rocket.html
Here's the software to make your own drawings.
I did some experimenting with NEAT a couple of years ago. I did like the idea behind it, but it is slooow and impossible to use on large data sets (unless you got some serious cluster running it). The general problem with applying concepts from machine learning to trading is that no learning algorithm can learn anything reasonable if there is no information contained in the data. Furthermore it is very difficult to teach an algorithm how the underlying forces that moves the market works.
It all boils down to what inputs are chosen and how the outputs are interpreted (ya know - garbage in = garbage out). If the inputs are sound then any learning algo should be able to get something usefull out of it.
IMO one is better off by having a well developed underlying algorithm which exploits some kind of edge and then optimize it by an overlying machine learning layer.
I actually think RR's approach is valid because the underlying trading systems will work in the type of markets the specialize in (ranging, trending..) - Its just a matter of teaching the system when to use the proper system. He's not trying to teach the system HOW to trade just when to use the right system - A MUCH smaller task.
The difference between today and a few years ago is I now have OpenCL and CUDA. In other words, I'm using graphics cards in addition to my CPU. So, I get far more performance than with hardware from pre 2007. I'm seeing easily a 10-fold increase in my computing power for this particular task.
As for those generations, they are in-sample.
You got it!
A little more 'NEAT' stuff.
Thank you for the links. I found the links very informative and interesting.
Please do kindly mentor me :)
Hi Ronald, the thread is very awesome..if you don't mind please do kindly mentor me by answering the questions.. on how did you scale the data series(the prices)? a code snippet would be delightfull
Here is my latest attempt.
Resampling: Bootstrap (25 reps)
Summary of sample sizes: 5991, 5991, 5991, 5991, 5991, 5991, ...
Resampling results across tuning parameters:
size decay RMSE Rsquared RMSE SD Rsquared SD
1 0 0.0772 0.765 0.0452 0.379
1 0.001 0.0302 0.947 0.0432 0.127
1 0.01 0.0616 0.831 0.0494 0.149
1 0.1 0.00715 0.995 0.00062 0.000766
3 0 0.0264 0.981 0.0406 0.067
3 0.001 0.0102 0.984 0.019 0.0618
3 0.01 0.0113 0.984 0.0197 0.0533
3 0.1 0.00721 0.995 0.00068 0.000818
7 0 0.00606 0.997 0.000849 0.0011
7 0.001 0.00594 0.997 0.00098 0.00135
7 0.01 0.00586 0.997 0.00057 0.000662
7 0.1 0.00734 0.995 0.000477 0.000643
15 0 0.00597 0.997 0.000718 0.000867
15 0.001 0.00646 0.995 0.00322 0.00791
15 0.01 0.00575 0.997 0.000448 0.000532
15 0.1 0.00742 0.995 0.000402 0.000561
RMSE was used to select the optimal model using the smallest value.
The final values used for the model were size = 15 and decay = 0.01.
Attached is a graph of the test data. The red line is the prediction based on the model it is shifted 6 steps to the left.
Fairly accurate model considering the test data was not included in the trainging and counts for roughly 15% of the totally dataset.
But how far forward are you able to look?
I believe that model was only predict the next future bar. It did not prove to be very useful though. After examining the output data a bit more the values giving were very close to the previous bars but not much further form the last bar. Sure did give the impression that it was close after running all the numbers. But as being profitable not so much.
I stumbled upon some more promising work with SVMs I hope to get some time to take a better look at in the future.
Near the bottom it has a comparison between the classification and regression strategies using RSI's as input.
© Forex Factory