Au.Tra.Sy blog - Automated trading System Au.Tra.Sy blog - Automated trading System
Search
Trendpot Indicator: Transtrend Measure of Market Trendiness

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.

link to Transtrend presentation

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.

Trendpot Usage

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:

CSI
Symbol
Instrument Description Trendpot
Value
JRB Azuki Beans-Red-TGE 0.600
JR2 Rubber (Combined Sessions)-TCE 0.484
FFI FTSE 100 Index-EURONEXT(LIFFE) 0.371
NG2 Natural Gas-Henry Hub-NYMEX 0.363
ICL Crude Oil-WTI-ICE 0.354

 
Bottom Trendpot values:

CSI
Symbol
Instrument Description Trendpot
Value
JY Japanese Yen-CME 0.174
KC Coffee-CSCE 0.172
SXE DJ Euro STOXX 50 Index-EUREX 0.165
CD Canadian Dollar-CME 0.124
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…

Code

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).

Syntax:
Highest( series, bars, [offset] )

Parameters:
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

returns:
the highest value

For example:
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.
 
 

Picture credits: bixentro via flickr (CC)
Related Posts with Thumbnails

arrow4 Responses

  1. Robert
    44 mos, 1 wk ago

    Trendpot code, Hi Jez

    I’m a tradingBlox user, never had the urge or need to import code into it, untill now, would like to examine the South African all share index using your code, I have gone through the manuals, not much the wiser in terms of importing the code, your assistance please, it would be highly appreciated.

    Kind regards
    Rob

  2. 44 mos ago

    Robert,
    It should be fairly simple.
    Just place the .tbx code file (which you can download from the TB forum link in the post) into your “Blox” directory and the code should be available as an Auxiliary block in the System Editor
    Jez

  3. Paul
    25 mos, 2 wks ago

    Jez,

    First of all, thank you and congratulations for your blog. I’ve been receiving your Wizard monthly update for a long while now, and I’ve always tought I should say thank you at least.

    I’ve got some time on my hands, these days, so I’m reading many of the archived posts. I enjoy your precision and also, your simplicity.

    I’m reacting to this post because I’m fustrated! I read the Transtrend document which you provided in a previous post and I was thinking they could have shown the studies you ended up conducting here! But you don’t give away all the results except for those who are good at coding, which I’m definitely not.

    This is what I would need, and I’ll explain why afterwards: all the monthly numbers for each intrument in your universe over the last 10 years, and for each of the 4 periods of time you tested (5, 15, 30, 50 days).

    This is what I’m going to do with those numbers: I already have 15 instruments in my universe which work fine, but I’m sure I could improve the overall result by making a different selection, because I believe some instruments trend less than others. That they’ve trended less in the past, and that it will not change in the future.

    I’ll use the monthly numbers which correspond to the 15 instruments I trade, and I’ll keep the period of time which best matches my monthly results for those 15 instruments. I’m a trend follower, but my results are not so correlated to the Wizards as your State of TF is.

    And then of course, I’ll select the best instruments to trade provided they’re very liquid and also, provided they’re diversified enough amongst the 4 asset classes.

    Hopefully you have all this data already available. Otherwise never mind, I have other pieces of information to help me on your great blog.

    Paul

  4. 25 mos, 1 wk ago

    Paul, thanks for the comment.
    This has been a little while since this study so I’ll have to dig through my archives to see if I kept these more detailed results.. Not sure I still have them though..

Leave A Comment