2006 Nov 01 - Wed
Fuzzy Logic
|
For an Automated Trading system I've been developing, I've come across the fact that
Fuzzy Logic may assist in making decisions on how to trade at particular times of the day
depending upon what conditions are predominant.
Amazon has a bunch of theoretical books, but hardly any at all for the practical
practitioner. I did purchase The Fuzzy Systems Handbook, 2nd Ed by Earl Cox. I'm about
half way through it now. I've got
through all the bits that make up the basic fuzzy sets. The sections are liberally
sprinkled with C++ code. I'm not sure how much of it will compile in today's tools. The
book was written back in the age of Windows 98. On the other hand, the code snippets are
readable for one needs to understand what is happening in the commentary.
|
|
I had approached the subject from a different perspective though. I started by searching
for code libraries. I came across FLUtE: Fuzzy Logic Ultimate Engine. The fellow has written a code library
in C#. The code does compile in Microsoft Visual Studio with the v2.0 run time libraries.
Coding new stuff in it may be somewhat of a challenge as the documentation is quite sparse.
But then again, that is par for the course.
|
After taking a look at the modules, I came across something called 'hedging'. At the
time, I didn't know what it was all about. And that prompted me to look for some good
practioner's books. Hence the book I referenced above. Hedging, is obvious once you think
about it. It is adding fuzziness to an existing fuzzy rule. The concept is well described
in the book.
The book doesn't exactly flow from front to back. For instance, during the beginning
of the book, the author introduces a
concept called alpha-cuts, and incorporates its use in to the development and discussion of
fuzzy rules.. I can see what they do, but where and how they are applied, I'm still not
exactly certain. And I'm up to page 344 now. There have been some hints, but no concrete
usage criteria. I'm sure it will become clear as I move along in the book.
|
|
It was good that I did some prior reading, otherwise I think I would have been lost with
the onslaught of information. I recall one of the first things I read was the document
regarding the Mathworks Fuzzy Logic Toolbox. You can review the document in html or as
a complete pdf document. In the pdf version, on page 56 (2-26), they have an excellent
drawing summarizing how everything fits together.
Another book that helped fill in the gaps is An Introduction to Fuzzy Logic For Practical
Applications by Kuzuo Tanaka. It is quite expensive for its 138 pages, but does have some
useful background info. In the end, it is a good pocket guide for starters. It did leave me
thinking that there were holes in the information presented. Earl Cox's book has filled in
some of those gaps.
Having said all that, I'm just beginning to build the environment for using fuzzy logic
in my trading solution. Although the FLUtE code looks like it could work, I'm going to try
my hand at some basic C# code for fuzzy rules and rulesets to get a feel for what is needed.
Once that is in place, I think I can then use a Genetic Programming engine I wrote to see if
I can optimize some rule selections.
[/Trading/AutomatedTrading]
permanent link
Technorati
I wanted to see who linked to David Wheeler's site (the Perl guy who has single handedly
contributed so many good things to the Perl community). His site linked to Technorati to
show who linked to his site. So
I thought I'd do the same. Here's my Technorati Profile.
[/Personal]
permanent link
|