A tribute to Murray and his intermarket research
This month marks one year since Murray’s passing. I was lucky enough to work with him on many of his projects and learned a lot about convergence and divergence between markets. Honestly, I wasn’t very interested in it, but you couldn’t argue with its results. A strategy he developed in the 1990s that compared the bond market to silver really stood the test of time. He oversaw this relationship over the years and watched it dwindle. Murray substituted $UTY for silver.
The PHLX Utility Sector Index (UTY) is a market capitalization-weighted index comprised of geographically diverse utility stocks.
He wrote an article for Jeff Swanson’s EasyLanguage Mastery in which he discussed this relationship and cross-market strategy development and, through statistical analysis, showed that these relationships added real value.
I am currently writing Advanced Topics, the last book in my Easing Into EasyLanguage trilogy, and have been working on Murray’s research. I am fortunate to have a complete collection of his articles from Futures Magazine from the mid-1990s to the mid-2000s. There is quite a bit of cross-market material in his articles. As a tribute and to offer clean code, he wanted to show the performance and code of his Bond and $UTY cross-market algorithm.
Below is a version he posted a few years ago updated to June 30, 2022-no commission/slippage.
Murray’s Strategy for Intermarket Bonds and $UTY
Not a bad equity curve. In fairness to Murray, he noted that the connection between $UTY and bonds was changing in the last couple of years. And this simple stop and reversal system does not have a protective stop. But it wouldn’t look much different with one, because the system looks at the momentum of the primary data and the momentum of the secondary data and if they are in sync (either positively or negatively correlated – selected with the all go) an order is fired. If you simply add a protective stop, and the momentum data is in sync, the strategy will simply re-enter on the next bar. However, the equity curve has just made a new high recently. It has gotten on the wrong side of the Fed’s rate hike. It could be argued that this invisible hand has brought down the apple cart and that this relationship between markets has become meaningless.
Murray had evolved his intermarket analysis to include state transitions. He not only observed the current impulse, but also where the impulse had been. He assigned the momentum transitions for the primary and secondary markets a value from one to four and felt that this state transition helped to overcome some of the coupling/decoupling of the relationship between markets.
However, he wanted to try Murray’s simple strategy with a fixed $ stop and force the primary market to go from positive to negative or negative to positive territory while the secondary market is in the right relationship. Below is an updated equity curve:
George adaptation with a stop loss of $4500
This equity curve was developed using a stop loss of $4,500. Since I changed the order triggers, I re-optimized the length of the impulse calculations for the primary and secondary markets. This curve is only better in the maximum draw down category. Shouldn’t we give Murray a chance and re-optimize his pulse length calculations as well? Of course.
Murray length optimizations
These statistics have been sorted by Max Intraday Draw down. The numbers improved, but look at the value of the Biggest Losing Trade. State systems, Murray’s later technology, were a vast improvement over this basic system. This is my optimization using a slightly different entry technique and a protective stop of $4500.
On the shoulders of a giant
This system, using Murray’s general research, achieved a better Max Draw Down and a much better Max Losing Trade. Here’s my code using the template Murray provided in his Futures Magazine and EasyLanguage Mastery articles:
// 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 include more than two data streams in the graph. The InterSet input allows the user to choose or optimize the flow of data from the secondary market. Momentum is defined in two ways:
Type 0: Intermarket or secondary moment calculated simply by the close of data(2) – close[LenInt] of date(2) and primary moment calculated by close – close[LenTr].
Type 1: Intermarket or secondary moment calculated by the close of the data(2) – average(close of the data2, LenInt) and primary moment calculated by the close – average(close, LenTr)
The user can also enter the relationship type: 1 for positive correlation and 0 for negative correlation. This template can be used to deepen other market relationships.
I simply forced the primary market to CROSS below/above 0 to start a new trade as long as 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;
Thanks Murray – we miss you!
Murray loved to share his research and would want us to continue with it. I will write one or two blogs a year in honor of Murray and his invaluable research.
Article courtesy by George Pruitt / August 1, 2022
Quantified Models Youtube Channel
On our YouTube channel we have several videos available that you may find very useful for developing trading systems. To access, click this link: Quantified Models YouTube Channel
We hope this information has been useful to you.