[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Trading System Design



PureBytes Links

Trading Reference Links

You didn't say how you are going to go about putting the system together:
off-the-shelf or custom coding.  If you are going the C/C++ route and you
want a good light-weight implementation of a forward-feed NN, check out
"Neural Networks & Fuzzy Logic" by Rao and Rao.  It's a very simple and
compact implementation that you can adapt to a wide variety of applications.
They also have a Kohonen layer implementation but I spent several weeks
testing Koho's and ARTs and a few other Self Organizing Maps and I found
that none of them have very good ability to differentiate patterns.

Genetic Algorithms are trivially simple in concept but are very tricky with
respect to implementation.  It is fairly easy to perform GA crossovers on
the implementation in the book above.  One of the real tricks is in the
scoring algorithm.  You must score solutions based on several criteria
simultaneously such as Total Profit, Win%, and Average Trade.  Below is some
sample code from the scoring function of an implementation I wrote.  It sets
the score to the minimum of the highest value of a "normalized" score of
each of the 3 previously mentioned criteria.  I "normalize" the scores with
respect to each other so I can compare them and select the lowest.  I adjust
the normalization parameters based on the bar-length, reasonable profit I
can expect out of the length of data I'm evaluating, etc.  You can pretty
much only adjust these params by trial and error.  It's a zen thing.  You
don't want to force a GA to converge too quickly.

    if (oEval.TotalTrades( ) > 0)
      {
      double dMax = 100.0;

      double dNet = oEval.NetProfit( );
      double d = dNet / 150.0 * 100.0;
      if (d < dMax)
        dMax = d;
      cout << "Net $ " << dNet << " (" << dMax << ")";

      double dWinPct = (double)oEval.WinningTrades( ) /
                       (double)oEval.TotalTrades( );
      d = dWinPct / 0.65 * 100.0;
      if (d < dMax)
        dMax = d;
      cout << " Win% " << dWinPct << " (" << dMax << ")";

      double dAvgTrade = oEval.AverageTrade( );
      d = dAvgTrade / 1.0 * 100.0;
      if (d < dMax)
        dMax = d;
      cout << " AvgTrade " << dAvgTrade << " (" << dMax << ")" << endl;

      if (dMax < 0)
        dMax = 0;

      oEval.SetScore( dMax + ((dMax==100.0) ? (dNet - 100.0) : 0));
      }


Patrick, before you jump into this, there are some very important questions
that you need to answer: how much experience do you have with systems?  Are
you aware of the dangers of over-optimization?  Curve fitting with neural
nets is a very serious problem and you must go to great lengths to ensure
that you don't hit this problem.  Another option is to augment your "30
options strategies" with neural net indicators or filters.  This requires a
LOT of data and as was mentioned, getting good options data can be extremely
difficult.  What do your 30 options strategies not do that GA/NNs might?

Kent


----- Original Message -----
From: "Patrick Lanphier" <planphier@xxxxxxxxxxxxxxxx>
To: "Patrick Lanphier" <planphier@xxxxxxxxxxxxxxxx>
Cc: <omega-list@xxxxxxxxxx>
Sent: Thursday, May 10, 2001 1:51 PM
Subject: Trading System Design


I am looking to start designing a trading system that utilizes many of the
over 30 options strategies.  I plan to use GA and NN accompanied by standard
linear programming.  Could you could provide me some advise with regards
to designing the system.  Thank you much for your time.

Patrick Lanphier
The Artemis Group
http://www.artemisgroup.com