Murray Ruggiero’s Inter-Market Research
Well it’s been a year, this month, that Murray passed away. I was fortunate to work with him on many of his projects and learned quite a bit about inter-market convergence and divergence. Honestly, I wasn’t that into it, but you couldn’t argue with his results. A strategy that he developed in the 1990s that compared the Bond market with silver really did stand the test of time. He monitored this relationship over the years and watched in wane. Murray replaced silver with $UTY.
The PHLX Utility Sector Index (UTY) is a market capitalization-weighted index composed of geographically diverse public utility stocks.
He wrote an article for EasyLanguage Mastery by Jeff Swanson where he discussed this relationship and the development of inter-market strategies and through statistical analysis proved that these relationships added real value.
I am currently writing Advanced Topics, the final book in my Easing Into EasyLanguage trilogy, and have been working with Murray’s research. I am fortunate to have a complete collection of his Futures Magazine articles from the mid 1990s to the mid 2000s. There is a quite a bit of inter-market stuff in his articles. I wanted, as a tribute and to proffer up some neat code, to show the performance and code of his Bond and $UTY inter-market algorithm.
Here is a version that he published a few years ago updated through June 30, 2022 – no commission/slippage.
Not a bad equity curve. To be fair to Murray he did notice the connection between $UTY and the bonds was changing over the past couple of year. And this simple stop and reverse system doesn’t have a protective stop. But it wouldn’t look much different with one, because the system looks at momentum of the primary data and momentum of the secondary data and if they are in synch (either positively or negatively correlated – selected by the algo) an order is fired off. If you simply just add a protective stop, and the momentum of the data are in synch, the strategy will just re-enter on the next bar. However, the equity curve just made a new high recently. It has got on the wrong side of the Fed raising rates. One could argue that this invisible hand has toppled the apple cart and this inter-market relationship has been rendered meaningless.
Murray had evolved his inter-market analysis to include state transitions. He not only looked at the current momentum, but also at where the momentum had been. He assigned the transitions of the momentum for the primary and secondary markets a value from one to four and he felt this state transition helped overcome some of the coupling/decoupling of the inter-market relationship.
However, I wanted to test Murray’s simple strategy with a fixed $ stop and force the primary market to move from positive to negative or negative to positive territory while the secondary market is in the correct relationship. Here is an updated equity curve.
This equity curve was developed by using a $4500 stop loss. Because I changed the order triggers, I reoptimized the length of the momentum calculations for the primary and secondary markets. This curve is only better in the category of maximum draw down. Shouldn’t we give Murray a chance and reoptimize his momentum length calculations too! You bet.
These metrics were sorted by Max Intraday Draw down. The numbers did improve, but look at the Max Losing Trade value. Murray’s later technology, his State Systems, were a great improvement over this basic system. Here is my optimization using a slightly different entry technique and a $4500 protective stop.
This system, using Murray’s overall research, achieved a better Max Draw Down and a much better Max Losing Trade. Here is my code using the template that Murray provided in his articles in Futures Magazine and EasyLanguage Mastery.
// Code by Murray Ruggiero
// adapted by George Pruitt
If Type=0 Then
InterInd=Close of Data(InterSet)-CLose[LenInt] of Data(InterSet);
If Type=1 Then
InterInd=Close of Data(InterSet)-Average(CLose of Data(InterSet),LenInt);
if Relate=1 then
If InterInd > 0 and MarkInd CROSSES BELOW 0 and LSB>=0 then
Buy("GO--Long") Next Bar at open;
If InterInd < 0 and MarkInd CROSSES ABOVE 0 and LSB<=0 then
Sell Short("GO--Shrt") Next Bar at open;
if Relate=0 then begin
If InterInd<0 and MarkInd CROSSES BELOW 0 and LSB>=0 then
Buy Next Bar at open;
If InterInd>0 and MarkInd CROSSES ABOVE 0 and LSB<=0 then
Sell Short Next Bar at open;
Here the user can actually include more than two data streams on the chart. The InterSet input allows the user to choose or optimize the secondary market data stream. Momentum is defined by two types:
- Type 0: Intermarket or secondary momentum simply calculated by close of data(2) – close[LenInt] of date(2) and primary momentum calculated by close – close[LenTr]
- Type 1: Intermarket or secondary momentum calculated by close of data(2) – average( close of data2, LenInt) and primary momentum calculated by close – average(close, LenTr)
The user can also input what type of Relationship: 1 for positive correlation and 0 for negative correlation. This template can be used to dig deeper into other market relationships.
I simply forced the primary market to CROSS below/above 0 to initiate a new trade as long the secondary market was pointing in the right direction.
If InterInd > 0 and MarkInd CROSSES BELOW 0 and LSB>=0 then Buy("GO--Long") Next Bar at open;If InterInd < 0 and MarkInd CROSSES ABOVE 0 and LSB<=0 then Sell Short("GO--Shrt") Next Bar at open;
Using the keyword CROSSES
This was a one STATE transition and also allowed a protective stop to be used without the strategy automatically re-entering the trade in the same direction.
Thank You Murray – we sure do miss you!
Murray loved to share his research and would want us to carry on with it. I will write one or two blogs a year in tribute to Murray and his invaluable research.
>> By George Pruitt from blog georgepruitt.com