I had recieved a private message by someone requesting some background on what I had done for my Genetic Programming trials with QuantDeveloper.
I am releasing the example source code into the public domain. If you make changes and
would like to see the changes recorded here, please let me know, and I'll update the files.
The subdirectory OneUnified.GeneticProgramming is the GP library. I used Koza (1992) as
well as a few other related references as a guide for various constants and such. You'll
need some of my other libraries (as listed elswhere on this site) in order to get the thing
to compile.
The library provides population management, survival of the fittest, and various breeding
cross-over strategies. Adding and removing operators should be relatively easy. I have a
couple of base classes from which most are inherited: boolean and double. Note that, unlike
C++ where one can use static methods to initialize some global class variables, C# insists
on initializing static class variables upon first invocation, which is why you'll see ugly,
redundant code for getting this done for the operator setups. Maybe there is a better way.
The subdirectory UI holds the setup code to run a simulation. When you look at the
code, you'll see that there is
no real easy way to embed an optimization module in QD, so I took source samples and patched
together a
self running optimizing application.
You'll be glad to note that doing something like this
will be much more difficult, if not impossible in the future. QuantHouse, in their
infinite wisdom, has decided
that we add-on developers, who don't spend thousands of dollars each month on
sub-millisecond data-feeds are a pain in the back side, and so will not be providing source
code in the future. Or so they told me. I come from an open source community, and this
closed source madness of QuantHouse has turned me off of QD. I've gone back to using C++
routines to take care of my trading chores.
While on the subject of C++, er, C#, I went back to C++ for several other reasons. There
is a
rich and varied source of high quality open source libraries for C++: Boost, QuantLib just
to name
two. C++ is faster. Also, I feel that C# is meant
for lazy programmers who don't know how to clean up after themselves. There are C++ garbage
collection libraries out there if I feel the need to use them. And did you know that
Microsoft couldn't even bring themselves to use CLS in most of the their Windows development
(most of the core CLS was removed from key kernel applications).
Anyway, here is my
Trade Optimization by
Genetic Programming, Example for QuantDeveloper.