Systematic Trading research and development, with a flavour of Trend Following
Au.Tra.Sy blog – Automated trading System header image 2

Better Trend Following via improved Roll Yield

July 26th, 2010 · 31 Comments · Futures, Strategies, Trend Following

To round off a series on backwardation, contango and roll yield (posts 1, 2 and 3), let’s put all this info together and use it in an innovative trading strategy to show how it can improve the performance of a Trend Following system by optimising its roll yield component (note: this could also be applied to other systems than Trend Following). The results are pretty interesting.

DB Optimal Yield Index

This idea of optimising roll yield is not a brand new approach, however I have never seen it applied to an active trading strategy.

In fact, I have only seen it applied in the Deutsche Bank Commodity Index (exact name is a mouthful: Deutsche Bank Liquid Commodity Index – Optimum Yield Diversified Excess Return – which I suspect has really only been devised to underlie their ETF fund tracking it).

Deutsche Bank seems to have taken on-board the fact that roll yield represents a non-negligible aspect of futures/commodity investing. From the index/fund website:

The Index is a rules-based index composed of futures contracts on 14 of the most heavily-traded and important physical commodities in the world.

Optimum Yield describes the process by which expiring futures contracts in the Index are replaced with new futures contracts. The Optimum Yield process seeks to pick the futures contract expiring in the next thirteen months that has the highest implied roll yield.

In effect, since the fund is always long, it tries to buy the contract which offers the highest rate of backwardation, or at least the lowest rate of contango.

DB do seem to produce some excess return through that process, as displayed by this comparative chart, taken from their marketing material:

DBC_Performance_History

Optimal Roll Yield Trend Following

I wanted to check how a similar concept would perform on an active trading strategy such as a Trend Following system. Typically, in mechanical futures trading, one usually uses the front-month contract — makes it easier to backtest (only one back-adjusted continuous time series to handle) and simpler to trade (only one contract to monitor and trade).

However, in a new optimal roll yield approach, for each trading signal to buy or sell, one could have a theoritical choice to trade any available contracts and their associated maturities. For any given date where a trading signal occurs, one could check the futures contracts yield curve and determine the contract which will optimise the roll yield (highest rate of backwardation, or at least the lowest rate of contango for a BUY signal and the opposite for a SELL signal).

The Methodology: MA Cross-over 50/20 with Optimal Roll Yield

The two components of Trend Following return we are dealing with here are the returns from the spot price beta moves and the roll yields from the futures contracts (TF returns breakdown here).

The idea is to generate the Trend Following signals based off the spot price movements and for each new signal, compute the yield curve to identify the contract which offers the most attractive roll yield (depending on the signal direction). For this example, I picked a very standard cross-over system using 50-day and 20-day MAs.

The process sequence looks like this:

  1. Generate the Trend Following strategy signals based off the spot price movements (ie crossovers between the spot price 50-day and 20-day MAs); and for each new signal:
  2. Compute the yield curve to identify the contract which offers the most attractive roll yield (depending on the signal direction).
  3. Buy/Sell that contract
  4. Hold the position until either: 1) the contract expires (roll-over) or 2) the position is reversed (new signal + yield curve computation to pick the best yielding contract)

The lookup for the “best” contract is limited to 12 months in the future.

Note that roll-overs should happen less frequently than with a standard approach (because you might buy a contract maturing in 12 months and hold it for the full 12 months – as opposed to rolling over to the front-month contract every month).

The Results for Crude Oil

Because I coded some of the test algorithm outside of Trading Blox (see p.s. below for more details), I decided to keep it simple to start with, and ran the test on one instrument only, keeping working with Crude Oil (since it instigated this series on roll yield).

As a reference point, the performance of the 20-50 MA cross-over system on front-month contracts (“standard” approach) returned a CAGR of 10.25% with a MaxDD of 46.85% and an annualized Sharpe ratio of 0.37 (no trade costs or slippage included in the test).

OK – enough introduction, here are the comparison results:

Chart-enhanced-roll-yield

The chart shows it pretty clearly and the summary table confirms it:

Statistic Roll Yield approach:
Standard Optimal
End Balance (start: 10M)
73,517,650.00
131,778,260.00
CAGR
10.26%
13.45%
Max Drawdown
46.85%
28.49%
Average Drawdown 17.38% 10.27%
MAR Ratio
0.22
0.47
Modified Sharpe Ratio*
0.37
0.54

 
The optimal roll yield approach seems to improve the overall system significantly, whatever metrics you wish to pick for comparison. Pretty pleasing results…

