Robotrading: CT + Trending Strategy on folios of futures

Discussion in 'Journals' started by fullautotrading, Oct 11, 2010.

  1. WRey

    WRey

    Hi Tom,

    I've been following your threads for a long time. Your project really looks interesting. I like seeing all the progress you've made.

    The implementation of the random walk was really impressive.

    I noticed in some of your results a relatively large amount of the PnL is determined by a single instrument.
    I was wondering if this is avoidable, resulting in a better hedging game?

    I'm also interested in your current opinion of the T game (after the simulations). Do you think it is necessary to be able to protect against extreme market movements?
     
    #41     Jan 27, 2011
  2. Hi WRey,

    thanks a lot for the comments.

    This project is based essentially on the assumption that either the market is completely unpredictable or, in any case, we disregard any possibility to predict price direction. This perspective has led us to an approach which could be defined "mechanical". But what is the "mechanism" ?

    Following J P Morgan, who when asked his opinion of the direction of the stock mkt, responded that <i>"It will fluctuate"</i>, we start with a countertrending game that is ideal to capture all these fluctuations.
    The problem clearly arises when the price takes a direction unfavorable to current position. And this is <b>the problem of all strategies and traders in the world</b>.

    In other words, while nobody seems to have much problem grabbing profits when he sees them, the main problem are the actions to carry out when start losing. Now assume, for instance, we have a long position on a futures contract and the price begins to fall. Let's examine some of the "systematic" actions we have at our disposal:

    1. We readily close the losing position when Loss > Threshold.
    I have examined this action for long time in innumerable simulations. It seems that with this approach it's impossible to have a systematically profitable strategy. Results, in the very best case, tend to be fluctuating around a zero profit and eventually one may lose all or stay negative on a sufficiently long series of stop.

    2. We essentially continue buying either with entries equispaced or gradually increasing the distance of the buys. (This is what we called CT LS). If we were a bank or so we could continue this process for a much longer time many other investors can. So <b>we would see in the way down</b> innumerable <b>stops</b> to be hit and many poor souls to be <b>liquidated</b>. However, we have no problem with the large fluctuation and when it reaches the "bottom", or even at some intermediate point (a <b>local minimum</b>), we have accumulated so many positions that a <b>relatively (with respect to the global price move) small retracement</b> will make us return profitable. We have seen in most of all test as this worked fine most of the times, but if one is not a bank it's more or less like sitting on a bomb, which might or might not blow sometime in the future. Especially in case multiple correlated instruments begin a deep runaway.

    3. We overlay on top of the previous CT game, a directional trending game (T). In fact, while we accumulate positions, this could be also interpreted as an indication of a <b>directional move</b>. So while we might still believe that the price will reverse sometime in the future, on the other hand we want to take advantage of the <b>directional move</b> (we called this CT T LS). We might therefore start selling. This could have an hedging effect respect to the current loss. On the other hand it would reduce the gain in case price reverses, and in case we don't stop the short trending position when price reverses we are actually <b>adding a loss to the previous loss</b>. The "hedgers" would also help breaking correlations.

    Now the game 3 is complex to tune effectively because we need to <b>balance in the most effective way 2 opposite needs</b>: 1: profiting from reversal, 2: make some directional profits or to hedge. That's why we have developed the random walkers (GBM) to have some idea how to balance those 2 opposite needs, while avoiding (as much as possible) curve fitting. Clearly, the T component cannot be too tight because it would "kill" the countertrending component and engage in several so called "false" trend start (if we believe in "trend"), on the other hand it cannot be too late because it would be stopped early most of time and catch too little or none of the directional movement.

    In any case what is expected is that game 3 (CT T LS) should be a much <b>slower</b> gainer, but hopefully a "safer" approach, or in any case an approach that most of traders will accept more easily. From a conceptual point of view, the drawdown can grow large in any case. In fact, even when we do inversions our drawdowns could grow unlimited if, at each position inversion, also the market coincidentally inverts direction. Clearly, most traders reject the idea that it's much likely that at each position inversion also the market will punish us with a direction inversion, because the market it's there for all and (hopefully!) does not trade specifically against us ;-)) On the other end, the traders and investors have been <b>conveniently scared to death</b> and so gently persuaded to use <b>stops</b> with occasional <b>flash crash</b> and marked <b>correlations</b>.
    This way the big players can continue their game collecting all the stops and liquidation of the poor souls with relatively smaller capital.

    While this "hedged" game may be much slower, conceptually might be more "acceptable" by most traders. It's pretty difficult to balance though. The features that should make it more acceptable is the idea that a big crash cannot hurt unrecoverably, and also instrument correlation is more effectively contrasted. What will bother are, usually, longer period of drawdown, although it's expected to see in general a growth of the <b>realized component</b> (while CT LS can have <b>much longer "stagnation"</b>), even when being drawn down. A bank or very large investor would probably not care: just play the CT LS unleashed and make money all the way up and down, ignoring drawdowns, stagnations, and laughing at traders' little stops.

    Let me know what are your thoughts ...

    Tom
     
    #42     Jan 28, 2011
  3. WRey

    WRey

    Hi Tom,

    Thanks for the explanation!

    I agree with you on the fact that trending games are very difficult to be and remain profitable..
    As you will always have the possibility that the trend won't continue and retrace after you just opened your position. To overcome this most strategies have been curve-fitted. If you think about this with the assumption you can't predict the market and market conditions changes constantly. The strategy will ultimately fail in the future.

    The CT game is indeed more elegant. If you keep investing in your position must become profitable in the future. The only problem is that you don't know how much investments it takes untill the price turns in your direction.
    The only way to get knowledge of this amount is to look back to previous market movements. And to add a buffer to that amount to prevent liquidation, as this is again curve-fitting.

    Do you have an indication of the maximum investment made historically? (For example a multiple of the initial portfolio)

    The T game will indeed result in less Profit in the long run. But i'm curious how much of an effect it could have on the Maximum draw down. Maybe a loose T game preventing a buildup of positions could prevent really large drawdowns. But it will then take a larger retracement to become profitable again. (which could also be dangerous)

    It is difficult to find something that will minimize drawdown. As it will probably sacrifice PnL..

    Reynaerd
     
    #43     Jan 28, 2011
  4. Thanks for your contributions. This is a very interesting thread.

    I am having a hard time conceptualizing the difference between using stops and using the T system as a "hedge." Aren't they effectively the same thing?

    For instance, if you're long 2 contracts and price moves lower, if you are stopped out at a certain point, that means you sell those 2 contracts for a loss and end up net 0 contracts. If instead of being stopped out you sell 2 contracts in a separate T portfolio seeking to profit from a trend move lower, your net position is the same as if you had taken the stop (net 0 contracts).

    Or are you saying here that the T system will trade a larger number of contracts than the CT, so in other words you effectively "stop and reverse"? For instance, you're long 2, then when price drops low enough you sell 4 so that you're net short 2?
     
    #44     Jan 28, 2011
  5. CT_T_LS strategy (the one with "hedgers") has just closed all at about 25K (several instruments were caught in loss when the "global take profit" occurred, but i guess that's what a folio is for), and it's slowly reopening.

    As we expected, it had some larger drawdown, but also greater Realized, up to 50K (a nice "cushion").

    <img src="http://www.elitetrader.com/vb/attachment.php?s=&postid=3074385" width="1200" />

    (img size reduced to 1200)


    CT_T_LS_E (similar strategy to above but with "extreme" entry constraint) did a very similar thing, but closing higher at 28K with a smaller realized (at close time) though (37K).

    Tom
     
    #45     Jan 28, 2011
  6. The most "lucky" instrument this time is HG:

    <img src="http://www.elitetrader.com/vb/attachment.php?s=&postid=3074426" width="1200" />

    (this is CT T LS strategy, image is resized: original is larger)
     
    #46     Jan 28, 2011
  7. Thanks Reynaerd,

    You are right. DD cannot be eliminated. It's just the <b>"investment"</b> necessary to aim for profitability. The problem is just that sometimes mkt calls for a definitely too large investment for our pockets ;-))

    For the activity of "getting an idea" or order of magnitude of the necessary liquidity I would not use the expression "curve-fitting", because here we imagine the capital to be given and, then, we try to setup the rules and the trading strategy in such a way to be able to trade with what we have. To be safe, one could determine the worst drawdown and margins ever on some past data and on random simulations, and make sure he has access to some multiple of it or be able to involve more investors in the adventure, if necessary.

    After all trading is obviously a risky activity and the risk cannot be made disappear completely, especially when capital is bounded.

    The "maximum investment made historically" cannot be defined until one defines the strategy rules. Each combination of rules can lead to different results.

    About the T game i haven't still watched it live for a sufficient time, and maybe the rules can be improved (i am always looking for new ideas and improvements), but my general feeling is that it can be an acceptable compromise (The pure countertrender CT LS is probably a little too extreme in concept.)

    Tom
     
    #47     Jan 28, 2011
  8. Thanks to you, worldwary! Your question is interesting has it give me the chance to clarify some details of the trading engine (as we will see it's not as simple as it may appear).
    There is an important concept that you have to bear in mind if you wish to fully understand the trading rules we are talking about. I think I have explained this in past posts, but i probably need to repeat because it's not something which comes natural.

    Imagine 1 instrument. You need first of all to <b>forget the picture of 1 trader trading with this instrument</b>. It's <b>not </b>like that that this trading engine works.

    The correct picture is as follows. Picture in your mind all the trading range for the price of your instrument (for instance a futures contract).
    Now imagine that you take this whole range and you split it in subintervals. Imagine, for instance, several horizontal lines separating those intervals, like a football field ;-))

    Now, you are a "coach" of a team and imagine that on each of those lines you can place <b>4 players</b> with different skills.

    Picture that for now... in the next posts i will continue explaining the concept ;-))


    Tom
     
    #48     Jan 28, 2011
  9. WRey

    WRey

    Nice results!

    Is it correct something has changed on the global profit take(on CT)? It now also takes losses, decreasing the rlzd PnL? Something that I think didn't happen in earlier (CT) versions? Please correct me if I'm wrong.

    You're absolutely right, curve-fitting is not the right expression. As it is not affecting the strategy but only determining how much capital is needed to run it. Thanks for clearing that up.

    Off course trading is a risky activity, it's all about acknowledging that and minimizing the risk to the reward given.

    Looking forward to reading more!

    Reynaerd
     
    #49     Jan 28, 2011
  10. Let's first consider the case of a "folio" with 1 instrument only.
    Adding the T component (CT T LS), as you correctly note, the realized can decrease because you do realize negative amounts.

    In fact, anytime a SHORT position is opened <b>under the average</b> of all currently open LONG positions, we clearly "realize" a negative amount. But that is natural because working on a single account it "looks like" as stopping (taking a loss) and inverting.

    In CT LS, instead, the realized for 1 instrument, as you rightly notice, cannot decrease.
    There is just only exception to that and this won't generally happen in real trading: occasionally for some illiquid instruments i have seen that IB paper trading delays a lot order execution or the orders don't pass at all for a while (going in execution "timeout"). In that case, you may see a realized decline due to price movement occurring between the "close all" instant and the actual close, allowed by the paper trading facility.
    In real trading this will not generally happen. Unless you have very large order size of an illiquid instrument and the mkt is fast moving.

    With a folio with multiple (>1) instruments you can see, in any case, the realized decrease when a losing instrument get closed before the winning instruments. The fact becomes more evident with larger folios. For instance, in the picture I have posted you can see the strong realized decline at close time, due to instruments which were losing at the close time (their individual losses have been stopped because anyway the whole folio was in profit).

    You have made an acute observation.

    Tom
     
    #50     Jan 28, 2011