Rapidminer Video Tutorial - How Stock NeuroMaster Works
After playing around with Stock Neuromaster, I realized that it transforms the time series data into a zig zag line or moving average and then learns the relationship between it and the price & volume data. The zig zag line connects high and low points together based on a % retracement level you define or a time period you choose for a moving average. Once the data is transformed to reflect this, its fed into the neural net as your output variable and the time series data becomes your input variables.
In this video tutorial, viewers will be able to create a similar type of model for Apple and learn how to use a great time saving data preprocessing operator called LabelTrend2Classification, see how to create Attribute and Data files, and use the NeuralNet learner from Rapidminer 4.2
Get the Flash Player to see this player.
As a parting gift, you can download the data files and Rapidminer experiment here.



July 26th, 2008 at 3:54 pm
Hi Tom…..just letting you know I sent you an email via your “contact” form. Sometimes my email address gets flagged as spam because it has “love” in the address. Hopefully, you’ll get the submission I completed.
CHEERS!
David
July 26th, 2008 at 4:11 pm
David, I did get your email but didn’t read it in detail. I’ll get back to you shortly.
July 26th, 2008 at 7:20 pm
Tom,
Great Video! Thanks for spending the time and effort to record these. I wanted to make a couple of comments that hopefully you will find interesting/helpful.
1) The only problem with using a moving average as your output target is you are immediately introducing lag into your prediction. The longer the moving average you use, the smoother it will be, thus the better the neural network will so with prediction, however the lag will also be longer and will end up killing your profit when you go to actually trade the signals.
2) I didn’t notice in your video if you had offset the moving average variable or not. The goal, as I understand it, is to predict what tomorrows trend will be so that you can position your trades appropriately, yes? If this is the case, the ouptut moving average label should be tomorrows moving average value, not the value at the close of the current day.
3) I’m glad you like the LabelTrend2Classification preprocessor. I made the initial feature request to the RapidMiner team to include it
July 26th, 2008 at 7:34 pm
Soren: Your comments are great and valid. You have to remember, I’m just trying to figure out how SNM works from what I see, I think the development team wouldn’t be so forth coming with their system and answer all my questions.
Yes, there is a lag in the prediction doing it the MA way and just like you, I would offset the variable by one or two steps, train the model, and hopefully indentify those trend flips in the future.
My hats off too you for suggesting that feature request to the RM team, its a wonderful and time saving operator. Its made my life a lot easier.
July 27th, 2008 at 10:39 am
If you are having problems with the link like I did, here it is:
http://www.neuralmarkettrends.com/videos/Tutorial 5/Video Tutorial 5.zip
July 27th, 2008 at 12:24 pm
Tom,
I followed what you did and got exactly the same results. I wasn’t really sure how good 46% accuracy and RMSE of .25 was so I did some experiments of my own. I tested it with all the attributes deleted except volume, which I replaced with a column of 1s. So it had to predict the different labels with basically irrelevant inputs. The confidence increased .001 (to .502) and the accuracy and the predictions were exactly the same!
This basically told me that the original network was as useful as a dartboard for making predictions. So to get a better idea of what was happening, I went back to the original data and put a breakpoint after the “ModelLoader”. Here’s a screenshot of the network that’s being trained: http://dl.getdropbox.com/u/39904/Neural%20Net%20Structure.png
You can see the weights are almost zero going into the output node. I don’t know if I should interpret this as the inputs basically being ignored; or if this is normal/ok since it really only matters whether the sum of the [values*weights] are above or below the “neuron’s” activation threshold (zero?).
I also tested adding two columns of random values generated in excel to see if I would get improved training accuracy due to overfitting. I did it as an academic exercise to understand neural nets better. However the predictions were unchanged and the results were identical to the experiment with the original inputs. This is bothering me because I feel like something should have changed, at least in some slight way- but it didn’t.
My goal is to understand neural networks/ datamining/ AI and rapidminer before I attempt to strike it rich. I appreciate the video and I have been reading through the archives too. I was happy to discover the Royal Society of Arts videos and audio from the “Black Swan Positive” post you did a while ago. So much to learn! No time to sleep these days…
Thanks again,
Max
July 28th, 2008 at 11:38 am
Tom,
Super great video!!
Can you share some of your resources for your work with us?
You said, “…you can download the data files and Rapidminer experiment here”, when do you think you will make the data files and RM experiment available?
Keep up the fantastic work.
Frank
July 29th, 2008 at 4:38 am
Frank: I fixed the link, you can now download it.
July 29th, 2008 at 4:51 am
Max: A 46% classification error is awfully close to a 50/50 coin flip and not worth a darn. When you deleted all the columns and then replaced the Volume column with 1’s, did you change the label designation and retrain the model? Did the LabelTrend2Classification operator transform the Volume data into Up/Down? If so then you only had the ID and the Volume as a label to be trained and your error would likely be 50% and the model would not be valid.
Here’s a tip, mix some index closing prices with your favorite target stock (AAPL or whatever) and historical volatility, set then set your output label to the stock’s closing price. Your classification error should be lower and your prediction confidence a lot higher.
July 29th, 2008 at 11:11 am
Tom,
Another very nice video tutorial!
I’ll say it again… This is why I come here
Great content and on topic!
Thank you for all your time and effort!!!
Cordially,
-Digital Dude-
November 3rd, 2008 at 10:35 am
Hai, I wanted to do some Market basket analysis on Rapid miner. Could you please help me from where i need to start, it will be great help if u do so.,.
November 3rd, 2008 at 1:38 pm
Pryian, please take a look at my tutorial tab and following the tutorials. That should get you started.