Volume and Slippage Considerations

However, there is an important aspect about trading in the front-month only: liquidity. And with liquidity come better fills and lower slippage — which can greatly impact trading system results.

My initial assumption was that if the optimal yield concept was viable for a large player like DB to run a fund with, I should not worry about liquidity for a similar approach with Trend Following. By checking the actual volume figures for each contract bought/sold with the strategy, I quickly realised that some trades had been made on days with very low volume (ie <50) and "only" 83% of trades on a daily volume over 1,000. Oops, was I just chasing an elusive unicorn? A theoritical result impossible to to apply in practical real-life trading...

Adding a liquidity filter to the roll yield algorithm would allow to reject contracts for which daily volume is too low and avoid liquidity problems. How much would it affect performance, though?

Not too much actually:

LiquidityFilter

The filter is pretty simple: when it computes the yield curve and checks for the contract with the best roll yield, it only considers contract months for which daily volume is over 5,000.

And for completeness, the table summarizing the three tests undertaken:

Statistic Roll Yield approach:
Standard Optimal Optimal w/ Filter
End Balance (start: 10M)
73,517,650.00
131,778,260.00
137,695,690.00
CAGR
10.26%
13.45%
13.69%
Max Drawdown
46.85%
28.49%
35.56%
Average Drawdown 17.38% 10.27% 12.28%
MAR Ratio
0.22
0.47
0.38
Modified Sharpe Ratio*
0.37
0.54
0.51

 

Note that even with the liquidity filter, slippage might still be a bit better in the front-month contract, as this is where a big chunk of the trading is concentrated. However, real-life testing is the only way to verify and quantify this difference.

To get an idea of how slippage would affect the system performance in general, I ran the standard approach system as a backtest in Trading Blox, with slippage set at a pessimistic 25%. Under these conditions, the system performance (CAGR) dropped “only” by 2.5 percentage points.

Conclusion

One of my main concerns regarding this strategy was the potential loss in “raw price moves” (ie the fact that price trends would not propagate as well in alternative contract months), but the strong correlation between the standard and optimized approach seems to indicate that improved roll yield return does not come at the cost of beta spot price moves return, therefore providing a direct bonus.

It is quite evident that liquidity can become an issue and that a liquidity filter should be employed at a minimum. Moreover Crude Oil, used for this example, is one of the largest traded physical commodity. Other products might not offer enough liquidity depth, far in the yield curve. DB, however, can implement its optimal yield approach over 14 different instruments, which indicates that there is scope for this approach to be employed on additional products to Crude Oil. I believe such approach could have its place in a fully diversified Trend Following system – but only applied to the most liquid instruments.

Finally the optimal approach might generate some additional slippage compared to the traditional approach. However, this extra slippage cost should still be outweighed by the extra roll yield return, as evidenced in the Trading Blox slippage impact test.

Epilogue: Techie’s corner

In terms of techical implementation, this is slightly more complicated than standard back-testing because each instrument must use multiple price streams (for each individual contract) and cannot be handled by standard back-testing packages (that I know of, or without heavy customisation).

To avoid re-developing a back-testing package from scratch, I used my trusted copy of Trading Blox to generate the “standard/non-optimal roll yield” MA cross-over system output for a single instrument (Crude Oil), which output several files providing the dates of the signals as well as other useful computations such as position sizing with number of contracts and running Total Equity values. Using this information, I ran a second pass of processing, by reading the signals and other info generated by Trading Blox, and looping through the individual contract data in order to pick, for each entry signal, the best contract on the yield curve (this second part was coded outside of Trading Blox).

 
Credits: Thanks to the Trading Blox forum members to help discuss the subject of this post on this thread, and especially svquant for pointing out the DB Optimum Yield commodity index.
 
 
*Note: the Modified Sharpe ratio is as per Jack Schwager’s definition in Managed Futures, Myths and Truths, which introduces interesting performance metrics. The Modified Sharpe ratio is simply a Sharpe ratio where Rf (risk-free rate of return) is set to 0 (makes it independent of leverage). mSR = E[R] / sd.

Related Posts with Thumbnails

Tags: ·

