30
Jul
2007
Still though, why should you even bother using Genetic and Evolutionary algorithms in the first place? The reason why is because these algorithms use an evolutionary approach to selecting the “best fit” input variables. They’ll forward project outcomes to see which evolutionary path provides the best result for your output variable by transforming the input variables. In some cases they’ll even mutate the “offspring” to see what happens to your output!
What makes these algorithms so vastly different then just using a standard back propagation or regression algorithm is that they work by “preprocessing” your input data and help build a highly correlated model by transforming your data in the most robust input data set it can.
Now I’ve only scratched the surface of using Genetic and Evolutionary algorithms in YALE and there’s tons more for me to learn, but I’ve used them before in my experiments have had good success. Here are some examples where I’ve used them before:
All of these algorithms are found in YALE’s preprocessing data section and all of them are used right after you load your data into the experiment. They then apply their algorithms and “preprocess” your data before the experiment “learns” a model.
To show you how easy it is to use these types of algorithms in YALE/Rapidminer, I’m posting a small example of how to build a trading model using fundamental data. I won’t go into detail about all the different settings for the EA and we’ll just use the default settings for this experiment. First download the following files:
The Excel data file: Fundamental Data
The YALE XML file (in zip format): EA Experiment
Open YALE and load in your XML file and then the Excel Data file. Your experiment should look something like the image to the left.
This experiment takes fundamental data on several stocks such as book value, dividends payout, and EBITA, and tries to explain the output variable “1 Year Target Price” (or some other measure of your choosing). ![]()
If you have 100 years of time to spare you can assign weights to each of your input variables and then vary them till they match your output variable. The other faster way of doing this is to let YALE’s Evolutionary Weighting algorithm preprocess the data for you.
Then, the newly assigned weights are fed into the learner, in this case a SVM learner, and the model learns the relationships between the data. Once the model has finished learning, you should be left with a highly correlated model! Voila, you have now built a machine learned model using Evolutionary algorithms!
23 Responses
Sarah
July 31st, 2007 at 9:03 am
1Hi,
When I run the provided xml file with xls file, I get the following error. It might be because I am using rapid miner and not YALE. However, if you have some input on the error please let me know.
Error in PerformanceEvaluator (PerformanceEvaluator)
Input example set does not have predicted label attribute
Some operators like PerformanceEvaluator require the input example sets to have a predicted label attribute. The ModelApplier is the typical operator used to create predicted labels.
Thanks,
~Sarah
Sarah
July 31st, 2007 at 9:04 am
2I also have some other questions:
So what are evolutionary algorithms? Are SVMs, RVMs etc evolutionary algorithms?
The only way to use SVM for financial prediction, I believe, is through regression. Is there a way to use SVM classification for this problem?
Thanks,
~Sarah
Tom
July 31st, 2007 at 9:14 am
3Hi Sarah,
Its quite possible that your having problems because of using RapidMiner. However based on the error message, do you have the label_column set at 14 in the ExcelExampleSource operator?
Tom
July 31st, 2007 at 9:26 am
4SVM’s are Support Vector Machines, they’re a supervised learning algorithms typically used for regression or classification problems. Check out the wikipedia entry here: http://en.wikipedia.org/wiki/Support_vector_machine
You can use an IBK operator in place of the SWM if you like.
EA’s are bit kooky in nature and really hard to explain in a comment box but I can direct you to another wikipedia entry: http://en.wikipedia.org/wiki/Evolutionary_algorithm
For this example, EA’s analyze the data and assign weights to tell the SWM prior to learning which input is “fitter”. Normally the SWM would assign weights w/o the EA but doing this helps the learner create a model that takes into account forward mutations of your input. It helps the SWM learn that Input 1 has greater fitness/priority/value in the model than say Input 4 or Input 8. Does that make sense?
BTW, if anyone has more knowledge re: GA’s and EA’s, please feel free to join in and correct any misstatements!
Super Saver
August 8th, 2007 at 5:00 pm
5Thomas,
Thanks for your submission to the Carnival of Stocks. The idea of a self learning and self correcting model is appealing. This post will be included in the August 13, 2007 edition.
Eric
August 14th, 2007 at 8:15 pm
6I would caution you on the use of the word “best” when talking about evolution inspired algorithms. You may want to think “really good” or “approximate” instead of “best”. The only way to find the “best” solution is to iterate through all the possible solutions. Evolution is a great method to find “really good” solutions if you have a limited amount of time - run your process for 8 hours and take the best solution so far OR wait 8 days - either way, you have a working solution. Other algorithms give you an answer or no answer - I see this as a great benefit of using evolution for getting quick workable solutions.
Tom
August 15th, 2007 at 7:52 am
7Eric, thanks. I will try to avoid ambiguous and misleading terms. The problem is I get too overly excited sometimes when writing about this stuff!
Dekers
September 25th, 2007 at 3:56 pm
8Hi everyone,
I was wondering - I have two files
1. contains decimal value vectors
2. contains the labels to each of these vectors
do you know a way I could use both files to run SVM on my data? The issue is: I would like to avoid having to ‘fusion’ these two files into one containing the vectors labels.
I will be thankful for any tips you could give me
Thanks
Dekers
Tom
September 25th, 2007 at 8:58 pm
9Dekers, could you give us more detail as to why you want to keep these two files separate? I’m confused as to why you want to do that.
Evolutionary Feature Weighting Template | Neural Market Trends
September 28th, 2007 at 4:31 pm
10[...] This template is for a generic Evolutionary Feature Weighting experiment. You could apply this to fundamental or technical stock data or whatever tickles your fancy. For more discussion on this topic, see my post on Using Genetic and Evolutionary Algorithms to Build a Trading Model. [...]
Dekers
October 3rd, 2007 at 4:26 pm
11Hi Tom,
many thanks for your reaction.
Well - the reason why I wanted to do it with two files was that this is what I had. One file containing the vectors and one containing the labels. The reason for that is because I used to work with SPIDER, which is an SVM framework for MATLAB developed by MPI in Germany. I had big memory problems with it because MATLAB simply gave up after the data became about 900MB while it was processing and crashed each time.
There is actually a way of doing this with RapidMiner by editing the data file and fusing it with another file. But I would like to automate this and so I already changes the way my raw data is constructed.
Now I have one file containing the vectors and in the end of each vector I have a nominal label.
But now I have a different ‘problem’: I can’t seem to find an algorithm in RapidMiner that actually outputs the weights and the ‘omega’ calculated by SVM. Does any of you know how I could get my hand on these values? It seems like LibSVM will not output this data

