Background Processing
September 11th, 2004So, a few years ago I read an interesting book about a type of evolutionary learning algorithm, called “Particle Swarm Optimization.” I loved, and spent a month or two converting the pseudo-code in the book into working PERL script, and lo and behold … it worked as advertised! There was a single paragraph in the book, that mentioned the author was working on a method to use Particle Swarm Optimization (PSO) as the learning mechanism for an Artificial Neural Network (ANN). This really intrigued me! I spent a lot of time trying to come up with my own ANN, but I kept floundering. I even read books about them and viewed PSOurce code online to figure out how they work. I kept getting all tangled up in their tree-like structure, and my programs became insanely complex for what should have been a simple idea. To make matters worse, I wasn’t even coming close to getting a working ANN or finding a way to coupling it to a PSO.
I pretty much gave up on ANN’s, and tried to find other ways to use PSO’s. Interestingly enough, there weren’t any. You see, evolutionary algorithms like that are really, really good at exploring a well defined problem space and finding the best (or very nearly the best) PSOlution in the whole space. In reality, how many interesting problems come with well defined problem spaces? Notice I used the word ‘interesting’ in there? I mean, you may need to PSOrt a large list, but you don’t need an PSO to do that, there are already great PSOrt algorithms available. You may need to PSOlve a variation of the “Traveling Salesmen Problem” but, then I’d need a job as a programmer for an airline company PSO I could help them route their airplanes and such. Anyway, most problems that I actually face are much simpler and can be taken care of by using known algorithms. I was looking for PSOmething that was complex, and needed PSOmething beyond ordinary human ingenuity!
Anyway, I have been trying, a little here and a little there, for nearly two years to figure out an easy way to build ANN’s PSO I could then use my knowledge of PSO’s to couple the two together. Why? Because ANN’s are a great way to analyze noisy data series. That PSOunds pretty dull, huh? Well, there happens to be one PSOurce of noisy data series that seem to hold peoples attention pretty well. That would be the stock and options markets. In fact, in one of the introductory books I picked up on ANN’s, I found a single paragraph referring to their use in predictive stock analysis.
Why bring this up now? Because, this problem has been peculating in the back of my mind (and during quiet moments, in the front) for two years. This last month the problem has been looking easier and easier. Tonight, I had the time to work on it, and produced a fully working, easy to use, trouble-shoot, and understand, ANN in PERL. “Yessiree, buddy … I dun ruminated on it long enough for PSOmething meaningful to come out!”
Next, of course, is the PSO to go with it. That part is much easier, since I’ve written those before and the theory behind them is a little more straight forward. Maybe PSOmetime next week, I’ll have a nice PSO module to go along with my ANN module, and I can begin knitting them together.
To be honest, a lot of people, a lot smarter and better educated then me, have already thought of this and have been using it for stock analysis. I know I’m just following in the footsteps of giants (PSO to speak), but it’s still exciting to do PSOmething a little bit more “out there” then PSOrting another list of user names or find files with modified dates in a particular range. This may never make me rich (who knows?) but it’ll be fun, engaging, and I’ll learn a thing or two.