31 Comments so far ↓

  • Monday links: house of mirrors Abnormal Returns

    [...] Better trend following via improved roll yield.  (Au.Tra.Sy Blog) [...]

  • TopTick

    Great stuff. Thanks, too, for the implementation notes.

  • Josh

    Great stuff! I saw this concept on CXO Advisory and read the paper from SSRN. I tried implementing it on Tradestation using custom back-month continuous contracts but it seems Tradestation’s data isn’t quite up to it. What data source do you use? What happens when one of the back month contracts doesn’t trade one day; do you assume the spread is the same as the last day with a trade?

    Thanks,

    Josh

  • Jez

    Hi Josh, Thanks.
    For Data, I use CSI (see this post: http://www.automated-trading-system.com/unfair-advantage-csi/ where I briefly talk about it).
    The logic is fairly simple: when comes the time to compute the roll yield (each trading signal or roll-over), the algorithm simply looks at all contracts available on that day. If the contract does not trade that day, it is not considered. CSI would also output 0 volume (which would prevent the contract from being picked up for trading).

    I actually did not see the paper on CXO/SSRN – would you have a link by any chance?

  • Josh

    Hi Jez,

    Yes, here it is, and in my opinion, essential reading for a futures trend follower. Its a bit different; it combines momentum and the roll return for selecting commodities as opposed to selecting a contract month.

    http://www.cxoadvisory.com/momentum-investing/combining-momentum-and-roll-return-signals-for-commodity-futures/

    Okay, so let me see if I get this right. You aren’t using the front month contract, you’re using the spot price and then for any contracts that trade on the signal day and meet your liquidity threshold, you calculate an annualized “yield” based on price difference between spot and the contract, and the time to maturity?

    Does that sound right? And so I assume that CSI provides historical spot prices as well?

    Thanks.

  • TopTick

    Josh may mean “Tactical Allocation in Commodity Futures Markets:
    Combining Momentum and Term Structure Signals” by Fuertes, Miffre, and Rallis.

    http://papers.ssrn.com/sol3/papers.cfm?abstract_id=1127213

  • Josh

    I’ve been looking deeper into my Tradestation data and have found some funny prints. For the second nearest CL contract on 10/26/09 I get zero volume but the following day has zero volume with a change in open interest and closing price. I definitely have a few holes in my knowledge of the minute details of futures. Any idea on how open interest can change without any recorded volume?

    My first thought was that maybe someone exercised some options which naturally would change open interest on the underlying but open interest increased. The same happened on the 3rd and 4th nearest contracts (with different changes in OI).

    Any thoughts?

    Josh

  • Josh

    Oh darn, looks like my previous reply didn’t register.

    The link is here and highly recommended:

    http://www.cxoadvisory.com/momentum-investing/combining-momentum-and-roll-return-signals-for-commodity-futures/

    So are you using trading signals from the spot price or the nearest contract? And if I understand correctly, you first filter all contracts for minimum liquidity, then calculate what the implied “yield to maturity” is for each contract?

    So if the annualized yield of spot divided by 6-month is higher than that of the same calculation for the 4-month you buy the 6-month (and vice versa for shorts)?

    Thanks Jez,

    Josh

  • Jez

    @Josh and @TopTick: thanks for the link (and apologies for the spam blocker – 2 comments were sitting in that queue…). I did not realise this was the paper you were referring to (in which they use the yield curve in a different manner: as a portfolio filter), but I have read it and it is interesting indeed…
    If you havent read it, this other paper on term structure is also interesting: Separating the Wheat from the Chaff: Backwardation as the Long-Term Driver of Commodity Futures Performance; Evidence from Soy, Corn and Wheat Futures from 1950 to 2004

    Regarding data, I effectively used a back-adjusted contract with nearest contract for several reasons:
    - It made the annualisation of the yield rate process was simpler (ie difference between different contracts is only measured in days as opposed to having to calculate time to maturity in days for each contract to annualise the rate based on spot price difference)
    - CSI do provide a spot price time series but upon closer inspection it looked like it was just a concatenation of the last days of nearest contracts so it did not look like it would make any difference.

    Re your question:
    “So if the annualized yield of spot divided by 6-month is higher than that of the same calculation for the 4-month you buy the 6-month (and vice versa for shorts)?”
    It is not strictly true: I go solely by the yield rate (no division by number of months) and just pick the contract with the highest (lowest) annualised yield rate for longs (shorts): If the contract expiring in 6 months has an implied roll yield of 5%, and the 4-months one a yield of 4%, I’d buy the 6-months for longs and 4-months for shorts.

    Jez

  • Motomoto

    Hi Jez, One thing that struck me while reading and its possibly more something to eyeball.
    Were there instances when the roll yield from say backwardation to contango whilst holding a contract?

  • Josh

    Gotcha. That’s simpler but gets the job done.

  • Jez

    @Motomoto
    Yes there were – cant tell you precisely how many as it takes some “log debugging” but I could find an instance in June 07 where the system goes long and buys the least contangoed contract: June 08 (model with no liquidity filter) and stays long until Feb 08 (holding the same contdact) while the contract yield rate goes from contango to backwardation (along with most of the yield curve during that period).

  • Josh

    Jez,

    Any thoughts on my comment about two consecutive days of zero volume with an increase in open interest? I’m wondering if either there’s something wrong with my data or if it’s just a gap in my knowledge of the finer details of futures.

    Josh

  • Jez

    Josh – even on CSI, data issues do occur.. For your specific issue, I have the same understanding as you: if there is no volume, there is no trading – if there is no trading, there cannot be a change in open interest…
    As far as I’m concerned I would consider this as a data error (but there could also be a gap in my knowledge ;-) I cant think of a valid reason to explain this.
    Jez

  • Josh

    Thanks,

    Well then for at least the back months,
    Tradestation is unreliable as I have numerous instances of this. For a decrease in open interest the exercise of options would make sense but for a decrease??? I would speculate that if it is’t a data issue it might involve special transactions that are negotiated between two specific parties (I remember reading something about the rules of this on CME/CBOT) which would explain a change of openint but without volume. I’m going to have to call my broker and inquire. I’ll let you know what I find out.

    Josh

  • Pete

    It’s a undeniable fact that a combination of equity (for example SP500) and Vix (say 95% sp500 and 5% vix) give an aggregate results with a better Sharpe ratio.
    For example you can read this, but there are a lot of study about that:
    http://econ.duke.edu/dje/2008_Symp/Sloyer%20Tolkin.pdf

    To take a long position on vix, is possible to buy vix future, that is also liquid.
    The problem is the same that affect commodities: today there is a very very steep curve. Do you have seen actual vix curve? It’s impressive! If someone is interested i can show you. I have Bloomberg and i can download everything, time series included.

    Do you have some ideas about how to optimize this very big problem?

    Thanks

  • Jez

    Pete,

    Using the same approach as in this blog post, one would consider several VIX futures contracts and pick the one that offers the lowest contango rate. Of course not much can be done if all contracts exhibit a very high rate of contango.

    Thanks for the link – this is an interesting concept in theory, which – as you point out – might be an issue to implement practically due to the very large contango that exists in the VIX. This is potentially a case where the roll yield is a more important factor than the spot/cash market itself. This is a scenario which I was discussing with another trader not later than yesterday: he showed me a very interesting chart of the Mexican Peso, both with the spot price and a back-adjusted futures contract over the last decade. Despite the peso (spot market) losing half its value over the timeframe, the continuous contract actually gained 50%, because of the heavy positive roll yield (backwardation), more than offsetting the fall in peso… This VIX scenario might be an opposite case where holding the futures lose you money despite the VIX going up because of the large negative roll yield.

    I havent read the paper in great detail but it seems to me that some of their assumptions are flawed by considering the VIX as an asset itself whereas only the VIX futures are a tradeable asset. And follows a probable other flawed assumption: “The futures can be “rolled” relatively cheaply from one contract to the next as each contract expires” – clearly not true when taking contango into account…

    Not sure if this problem can really be “optimized away”..

  • Josh

    Considering that the VIX is a statistic derived from the prices of short-term options, which despite day-to-day fluctuations continuously lose value, then contango should be the expected norm for VIX futures.

    Think of the “storage costs” for replicating the VIX as a portfolio, i.e. buying the calls and puts with the correct ratio of front to back month maturities. A VIX futures contract might not expire for 3 months while the underlying options that the VIX is derived from will have lost all extrinsic value by that time.

    What would be interesting is to know if the negative roll yield on VIX futures tracks the negative theta of the underlying options. I bet there’d be an arbitrage play once you work the math out, if transaction costs don’t eat it all up.

  • Pete

    Give yourself a look at today vix curve:
    http://dl.dropbox.com/u/102669/Today.gif

    What kind of cost is this? There is an annualized cost of 119%, for example for december contract. Do you agree?

    But it wasn’t always like that. See 2008.
    Ok time decay, but there are also expectations
    http://dl.dropbox.com/u/102669/2008.gif

    Today it’s only for stupid take a long position on vix.
    But vix is very useful for a better sharpe ratio of equity, thanks of its negative correlation.

    How to obtain the same results, but with reasonable, logicol costs?

    Do you have an opinion, some ideas about that?

    Pietro

  • Josh

    The costs to going long calls and puts over the long term is huge as well.

    Obtain the same results? Not with some sort of “permanent portfolio”. Perhaps something short term and tactical, like having buy stops set for the VIX futures. You either have to accept the risk of stops not always working, or bite the bullet and pay premium to insure your portfolio. Or manage it full time. No free lunch.

  • Jez

    @Pete
    Yes – the annualized rate of contango is roundabout the figure you’re quoting… Very high!

    I’m not sure if there is any solution to this problem as Josh highlights. This is just one of these cases where the theory (of balancing your S&P holdings with negatively correlated VIX) sounds good but cannot be applied in practice. It seems very similar to the case of Crude Oil in 2009 which spot price performed very well but which performance could not be matched by futures or ETF, etc.
    See this post for some chart illustrations:
    http://www.automated-trading-system.com/crude-oil-contango-and-roll-yield-for-commodity-trading/

    The only option to replicate that performance was to hold physical (storage costs aside), which makes me realise this is probably why Anthony “Choc Finger” Ward took delivery of his thousands of tonnes of cocoa beans – I havent checked the yield curve on cocoa beans though, justified by the cocoa futures curve linked to from this article:
    http://ftalphaville.ft.com/blog/2010/07/19/289796/cash-for-chocolate/

    So in the case of VIX, which is not really physical or tangible, I’m not sure if there’s an alternative…

  • Josh

    Perhaps the forthcoming ETF based off of the new S&P VEQTOR index would be a good idea. It uses a systematic, rules-based approach (which is completely transparent) to adjust the allocation between S&P 500 and VIX futures.

  • Jez

    Indeed that ETF “looks” promising when looking at past equity curve.. However, it still uses Futures to invest in VIX and will suffer from contango just the same… The results looks good in 2008 partly (mostly) because VIX was in strong backwardation at that time (as illustrated by Pete’s chart from BBG) – which is not the case today…

  • Josh

    I wouldn’t disagree with you… the index (and ETF) also use a max loss rule (2% within five days I think) which kind of begs the question, if the VIX has a strong negative correlation to S&P then why not just use the VIX timing signals to get out of the market rather than buy VIX futures?

    I would guess that a fund just using market timing rules and stop losses isn’t as marketable as one that uses the VIX, what with the new investment theme of “volatility as an asset class”. All they’re doing is timing the market, which lacks credibility, and calling it dynamic asset allocation.

  • Josh

    Hi Jez,

    The fine folks at Tradestation took their sweet time getting back to me, as usual… Here’s their explanation for the open interest/volume discrepancy…

    “My apologies for the long wait on this.. I’m being told that there are actually a few things that can cause something like this. First off, keep in mind that the Open Interest is sent to us by the exchange at the end of each day, independent of the actual trades and volume they send us throughout the day. With that said, Tradestation does not account for ‘Spread trades’; which is basically the act of buying shares for one future (CLU10 for instance) while selling shares for another ‘related’ future (CLZ10) in an attempt to profit on the difference between the two. Tradestation’s policy is to exclude spread trades entirely from the overall volume count, while the exchange appears to be using the volume from spread trades when determining the Open Interest..

    In addition, please also keep in mind that Tradestation has its own filtering algorithm implemented, designed to detect and filter ‘erroneous’ trades – usually based on how far out of sequence it is from the bid/ask and previous trades.. If we receive a trade that is far out of sequence, we will usually filter it out, and the volume from that trade will be excluded. The exchange will typically consider ANY and ALL trades, including those that are clearly erroneous, when determining the overall volume and open interest for the day..”

    I doubt this presents any meaningful issue with backtesting strategies that use the back month contracts but I figured you might like to know.

  • Jez Liberty

    Thanks for the update Josh!

  • George

    Hi Jez,

    Thanks for the great post. Your information is so clear and easy to understand. And, it is also incredibly useful and actionable. It’s hard to find info like this.

  • Matt

    Very interesting study. Great to see someone thinking independently and out of the ‘software box’. I was unable to get the same backtested results with the 50/20 MA system. I tested this simple system on Multicharts and Esignal. The results I get are basically flat from 1990 – 2009 then a steep profit and loss in 2009-2010.

  • blog

    Hey there would you mind letting me know which hosting company you’re using? I’ve loaded your blog i

  • Jez Liberty

    I host the blog at WP Engine (aff. link). I’ve been very happy since I moved there (fast, managed upgrades, great suport etc.).

  • Raphael

    Hi Jez,

    New to your blog.
    Learning a lot from you and wanted to say thanks!

    Keep it up.
    Cheers,
    Raphael

Leave a Comment