Inter-Market Divergence Free For TradeStation 9.X

Transcription

Inter-Market Divergence Free For TradeStation 9.X
Inter-Market Divergence Free
For TradeStation 9.X
TradersManagement© 2014 All Rights Reserved
Page1
OverviewofInter‐marketAnalysisandTradingSystems
Over the past over 15 years, I have used inter-market analysis to develop trading systems
for many different markets. Examples include: the S&P500, Treasury bonds, Ten year note,
Eurodollars, gold, crude oil and more. Even with this said; I have done little on using intermarket analysis with currencies. In this special report I will analyze inter-market analysis for
currency traders. Let’s first review the basics of inter-market analysis.
In John Murphy's first book, published in 1991 on Inter-market Analysis; he used the
crash of 1987 to lay out his Inter-market hypothesis. The problem is that until I built and
published Inter-market based trading systems in 1994, no one had confirmed his work in a public
forum. Many institutional traders used the concepts, but rules to mechanical trading systems,
which used Inter-market Analysis, were not generally publicly available. I developed a very
simple concept for an Inter-market Based system.
For positively correlated markets we have as follows:
If Inter-market is in an uptrend and traded market in a down trend then buy.
If Inter-market is in a down trend and traded market is in an uptrend then sell.
You can use various concepts to define an up and down trend. In most of my work I used prices
that were relative to a moving average.
For negatively correlated markets we have as follows:
If Inter-market is in an uptrend and traded market in an uptrend then sell.
If Inter-market is in a down trend and traded market is in a down trend then buy.
We define trend as the “Sign of price relative to a selected moving average length”. The traded
market and inter-market can have different length moving averages.
I developed this concept because most of my inter-market work was based on the futures
TradersManagement© 2014 All Rights Reserved
Page2
market and using back adjusted futures contracts you can’t take ratios so this inter-market
divergence of price minus a moving average solved this issue.
Importing the Free Inter‐Market Divergence Code Press next and the browse to the file. Press open and then hit next, next, next. Then you can import our tool. TradersManagement© 2014 All Rights Reserved
Page3
Inter‐Market Divergence 100% Objective Trading Inter‐Market analysis is a powerful tool for developing trading systems. We can develop 100% mechanical system using the technology. Let’s now discuss some of these classic relationships and show how this tool can be used to fine these relationships. This tool can be used to create a system between a market you want to trade and a single Inter‐Market. The full Inter‐Market divergence professional package can analyze and find Inter‐Market relationships without any programming between the market you want to trade and up to 99 Inter‐Markets. The code for this tool is simple but very effective. This system is MAR _InterDivFree . // Inter‐Market Divergence Free Tool // Traders Management 2014 all rights reserved Inputs:LSB(0),Type(1),LenTr(4),LenInt(4),Relate(0); Vars: MarkInd(0),InterInd(0); If Type=0 Then Begin InterInd=Close of Data2‐CLose[LenInt] of Data2; TradersManagement© 2014 All Rights Reserved
Page4
MarkInd=CLose‐CLose[LenTr]; end; If Type=1 Then Begin InterInd=Close of Data2‐Average(CLose of Data2,LenInt); MarkInd=CLose‐Average(CLose,LenTr); end; if Relate=1 then begin If InterInd>0 and MarkInd<0 and LSB>=0 then Buy Next Bar at open; If InterInd<0 and MarkInd>0 and LSB<=0 then Sell Short Next Bar at open; If InterInd>0 and MarkInd<0 then Buy to Cover Next Bar at open; If InterInd<0 and MarkInd>0 then Sell Next Bar at open; end; if Relate=0 then begin If InterInd<0 and MarkInd<0 and LSB>=0 then Buy Next Bar at open; If InterInd>0 and MarkInd>0 and LSB<=0 then Sell Short Next Bar at open; If InterInd<0 and MarkInd<0 then Buy to Cover Next Bar at open; If InterInd>0 and MarkInd>0 then Sell Next Bar at open; end; Let’s show how this simple Inter‐Market tool can be used to create a very effective 30 year Treasury bond system. We will use the @US continuous contract to trade and $UTY which is the Philadelphia electrical utility average as our Inter‐Market. TradersManagement© 2014 All Rights Reserved
Page5
After building this chart you will see that the @US continuous contract starts in 5/14/2001, so we don’t have 20 years of data for @US even though we have it for $UTY, the Philadelphia utility average. Next let’s insert our MAR_InterDivFree system. TradersManagement© 2014 All Rights Reserved
Page6
After add the system we will press the Properties for All button and set the commission and slippage. We will set the properties to use a commission of $15.00 and slippage of $31.25 or 1 tick. TradersManagement© 2014 All Rights Reserved
Page7
We will now set the parameters of the system and optimize. LSB =0 means take both long and short trades Type we optimize both 0 and 1, zero is a simple momentum and 1 is price relative to a given moving average length. Next we will optimize both parameters, one for the market you’re trading and the other for the Inter‐Market. We will optimize them in the range 2‐30 step 2. Finally we have Relate set to 1; which means the Inter‐Markets are positively correlated. TradersManagement© 2014 All Rights Reserved
Page8
You can see that we have many combination making over 85K, the relationship between the thirty year treasury bond and the Philadelphia electrical utilities average is one of the best ones to use for trading and in fact I have been using it since the mid 1990’s. Let’s now take a closer look at our results. TradersManagement© 2014 All Rights Reserved
Page9
You can see that this simple system performed well. , making an averaging about 10K per year on a max close trade drawdown of $‐19,067.50 this system can be traded with an 30K account giving us a 33% annual return. These results use the continuous contract data from Trade‐Station, how the contracts are rolled do effect the results so for example if we rolled on the 26th of the month before expiration we would get different results. This is how my end of day work was done using Pinnacle data. This data can be used in Trade‐station as 3 party data. If you want to learn more how to select robust parameters you can see my Cifer Conference on Computational Intelligence for Financial Engineering & Economics 2012 paper on Inter‐Market analysis which I included in this package. TradersManagement© 2014 All Rights Reserved
Page10