I will be delighted to hear from you people!
Thanks
Dekers
Tom
October 5th, 2007 at 5:36 am
12Dekers, I know that Rapidminer will show you the weights in the “results window” and from there I believe you can save them to a file. I have to check on this later as I’m terribly busy right now. Can any reader help him out?
Marius Kjeldahl
October 6th, 2007 at 4:24 pm
13Any chance you would/could update this tutorial for RapidMiner 4.0? I’m running it in it and besides the warnings about stuff to replace (which I’ve tried), it seems it uses a different weighting scheme so it is hard to verify if results are comparable or not. I realize that no evolved model may be exactly like your run, but over time the preferred order should be more or less the same, at least for the most important variables. Also, 4.0 complaints about missing values so no plotting seems to work…
Thanks,
Marius K.
Tom
October 7th, 2007 at 6:30 pm
14Marius, I plan on updating the tutorials as part of my Ebook. It will be in Rapidminer format. Maybe I should start a wiki instead? What do you think? This way other folks can post their versions of tutorials.
Chloe
October 15th, 2007 at 12:17 am
15Rapid Miner already has a Wiki and forum:
http://sourceforge.net/forum/forum.php?forum_id=390413
http://yale.sourceforge.net/wiki/index.php/Main_Page
Tom, do you actually use this model? It doesn’t seem very useful as it is. Who decides the 1 year target? Once you have your model, how do you decide your top picks? Where do you get your fundamental data feed? I’m also trying to use RapidMiner to create a trading model as well. But I’m stuck learning all about data mining & RapidMiner quirks.
Tom
October 15th, 2007 at 5:15 am
16Chloe, I meant I was going to write an Ebook or wiki on how to use Rapidminer to build financial models.
The Fundamental model is tricky to build as you’ve already found out. In my beta model, I downloaded Yahoo fundamental data using a quote donwload software and then using GA’s found out which parts of the fundamental data drove the year end targets. These year end targets were determined by “experts” so I take them with a grain of salt, I would probably use a discounted cash flow model to calculate the 1 year target myself but I didn’t have time.
Once I learned which pieces of fundamental data drove the end price, I then plugged them into Yahoo Stock Screener to find which ones match my criteria.
I found Noble Drilling (NE) that way and have been long it since May(?) sometime, its a good earner so far.
Taotrader
April 1st, 2008 at 10:41 am
17Does anyone have any experience with Adaptiive Modeler from Altreva? It’s supposed to model financial data (stocks, ETFs, forex), including intraday, using genetic algorithms. The software is free.
http://www.altreva.com/
MB
May 9th, 2008 at 6:15 am
18Hi Folks, Do you rate such NN & AI programs such as neuroshell or TradingSolutions? I am consider making a purchase but what your feedback before I make a decision.
Tom
May 9th, 2008 at 4:18 pm
19If Neuroshell or TradingSolutions were to give me a free version to test out their systems, I’d be happy to post my feedback and review. However they haven’t emailed me yet!
MB
May 9th, 2008 at 4:50 pm
20Well email them!
dc
May 10th, 2008 at 2:56 am
21tom
trading solutions 4.0 has a 30 day free trial
neouroshell has a purchase and return with restocking charge within 30 days
THIS IS JUST FOR MB (email them yourself)
trading solutions in my opinion is very good but unless you are experianced in function modeling or abstract thinking in building your formula models it’s just like any other neural net.
Paying $2500 to just take a normal indicator and tinker with it, is quite foolish,and you can do that with any free software. With one ecception with trading solutions you can build an indicator of an indicator and thereby create your own indicators then test them. BUT STILL TO EXPENSIVE FOR JUST THAT
BUT, If you write your own formulas in abstract codeing that looks like your doing physics equasions then maybe.But either way you have about 1-2 years of studying to do before you know what is really possible, AND THEN you can learn how to tinker around with the neural net side and the way it calculates and learns, so add another 1-2 years.Then you can buy add ons that corrilate/combine with matlab and by the time your done learning, in about 5 years you can get back to us and tell us if it’s any good.
I GUESS YOU COULD LOOK AT IT AS SOMETHING TO KEEP YOU OUT OF TROUBLE AND AWAY FROM GETTING DRUNK AND GETTING ALL THOSE DUI’S YOU’VE BEEN GETTING LATELY,”RIGHT”SO SEE YOU IN 5 YEARS
P.S. MB don’t be afraid to go out there and take on responabilaty it will only make you a responsible person that wants to live in the real world.not someone that wants to aviod it NOW START THOSE EMAILS ROLLING!
Tom
May 10th, 2008 at 6:34 pm
22dc: I prefer Neuroshell and Trading Solutions to give me a free license of their software instead of a trail. If they do I can probably build downloadable models for my readers and help advertise their warez, if they’re any good that is.
MB
May 13th, 2008 at 1:50 pm
23DC: lol…you’re really quite funny!
RSS feed for comments on this post · TrackBack URI
Leave a reply
previous post: This Week’s Poll Results
next post: Yen Is Still In A Downtrend
to top of page...