Adaptive Trading Strategies

Discussion in 'Strategy Building' started by jalsck, Sep 4, 2010.

  1. jalsck

    jalsck

    Next image.
     
    #41     Nov 10, 2010
  2. jalsck

    jalsck

    GoodGoing, I need 4 years of data before producing the first trading signal. I have QQQQ data provided by Pinnacle Data Corp. Will that do?

    Regards,

    James
     
    #42     Nov 10, 2010
  3. jalsck

    jalsck

    Also, are we trading on the current close, next open or next close?

    Thanks,

    James
     
    #43     Nov 10, 2010
  4. nitro

    nitro

    Why not run all of them? It might give you an idea for another system ;-)
     
    #44     Nov 10, 2010
  5. You can use the data I uploaded, from 01/2002 to 12/2005 for the initial period and then the remaining bars for the backtest.

    The open of next bar is more practical for order entry.
     
    #45     Nov 10, 2010
  6. a5519

    a5519

    Can each bot use completely different approach for generating trading signals? E.g. one bot is based on MA cross-over, another on 2 sigma breakout, the next on RSI signals, ...and so on. How complex the separate trading bot can be in order to be usable form speed point of view?
     
    #46     Nov 10, 2010
  7. Well, he claims that "The trading system signal is generated by combining the trading signals generated by the bots in the swarm".

    That would make sense only in a continuous domain. Trading is discrete. Let us say you have 3 bots and bot 1 enters the trade at bar 1, bot 2 at bar 2 and bot 3 at bar 3. You need an objective function to make the selection, like maximum net profit, highest win rate, etc. You cannot average entry signals. If you have an objective function, you have a curve-fit, no matter what. It is a method of curve-fitting on-the-fly.
     
    #47     Nov 10, 2010
  8. JackR

    JackR

    I don't believe so. As I understand it only one bot type can be used in each system. That is why he says he plans to combine their signals into an overall system (at least I think that is what he said)

    Thus, one swarm (system) would be composed of your MA crossover. There would be twenty bots inside the swarm. On day 1 all bots should use a 20 MA crossing a 60 day MA, the initial parameters. However, Dakota would randomly change each parameter a tad. After running for 60 days the bot swarm would produce a signal. The next day the Dakota engine would look back X days (the lookback period you select) and see which of the 20 bots yielded the best performance. Dakota would then adjust the other 19 bots to move their now changed parameters (the ones that started near 20/60) closer to the best bot. The swarm would then produce a signal (or not). At the close of the next day the performance of each adjusted bot is looked at and the current day's best performer is selected. All bots are again tweaked. A new signal is generated. Unlike an optimizer, the bot parameters are not selected for best performance over the entire data sample, but only for their performance against a single day (lookback period) and they are just tweaked so that you probably have 20 different values of short and long MA's, none of which is optimum, each of which is daily being moved towards better performance of the day's best performer.

    You would set up another model using your 2 sigma system and the 20 bots would vary the actual sigma number in the same manner as the MA swarm.

    You would manually select (or use AmiBroker's performance ranking capability) the signal you wished to use for your overall system.

    After the inital run Dakota is very fast as it stores the previous day's individual bot parameters and just updates them based on the day's inputs.

    Again, I think that is what jalsck is saying.

    Jack
     
    #48     Nov 10, 2010
  9. jalsck

    jalsck

    Apologies I fell asleep. It was around 4 am here in Sydney. It is possible to code that up, although I have never done it. I build a system per model. The way to do it would be to have separate sub-swarms, one for each model type.

    Bill, it is Ok to average the signals generated by each of the bots. If the majority of bots are outputting -1 (short) and the rest are outputting either 0 (out) or +1 then the system will be short. The signal average becomes a majority vote.

    The equity engine (performance engine) defines the objective function and it is a type of curve fitting on the fly as you said. The swarm adaptation engine controls the adjustments to the bot parameters. The curve fitting process could be something like 'stay away from the best performing bot / region in the parameter versus performance space and find broader profitable regions that are rising'. There are no restrictions on how you approach the problem. A programmer is needed to implement the rules / algorithm though.

    Regards,

    James
     
    #49     Nov 10, 2010
  10. jalsck

    jalsck

    I will post the results of the S&P 500 ARM03 run using the price transformation method of accumulating daily Ln returns * 100 - 0.0184. The graph of the S&P isn't of the transformed data. I intend to add another transform that is the natural log of the price minus a long term moving average of the natural log of the price. It isn't in the scripts yet though. The attachment to this post is an image of the equity curve. BTW I think equity curves for this purpose should ideally be constructed by accumulating Ln returns rather than points.
     
    #50     Nov 10, 2010