Pairs Trading (statistical arbitrage)

 
Hello,

I'm trying to perform pairs trading strategy on (eurusd) and (usdchf). One requirment of pairs trading is to look at the pairs as ONE.
That is done by diving eurusd by usdchf (the ratio).

Question:
How would i go about making a new chart in metatrader that will give me a ratio between the eurusd and usdchf (eurusd/usdchf).

I was thinking of making an indicator, but my hope is have a real time chart. Is it possible to have a real time ratio chart on which i can perform technical analysis(ATR, RSI, Bollinger)?

Refences:
http://www.traderslog.com/trading-pairs.htm
 
Even if they have the greatest correlation, think that 1 pip on USDCHF ~ 0.8 pips on EURUSD. One of the methods I am trying now, is based on the charts from http://www.fxstreet.com/rates-charts/currency-charts/ I put the pairs one over another (GBPUSD and EURUSD, at least they have the same pipsize) and I saw where it is crossing. My ea choses a couple of pairs (like this), a timeframe, and looks up last (100) bars , by putting the GBPUSD chart over EURUSD. Calculates the average difference between these two, then trades them. Lot sizes are correlated. For example on the given period EURUSD moves 850 pips, while GBPUSD moves 630, and now EURUSD is above GBPUSD on chart, with a difference between them greater than average. The EA would enter SHORT EURUSD 0.06 , LONG GBPUSD 0.09 (850 pips rounds to 900). As long as these trades are open, the system reminds how the chart looked at the beginning and recalculates their position based on current values and the chart at that time. When the equivalent GBPUSD value on EURUSD chart touches EURUSD, trades are closed in profit. The EA is not ready now, I just told you what's in my mind. P.S. This is statistical arbitrage. Arbitrage is simple. See the difference, buy that, seell the other. If you can't take decision based on current data in the front of your eyes and need sophisticated indicator, it's no longer arbitrage, it's the old speculation.
 
TheEconomist:
Even if they have the greatest correlation, think that 1 pip on USDCHF ~ 0.8 pips on EURUSD. One of the methods I am trying now, is based on the charts from http://www.fxstreet.com/rates-charts/currency-charts/ I put the pairs one over another (GBPUSD and EURUSD, at least they have the same pipsize) and I saw where it is crossing. My ea choses a couple of pairs (like this), a timeframe, and looks up last (100) bars , by putting the GBPUSD chart over EURUSD. Calculates the average difference between these two, then trades them. Lot sizes are correlated. For example on the given period EURUSD moves 850 pips, while GBPUSD moves 630, and now EURUSD is above GBPUSD on chart, with a difference between them greater than average. The EA would enter SHORT EURUSD 0.06 , LONG GBPUSD 0.09 (850 pips rounds to 900). As long as these trades are open, the system reminds how the chart looked at the beginning and recalculates their position based on current values and the chart at that time. When the equivalent GBPUSD value on EURUSD chart touches EURUSD, trades are closed in profit. The EA is not ready now, I just told you what's in my mind. P.S. This is statistical arbitrage. Arbitrage is simple. See the difference, buy that, seell the other. If you can't take decision based on current data in the front of your eyes and need sophisticated indicator, it's no longer arbitrage, it's the old speculation.
For metatrader, can i make a custom chart where I chart the eurusd/usdchf ratio?
In metatrader how do I overlay two pairs together.
 
I programmed the EA to reposition the GBPUSD over EURUSD. Didn't make it graphical. You could do an overlay as an indicator, which reads GBPUSD instead of current window symbol. Look up this indicator. However, it starts overlaying from 2001 (as common point for EURUSD, GBPUSD and USDCHF). USDCHF here has reversed correlation (shows up as positive). This indicator's overlaying is NOT the one I referred in my post, but you can look over just to see how...
Files:
 
P.S. for that indicator to work, need to have daily data on all 3 contracts up to 2001. If you choose other allign moment, the graph will change, and the conclusion may vanish...
 
c0d3:
Hello,

I'm trying to perform pairs trading strategy on (eurusd) and (usdchf). One requirment of pairs trading is to look at the pairs as ONE.
That is done by diving eurusd by usdchf (the ratio).

Question:
How would i go about making a new chart in metatrader that will give me a ratio between the eurusd and usdchf (eurusd/usdchf).

I was thinking of making an indicator, but my hope is have a real time chart. Is it possible to have a real time ratio chart on which i can perform technical analysis(ATR, RSI, Bollinger)?

Refences:
http://www.traderslog.com/trading-pairs.htm


Hi,

Pairs trading is absolutely not about correlation. It's about cointegration: two elements come together, search wikipedia for it. If you've done the right statistical procedure to find a cointegrating pair, bollinger bands can work well, if used in the correct way.

 
MrH:


Hi,

Pairs trading is absolutely not about correlation. It's about cointegration: two elements come together, search wikipedia for it. If you've done the right statistical procedure to find a cointegrating pair, bollinger bands can work well, if used in the correct way.

Do better tools exist out there that will help visualize the difference in price between the two pairs?


MT4 seems to have many issues when pulling prices off of a pair that is NOT in the current window.

 
Hey guys,

Just wanted to let you know that I offer a free proprietary Pair Trading Tool that anyone can use. It was developed in Excel and converted to be available on the web. I think this is a tool that could be extremely helpful.


Let me know if you have any questions.

Phil
phil@charter-management.com
 
I offer a free proprietary Pair Trading Tool

Really!? You thread-necro a 2+ yr old thread in a coder's developer forum (where we probably like to develop our own codes versus using black box) to advertise your own proprietary product? Really!?
Reason: