Computer Generated Trading Strategies

Discussion in 'Automated Trading' started by walterjennings, Feb 12, 2008.

  1. ronblack

    ronblack

    Bill,

    I don't think you'll find a "legal" used copy around. I have the program and use it on a daily basis. It has paid for itself several times and it does exactly what it's supposed to do, surprisingly so because I did not believe it when I bought it.

    In general I think purchasing genuing software copies pays in the longer term because of the free upgrades and technical support you get.

    Just my 2 cents.

    Ron
     
    #21     Feb 15, 2008
  2. Hey Ron. I was wondering if you could explain a bit more what that application does for you?

    I am currently having troubles making my application run as quickly as I wanted it to, so I am curious how quickly these commercial applications run. Right now it runs at about ~2.0 strategies per second, which is about 50x slower than I had originally hoped for, but then again I have no clue about the size/layout of the solution space so 100 strategies per second was really just an arbitrary number.
     
    #22     Feb 15, 2008
  3. ronblack

    ronblack

    Hello Walter, I don't know the details of what you are trying to do, like for example what kind of strategies you are running, how complicated they are, the size of historical data files you are using, the CPU speed, etc. as all these parameters affect execution speed.

    This program I'm using is called APS Automatic Pattern Search. Its solution space is restricted to price patterns involving OHLC. I suspect you are trying to run more complicated startegies but I will give you a few examples of how long it takes to get results with this program:

    1) SPY simple search: 4,000 daily bars in the data file, a set of 4 target/stop pairs. The simple search takes a domain of 12 classes of price patterns and maps it into a range of about 50,000 (my estimate) potential solutions. This search takes 30 minutes.

    2) Same search as in (1) above on same data and target/stops but on an extended domain of 88 or so patterns classes takes about 6 hours. Execution time increases non-linearly but it is not an exponential increase.

    3) Same search as in (2) above, with 1 and 2 bars of delay in the price pattern signals, takes less than 24 hours. Execution time increase is linear when delays are added.

    But I must tell you that I don't care at this point about execution time because I'm currently running daily data and I do that during the weekends. I think I have figured out a way of running the scan function of the program in real-time on 15 minute bars. The scan looks only at the last few bars of the data file and it is fast.

    I use a core 2 duo 3.0 Ghz CPU but I have noticed that one of the cores is not utilized.

    Ron
     
    #23     Feb 15, 2008
  4. Heres a new question wrt the strategy analysis component of automated generation. Whats the best way to evaluate the strength or fitness of a strategy (which to record for further analysis)?

    Straight profit is very misleading, I originally thought that recording the strategies which can progress the furthest into the data set would be the most fit ones (since there is such a strict standard which kills strategies quickly), but I've been getting the feeling that a lot of good strategies have been ignored since they might trip up early and not get a fair shake at the stick.

    Is there a good balanced/well tested equation for evaluating strategies? Something that factors in average profit per trade, s.d from average profit. max draw down, avg number of trades per week etc etc.
     
    #24     Feb 28, 2008
  5. Hugin

    Hugin

    Hi Walter!

    We are running an automated trading system and had similar discussions when we started. Our system is an interday equity trading system so this is a bit different from yours, but the problem of measuring fitness is probably the same. Obviously you would like a system based on patterns/strategies that generates good returns consistently.

    One basic method that we are using is a window technique than includes a number of bars after the signal was generated. You can view this as a table where each row represents one signal. Each column shows the returns at the end of the corresponing bar (i.e. in our case colum 1 states the result after day 1). So, if you want to evaluate a pattern that generates 100 signals and a look-forward window of 5 bars you end up with a table with 100 rows and 5 columns. For each column we calculate a performance measure (Sharpe, Profit Factor, Sortino or whatever you think appropriate).

    We use the average of these 5 values as the final fitness value. How many bars to use in the window depends on the time scale, but in our case we are using 1-2 times the number of bars used in the pattern. The strength of this method is that it looks at more than one value per signal to determine overall fitness.
     
    #25     Mar 7, 2008
  6. Hugin,

    Very interesting idea. I like how learning based on that type of fitness function kind of ignores exit strategies and just looks purely at the value contained within the entrance strategy. I have recently been very interested in simplifying what exactly the system is trying to learn in order to increase the probability that it will generate something meaningful.

    My only worry would be pre defining the 'expected' trade lifespan to X bars. But on the other hand, regardless of what type of signals you are using / exit strategies, if the signal does not appear 'correct' after 5-10 min, I think it is safe to say there was no 'meaningful' market insight in the signal.

    Does anyone else have an opinions on how quickly the market should move in the signal's favor for it to represent a meaningful predictor? Maybe 0-2 min would be more realistic.
     
    #26     Mar 7, 2008
  7. Hugin

    Hugin

    Regarding the trade lifespan, we did some testing before we came up with this interval. It also makes some sense from a symmetry point of view. Note that this is for daily bars. We have no experience on patterns for day trading, but I assume the dynamics is quite different since the bars are so much shorter. For example, if the volume is low you will get bars that are built from very few transactions, and thus may carry very little new information. If trading lower volume stocks it’s probably sensible to use longer bars, some kind of dynamic bar length or to filter out bars created from insufficient information.

    As you mentioned we ignore the exits when looking for entry patterns. We also think looking at entries and exits separately makes a lot of sense. One problem with exits is that you need an exit signal for each of the relativeley few positions you have entered before the max position hold time, as opposed to continously looking for entries over the entire universe of stocks you don’t have a position in. This puts an implicit requirement on the exit signal pattern to be very frequent. If you mix entry and exits this implicit requirement on the exit frequency may decrease the quality of the entries. So far we have failed to find a good solution to this for our system.

    //Hugin
     
    #27     Mar 11, 2008
  8. ronblack

    ronblack

    Hi Hugin, this is an interesting approach but maybe problematic. Besides the problem you mentioned about decreasing quality of entries, another important consequence is an uncontrolable win/loss ratio. This often demands a higher success rate.

    This is an excellent article by someone who has developed a program to search for trading startegies:

    http://www.tradingpatterns.com/profitability.pdf

    Note that in the section "The Profitability Rule and Trading Time Frames" the author basically defends startegies that include exits on the grounds of controllable win/loss ratio. After some thought I agree with him although I am not sure how that relates to "fitted" strategies.

    Ron
     
    #28     Mar 13, 2008
  9. Hugin

    Hugin

    Thanks Ron, I’ll have a look at it. We have tested a number of simple exit methods (like various trailing stops schemes in combination with hold time limits, profit targets etc) running MC simulations on the trading system level to analyze the results. As always it is possible to find things that works well over some period of time but less so during other periods. So far we use the somewhat trivial exit method of hold time limits based on statistics for the results of entry signals according to the method described earlier. This works but it feels like we could do better…

    //Hugin
     
    #29     Mar 13, 2008