In a previous post, I mentioned and linked to a presentation by Transtrend: “Potential Profitability by Trend Following Systems”, where the Trendpot Indicator is introduced.
Trendpot is a backward looking measure that indicates for an individual market whether a medium to long-term trend following system could potentially have been profitable when applied on that particular market during the preceding month.
Trendpot is a number between 0 and 1:
- 0 indicates a very low chance for a trend following system to have been profitable.
- 1 indicates a very high chance for a trend following system to have been profitable.
The concept is an interesting way of identifying how much a market/portfolio has been in trending vs. non-trending mode and I decided to implement the indicator in Trading Blox – with a twist:
The original Trendpot calculation uses a fixed one-month lookback period, to evaluate the trend potential for that month (and therefore only considers potential performance for a “medium to long-term trend following system”). I parameterized the formula to look at different periods and be able to evaluate the trend potential on different timeframes on a daily basis.
For those interested in the code only, please see the end of this post for details. The formula code is Trading Blox specific, but simple enough to be derived easily for any back-testing language.
Transtrend describes the indicator’s goal as a help to explain the performance of a trend following system. In effect, Trend Followers performance is subject to the behaviour of the market: ranging markets are not nearly as conducive to good Trend Following performance as trending ones.
Being able to back this argument with a quantitative measure of the trendiness of markets is probably a good way to reassure investors during expected periods of system under-performance. In 2009 for example, markets might have seemed to offer trends (with “headlines” markets such as Gold or S&P 500 “trending” up by more than 50% after their respective lows at beginning of the year), yet Trend Following Wizards performance was mostly negative in 2009.
In the presentation, Transtrend provides some explanation in the form of the Trendpot calculation for a diversified portfolio: 2009 displayed the lowest Trendpot value (i.e. lowest trend potential) of the last 20 years.
I used the indicator to perform a near-identical study on the portfolio used in the State of Trend Following report and measured the Trendpot values for years 2008, 2009 and 2010 (which were respectively, very good, negative and rather positive for the Trend Following Wizards – or to avoid subjective adjectives: +29.9%, -7.3% and +19.1% respectively).
The average values for the 30-day Trendpot were:
- 2008: 0.331
- 2009: 0.203
- 2010: 0.245
Note: to put these numbers in perspective, the average monthly Trendpot values per year calculated by Transtrend for the last 20 years varies between 0.24 (obtained in 2009) and 0.39 (obtained in 2008).
It seems that the value calculated by their version generates slightly higher numbers, which could be for a number of reasons such as:
- Different portfolio (Transtrend portfolio contains more markets, including spreads)
- Different price representation (Transtrend use one price series for every market representing a liquidity-weighted combination of tradable active months, whereas I used a simple back-adjusted contract)
- Type of price used (I considered High, Low and Close whereas Transtrend only considers daily closing prices).
Nevertheless, the pattern in calculated indicator values is identical: 2008 displays a much higher value than 2009.
Graphically, this is also illustrated by the frequency histogram of the Trendpot values for the whole portfolio for these three different years:
2008 shows a larger tendency of markets to be in trending mode, with the frequency of the Trendpot value maxing out at 1 being nearly three times as large as that of 2009, and the histogram being generally “heavier” on the right-hand side (which is expected, as the overall average value is higher).
Trendiness of Different Timeframes
By updating the value of the period used in the indicator calculation, we can look at different timeframes, going from shorter-term trend following (i.e. 5 to 10 days) to much longer periods.
Below are two histograms, for 2008 and 2009, showing the distribution of Trendpot values for 4 period values, ranging from 5 days to 50 days:
And the average values:
- 5-day Trendpot Average Value: 2008= 0.247, 2009= 0.2226
- 10-day Trendpot Average Value: 2008= 0.266, 2009= 0.203
- 30-day Trendpot Average Value: 2008= 0.331, 2009= 0.203
- 50-day Trendpot Average Value: 2008= 0.352, 2009= 0.242
It might be interesting to look at a longer set of historical values and compare the standard deviation of Trendpot values. A lower standard deviation number might indicate a better robustness for a specific timeframe (robust meaning here that the potential – good or bad – of a specific timeframe is less affected by market conditions).
Trendiness of Different Instruments
Another potential use for the indicator is to look at isolated markets and their average Trendpot values to derive their trending potential.
I have run such a calculation for the instruments in the State of Trend Following portfolio over the period 2008-2010. The average value for an instrument is 0.267, with a standard deviation of 0.083.
Here are the top and bottom values:
Top Trendpot values:
|JR2||Rubber (Combined Sessions)-TCE||0.484|
|FFI||FTSE 100 Index-EURONEXT(LIFFE)||0.371|
|NG2||Natural Gas-Henry Hub-NYMEX||0.363|
Bottom Trendpot values:
|SXE||DJ Euro STOXX 50 Index-EUREX||0.165|
|JP6||Palladium (Combined Sessions)-TCE||0.071|
An interesting next step – possibly in a follow-up post – would be to calculate the correlation between the Trendpot value for an instrument and its contribution to the system performance.
Postdictive or Predictive Indicator?
Transtrend specify that “Trendpot is a measure, not an indicator: No predictive value!“.
As a monitoring tool, Trendpot looks like a useful addition to the box. However I wonder whether it could not be used as an input to over/under-weigh timeframes or instruments based on their past Trendpot values.
This would rely on the assumption that futures values are somehow function of past values.
We know that some market characteristics are not independent of past values (serial correlation for example), perhaps the trendiness of markets is one such characteristic…
Trading Blox owners should be able to download the blox code, which I uploaded on the Blox Marketplace section of the Trading Blox formula. This is a simple implementation, which simply plots on the chart and outputs in a file the value of the Trendpot indicator for each instrument in the portfolio.
For those readers not having access to this section of the Trading Blox forum, I include below the main part of the code, which merely implements Transtrend formula, with an additional period parameter:
Ht = Highest(instrument.High, Period) Ht_1 = Highest(instrument.High, Period, Period) Ht_2 = Highest(instrument.High, Period, 2*Period) Lt = Lowest(instrument.Low, Period) Lt_1 = Lowest(instrument.Low, Period, Period) Lt_2 = Lowest(instrument.Low, Period, 2*Period) Ct = instrument.Close Ct_1 = instrument.Close[Period] Ct_2 = instrument.Close[2*Period] NewHigh = Ht - max(Ht_1,Ht_2) HighEnd = Ct - Ht_1 Upmove = min(Newhigh, HighEnd) SmoothUp = min(Ht - Ht_1, Lt - Lt_1, Ct - Ct_1) TrendUp = max(0, (Upmove+Smoothup)/2) Decline = max(Ht_2 - Lt, Ht_2 - Lt_1, Ht_1 - Lt, Ht - Ct) ScaleUp = max(Decline, trendUp) TrendpotUp = TrendUp / ScaleUp NewLow = min(Lt_1, Lt_2) - Lt LowEnd = Lt_1 - Ct Downmove = min(NewLow, LowEnd) SmoothDown = min(Ht_1 - Ht, Lt_1 - Lt, Ct_1 - Ct) TrendDown = max(0, (Downmove+SmoothDown)/2) Rise = max(Ht - Lt_2, Ht_1 - Lt_2, Ht - Lt_1, Ct - Lt) ScaleDown = max(Rise, trendDown) TrendpotDown = TrendDown / ScaleDown Trendpot = IfThenElse(Ct - Ct_1 > 0, TrendpotUp, IfThenElse(Ct - Ct_1 < 0, TrendpotDown, 0))
Note/Update: The functions Highest/Lowest use a Trading Blox-specific notation. The second argument is the number of bars over which to find the value while third argument is the “offset” (ie number of recent bars to skip).
Highest( series, bars, [offset] )
series: the name of the series
bars: the number of bars over which to find the value
offset: the number of bars to offset before finding the value
the highest value
Ht = Highest(instrument.High, Period) is the highest High over the last 30 bars (if Period = 30), i.e. roughly last month’s high
Ht_1 = Highest(instrument.High, Period, Period) is the highest High over the 30 bars, starting 30 bars ago (if Period = 30), basically between bar 31 and 60 in the past, i.e. roughly the previous month’s high.