Hi friends,
In this thread i would like to discuss a new algorithm variation. This can be considered the natural development of our discussion in <a href="http://www.elitetrader.com/vb/showthread.php?s=&threadid=202078">this thread</a>.
There we discussed an algorithm which resulted essentially in a countertrending game. It was actually implemented as an overlay of 2 opposite trending systems, which generated an overall countertrending behaviour. That strategy did not perform badly most of times, and had its worst moment when instruments took long directional moves without sufficient retracements. It has anyway 2 remarkable properties which i think make it particularly suitable for large investors or for traders running separately also a directional strategy:
1. The algorithm "preserves" the original investment. In the sense that if price goes from A to B and then returns to A, then the PNL can only increase. This is a beautiful property, which usually trading strategies do not have (arguably for a good reason!).
Assume for instance you BUY at price P0. If prices goes down, at a certain point, possibly after few new buys, you might decide to SELL your position. If, later, the price returns to P0, your PNL is not, clearly, the same as before, but has decreased, due to the substantial loss taken. That money represents a permanent loss for you (just like throwing it in a trashcan). Now, this cannot happen, by design, with the strategy we had been discussing, and this kind of "preservation" also caused nice profits on price reversals. The reason why it could not happen is essentially because the strategy allowed a stop at folio level, but not at trade level.
2. The algorithm has a, say, "deterministic guarantee" of yielding a profit. Let's see what this means. In a directional move, say, for instance, toward the "tip" of a price curve, the algorithm causes a grow of the position (sells for upward moves). [This growth is calibrated as much as possible by the algorithm in order to balance the drawdown with the possibility to return in profit.]
As the position increases, the "relative reversal", defined as (say): Reversal / PriceWaveHeight, becomes smaller and smaller, and, through a large position, it can made smaller than any predefined amount. So, there is a sort of "mechanically guaranteed" possibility of returning profitable, in case of large investment.
<b> "Weaknesses" of the strategy</b>
The above 2 properties are just nice except for a notable detail ;-))
If there is a large directional move, without a sufficient reversal, the investment on a single instrument can get really large: much more than we would ever like. So, in practice, either if there are not enough funds or if the user is not backed up by a "trending" strategy, a serious problem may arise. So, in practice, in case of runaway, only large investors/funds/banks - that can afford waiting for the investment to work, while investing in new folio instances - can really take advantage of those 2 beautiful properties. Or experienced traders, capable to balance with a directional strat.
<b> NEW STRATEGY variation: Countertrending + Trending strat </b>
In the latest posts, unco smartly suggested that overlaying an independent trending algorithm could be a solution to the above weakness. As that approach is actually meaningful, i have decided, while adding the new strat, to allow, in my application, the selection of the original strategy (in case one wants to play it).
The challenge I take here is, instead, slightly different, and is: "to create and overlay a <b>**DEPENDENT**</b> trending game to try to overcome the above "weaknesses". Being dependent, it can become part of the strategy itself, and therefore i have decided to directly overlay it, instead that playing it on a separate "clone" instrument.
Unfortunately, doing so, we need to give up immediately property 1. In fact, as we overlay a trending strategy, the latter, by definition, must have the capability to "change" trading direction, and therefore will cause "embedded" losses. So property 1 is gone: the "realized" curve will be no more monotonic increasing, but will have drops where the trender "kicks in", to hedge (direction change).
Property 2, *might* remain in place, although probably it can be challenging to prove it theoretically (i mean just by pen and paper). Anyway, intuition would suggest that if we overlay appropriately a trending strategy over the above countertrending strategy, we somehow might often expect a more rapid return to a profitable situation. But that depends actually on the implementation of the trender.
So, in brief, i will take, as <b>"core"</b>, the countertrending strategy which we already know well and which has those sound properties, and will try to overlay a "directional game" to try protect it when there are large directional moves. The general expectation should be overall less profits (on the long run), but (hopefully) a smoother equity curve.
Let's see what comes out (this is just a first attempt: i may be adjusting the trending game based on your suggestions).
For what i can foresee a difficulty here is balancing the 2 games. The general idea is to let the "countertrender" work in a relatively limited range, and as a unidirectional move takes form, let the "trender" take fly. Clearly, intuitively, in the middle of the 2 games there is a "gray zone", a "transition zone" where we can expect to see the lesser performances. Depending on which one of the 2 opposite games we give more emphasis, we can get a whole range of different strategies. Personally, i would like to maintain as much as possible the countertrending game and let the trender kick in for protection purposes.
Another weeakness i expect is that, while in this way we "bound" the the PNL when there are deep moves (like those currencies often do), we may still experience (large?) drawdowns when an instrument keep oscillating in a range, causing several direction changes and associated losses. So it seems important for small positions to maintain the countertrending game, and have a "transition zone" as small as possible (and, possibly, "ever changing").
In the following i will denote by <b>CT</b> the original countertrending game and by <b>CT+T</b> the modified algorithm where a trending game is overlaid upon CT. I would like to run a parallel test of CT and CT+T and try to determine the "best" T for hedging purposes.
(Note that even when i talk about "trending", by no means, i imply any attempt to "predict" market direction, but simply a "mechanical" device to counterbalance and reduce the exposition of the underlying CT strategy. As probably all of you already know from previous discussion, i never use "prediction" and "indicators", in the sense of "probable indication of a future occurrence").
Tom
In this thread i would like to discuss a new algorithm variation. This can be considered the natural development of our discussion in <a href="http://www.elitetrader.com/vb/showthread.php?s=&threadid=202078">this thread</a>.
There we discussed an algorithm which resulted essentially in a countertrending game. It was actually implemented as an overlay of 2 opposite trending systems, which generated an overall countertrending behaviour. That strategy did not perform badly most of times, and had its worst moment when instruments took long directional moves without sufficient retracements. It has anyway 2 remarkable properties which i think make it particularly suitable for large investors or for traders running separately also a directional strategy:
1. The algorithm "preserves" the original investment. In the sense that if price goes from A to B and then returns to A, then the PNL can only increase. This is a beautiful property, which usually trading strategies do not have (arguably for a good reason!).
Assume for instance you BUY at price P0. If prices goes down, at a certain point, possibly after few new buys, you might decide to SELL your position. If, later, the price returns to P0, your PNL is not, clearly, the same as before, but has decreased, due to the substantial loss taken. That money represents a permanent loss for you (just like throwing it in a trashcan). Now, this cannot happen, by design, with the strategy we had been discussing, and this kind of "preservation" also caused nice profits on price reversals. The reason why it could not happen is essentially because the strategy allowed a stop at folio level, but not at trade level.
2. The algorithm has a, say, "deterministic guarantee" of yielding a profit. Let's see what this means. In a directional move, say, for instance, toward the "tip" of a price curve, the algorithm causes a grow of the position (sells for upward moves). [This growth is calibrated as much as possible by the algorithm in order to balance the drawdown with the possibility to return in profit.]
As the position increases, the "relative reversal", defined as (say): Reversal / PriceWaveHeight, becomes smaller and smaller, and, through a large position, it can made smaller than any predefined amount. So, there is a sort of "mechanically guaranteed" possibility of returning profitable, in case of large investment.
<b> "Weaknesses" of the strategy</b>
The above 2 properties are just nice except for a notable detail ;-))
If there is a large directional move, without a sufficient reversal, the investment on a single instrument can get really large: much more than we would ever like. So, in practice, either if there are not enough funds or if the user is not backed up by a "trending" strategy, a serious problem may arise. So, in practice, in case of runaway, only large investors/funds/banks - that can afford waiting for the investment to work, while investing in new folio instances - can really take advantage of those 2 beautiful properties. Or experienced traders, capable to balance with a directional strat.
<b> NEW STRATEGY variation: Countertrending + Trending strat </b>
In the latest posts, unco smartly suggested that overlaying an independent trending algorithm could be a solution to the above weakness. As that approach is actually meaningful, i have decided, while adding the new strat, to allow, in my application, the selection of the original strategy (in case one wants to play it).
The challenge I take here is, instead, slightly different, and is: "to create and overlay a <b>**DEPENDENT**</b> trending game to try to overcome the above "weaknesses". Being dependent, it can become part of the strategy itself, and therefore i have decided to directly overlay it, instead that playing it on a separate "clone" instrument.
Unfortunately, doing so, we need to give up immediately property 1. In fact, as we overlay a trending strategy, the latter, by definition, must have the capability to "change" trading direction, and therefore will cause "embedded" losses. So property 1 is gone: the "realized" curve will be no more monotonic increasing, but will have drops where the trender "kicks in", to hedge (direction change).
Property 2, *might* remain in place, although probably it can be challenging to prove it theoretically (i mean just by pen and paper). Anyway, intuition would suggest that if we overlay appropriately a trending strategy over the above countertrending strategy, we somehow might often expect a more rapid return to a profitable situation. But that depends actually on the implementation of the trender.
So, in brief, i will take, as <b>"core"</b>, the countertrending strategy which we already know well and which has those sound properties, and will try to overlay a "directional game" to try protect it when there are large directional moves. The general expectation should be overall less profits (on the long run), but (hopefully) a smoother equity curve.
Let's see what comes out (this is just a first attempt: i may be adjusting the trending game based on your suggestions).
For what i can foresee a difficulty here is balancing the 2 games. The general idea is to let the "countertrender" work in a relatively limited range, and as a unidirectional move takes form, let the "trender" take fly. Clearly, intuitively, in the middle of the 2 games there is a "gray zone", a "transition zone" where we can expect to see the lesser performances. Depending on which one of the 2 opposite games we give more emphasis, we can get a whole range of different strategies. Personally, i would like to maintain as much as possible the countertrending game and let the trender kick in for protection purposes.
Another weeakness i expect is that, while in this way we "bound" the the PNL when there are deep moves (like those currencies often do), we may still experience (large?) drawdowns when an instrument keep oscillating in a range, causing several direction changes and associated losses. So it seems important for small positions to maintain the countertrending game, and have a "transition zone" as small as possible (and, possibly, "ever changing").
In the following i will denote by <b>CT</b> the original countertrending game and by <b>CT+T</b> the modified algorithm where a trending game is overlaid upon CT. I would like to run a parallel test of CT and CT+T and try to determine the "best" T for hedging purposes.
(Note that even when i talk about "trending", by no means, i imply any attempt to "predict" market direction, but simply a "mechanical" device to counterbalance and reduce the exposition of the underlying CT strategy. As probably all of you already know from previous discussion, i never use "prediction" and "indicators", in the sense of "probable indication of a future occurrence").
Tom
