>
So I hit an interesting place a little more than a month ago. My program worked. But it didn’t give results that were terrible helpful. Talk about an anti-climax.
First, the good part.
The good part is that the GA+NN combination works wonders. I had it crunching through 50 different chromosomes for about 30 generations using 12 indicators. It ran through all of that in about 30 minutes on my cutesy laptop. Amazing. I’m pleasantly surprised by that performance. I’m still interested in parallel programming and seeing if I can get this baby on the cloud and playing about with it there, but don’t need to do it right now.
Now keep in mind that I have all the advanced NN stuff only in the matrix form of the program, and I have no clue how to turn that into a form usable by the GA. But using the NN-function as it was since the last post, and improving the GA function, I was able to get up to 70% directional accuracy in the forecast 5 days into the future. WOOOO!!
Thats amazing. Thats fantastic. I made that program & I trust it to be true and I stand by those results, which are in line with what the authors of the book have. I’d have done cartwheels if I didn’t think that I’d probably hurt myself. This is amazing because with 3 indicators I can say with (approximately) 65% accuracy which way the market is going to be 5 days in the future.
And now the other part.
This is all well and good, but forecasting doesn’t make money; trading does. I selected those 3 indicators, ran them through an array-version of the NN for an arbitrary 2000 epochs (Runs through the data), and then tested them on data immediately after the training data in the timeline. The results were showing losses. I changed it from only doing take-profits and stop-losses that were fixed to trailing stop-losses and take-profits, and finally no take-profits, to see if the results would improve if I cut my losses short and let my profits run.
The significant difference was that I went from making small losses to making small profits. Good, but no dice. The problem I had with this was that it was having an R-expectancy less than what I had with the random-entry system! What a waste of my time. Those were not good days.
And how I dealt with it.
Not as effectively as I could have. Thats the short version.
The long version is as follows. I got off the computer and didn’t touch the programs for a bit, and tried to just figure out some way to get beyond this issue. After about 2 weeks of doing this unsuccessfully, I just stopped thinking about it at all. Then I lost myself doing fun stuff that wasn’t productive at all. Then I made a few phone calls and spoke to some people about career stuff. I tried to get a volunteer position with some of the business improvement associations in the neighbourhood but didn’t get any response that got me actually getting work done with them (Just the usual we’ll-call-you-sometime-in-the-undefined-future). Then one of those contacts asked me if I could make a simulator in a user-friendly manner for them.
So that got me thinking. I could still put my programs to good use. There is definitely something here that is promising, and it would be good to figure out some way of sharing this. I might even get a job out of it someday. So lets do this. Lets try to have a better interface to my system than just a text interface. Lets try to make it user-friendly.
And I also figured out what was going on with the system that I had made. I was using the GA to find something that would have better directional accuracy. It delivered exactly that. I was not asking it to help me with something that would be profitable, though.
This might herald the next evolution of my system. Lets have a look at the history. I had the technical indicators. I had the trade simulator. I ran those manually. Then I made more code that wrapped around all of that in the form of an NN so that it would find out what weights each technical indicator should have, as opposed to weighing them myself in an arbitrary manner. I delegated that task to the NN. Then I wondered if, perhaps, the NN was just wasting its time with some indicators. So I built the GA around the NN to find out which indicators are always showing up at the top of each generation consistently. I’ve started with a few tools and have since then been building wrappers around them, with each layer building on top of the previous one.
Right now the system has identified the indicators that matter. How about I make another system with those indicators fixed, that searches for a robust set of trading parameters that are profitable? I’m going to rephrase that just in case I’ve not been clear (Its late, I should have gone to bed about an hour ago, but I want to get this done first). Right now the system I have searches the problem-space for the most useful indicators (Useful in the directional accuracy sense). Now that I have the answer to that I could start searching the problem-space for the best (As in robust) trading parameters (Like stop-loss levels and take-profit targets and the like). Which makes me wonder why I didn’t just do that in the first place using the random-entry method. D’uh. There have been moments during this project when I’ve felt like a genius of diminutive proportions. This is one of those moments. Not my brightest hour, true, but its better to find out than to stay in the dark. Back to topic. I could also have trading parameters for entry points as some function of the NN’s output. Things are looking better, now that I know (Or at the very least, have an idea) of what actions to take next. Good stuff.
Side note(s).
Only 3 indicators consistently were in the chromosomes representing the NNs with the highest directional accuracy. Crazy, right? Especially out of 12 possible indicators? Lets get rid of the suspense. The 3 indicators were the ATR; an indicator that divided the close by the average of the last 10 closes; and moving-average(5) minus moving-average(10) all divided by moving-average(5) (Moving averages of closing prices of the last ‘n’ days). Thats it! Those 3 consistently made the list, generation after generation through the GA. Weird. Or not weird, but definitely counter-intuitive.
Leave a Reply