Difference between revisions of "Trading Pairs Based on Inverse ETFs"

From Pair Trading Lab WIKI
Jump to: navigation, search
m (Hints & Tips)
 
(5 intermediate revisions by one user not shown)
Line 1: Line 1:
'''(this page is under construction)'''
 
 
 
Pair Trading Lab now supports trading pairs assembled of negatively correlated instruments where typically one leg is an [http://www.investopedia.com/terms/i/inverse-etf.asp inverse ETF]. You could trade these pairs with regular strategies (sometimes cointegration is manifested in these cases and backtests look good), but there is one problem with this approach - the strategy is '''no longer market neutral'''.
 
Pair Trading Lab now supports trading pairs assembled of negatively correlated instruments where typically one leg is an [http://www.investopedia.com/terms/i/inverse-etf.asp inverse ETF]. You could trade these pairs with regular strategies (sometimes cointegration is manifested in these cases and backtests look good), but there is one problem with this approach - the strategy is '''no longer market neutral'''.
  
In order to stay market neutral one has to invert signal for one leg - so typically one is either in long position for '''both legs''' or in short position for '''both legs''', unline with the regular long/short or short/long scenario.
+
In order to stay market neutral one has to invert signals for one leg - so typically the strategy is either in long position for '''both legs''' or in short position for '''both legs''', unlike with the regular long/short or short/long scenario.
 +
 
 +
For practical reasons to get meaningful signals from models, you typically also need to transform prices of one of legs (to "flip" the one of price streams). Pair Trading Lab now supports both features required. The transformation function is typically P<sub>new</sub> = A /P<sub>old</sub> + B. These coefficients don't really matter, default values are A=1000, B = 0.5. You just want to transform prices in the way the result looks like a real price and it is not too low or too high. In 99% cases you can stick with these defaults.
 +
 
 +
In backtester you have separate settings for signal inversion and transformation - you can even try to apply the inversion only or the transformation only. Feel free to experiment. Some pairs work the best if you invert the same leg you transform, other pairs work better if you invert the other leg.
 +
 
 +
== Inverted Strategies in Analyzer: Even & Odd ==
 +
While analyzing a pair, the engine now backtests inverted strategies with transformed prices too. It always transforms the first leg. Then it backtests strategies with the first leg inverted. These strategies are marked as '''even'''. Then it backtests strategies with the second leg inverted. These strategies are marked as '''odd'''. Feel free to experiment with analyzing and backtesting bunch of strategies and look what results you get.
  
For practical reasons to get meaningful signals from models, you typically also need to transform prices of one of the leg (to "flip" prices). Pair Trading Lab now supports both features required. The transformation function is typically P<sub>new</sub> = A /P<sub>old</sub> + B. These coefficients don't really matter, default values are A=1000, B = 0.5. You just want to transform prices in the way the result looks like a real price and it is not too low or too high. In 99% cases you can stick with these defaults.
+
Hint: you can use the pair database to get list of pairs manifesting negative correlation.
  
Now some example: This is a pair EUM/EWH assembled from regular ETF and an inverse ETF: https://www.pairtradinglab.com/analyses/VrSMQuM8pGcteuiH.
+
== Example Pair: EUM/EWH ==
 +
Now some example: Let's present EUM/EWH pair assembled from regular ETF and an inverse ETF: https://www.pairtradinglab.com/analyses/VrSMQuM8pGcteuiH.
  
 
You can see prices manifesting negative correlation and &beta; coefficient is negative:
 
You can see prices manifesting negative correlation and &beta; coefficient is negative:
Line 21: Line 27:
  
 
You can see quite stable performance for many years. Look at the price transformation:
 
You can see quite stable performance for many years. Look at the price transformation:
[[File:Eum-ewh-transformation.png|center]]
+
[[File:Eum-ewh-transformation.png|center|frame|EUR/EWH price transformation P<sub>new</sub> = 1000 / P<sub>old</sub> + 0.1]]
 
You can notice how the price transformation created a virtual instrument leading to positive correlation in the pair. Now see how this combo is being traded with long/long or short/short positions:
 
You can notice how the price transformation created a virtual instrument leading to positive correlation in the pair. Now see how this combo is being traded with long/long or short/short positions:
 +
[[File:Eum-ewh-trade-log.png|center|frame|EUR/EWH trade log]]
 +
== Hints & Tips ==
 +
By using inverted strategies with transformed prices you can also achieve mean-reversion pairs trading '''without using real short positions whatsoever'''. Example here:
 +
https://www.pairtradinglab.com/backtests/Vrdh5bxv5LE53pQz

Latest revision as of 15:28, 7 February 2016

Pair Trading Lab now supports trading pairs assembled of negatively correlated instruments where typically one leg is an inverse ETF. You could trade these pairs with regular strategies (sometimes cointegration is manifested in these cases and backtests look good), but there is one problem with this approach - the strategy is no longer market neutral.

In order to stay market neutral one has to invert signals for one leg - so typically the strategy is either in long position for both legs or in short position for both legs, unlike with the regular long/short or short/long scenario.

For practical reasons to get meaningful signals from models, you typically also need to transform prices of one of legs (to "flip" the one of price streams). Pair Trading Lab now supports both features required. The transformation function is typically Pnew = A /Pold + B. These coefficients don't really matter, default values are A=1000, B = 0.5. You just want to transform prices in the way the result looks like a real price and it is not too low or too high. In 99% cases you can stick with these defaults.

In backtester you have separate settings for signal inversion and transformation - you can even try to apply the inversion only or the transformation only. Feel free to experiment. Some pairs work the best if you invert the same leg you transform, other pairs work better if you invert the other leg.

[edit] Inverted Strategies in Analyzer: Even & Odd

While analyzing a pair, the engine now backtests inverted strategies with transformed prices too. It always transforms the first leg. Then it backtests strategies with the first leg inverted. These strategies are marked as even. Then it backtests strategies with the second leg inverted. These strategies are marked as odd. Feel free to experiment with analyzing and backtesting bunch of strategies and look what results you get.

Hint: you can use the pair database to get list of pairs manifesting negative correlation.

[edit] Example Pair: EUM/EWH

Now some example: Let's present EUM/EWH pair assembled from regular ETF and an inverse ETF: https://www.pairtradinglab.com/analyses/VrSMQuM8pGcteuiH.

You can see prices manifesting negative correlation and β coefficient is negative:

Error creating thumbnail: Unable to save thumbnail to destination
EUM/EWH prices & correlation

For this pair you can see that regular strategies do not appear to have much success:

Error creating thumbnail: Unable to save thumbnail to destination

Now, let's try to look at inverted strategies with transformed prices:

Error creating thumbnail: Unable to save thumbnail to destination

It looks much better! Lets try to backtest one of the strategies with details: https://www.pairtradinglab.com/backtests/VrSOmXaMl8UYci6D

You can see quite stable performance for many years. Look at the price transformation:

Error creating thumbnail: Unable to save thumbnail to destination
EUR/EWH price transformation Pnew = 1000 / Pold + 0.1

You can notice how the price transformation created a virtual instrument leading to positive correlation in the pair. Now see how this combo is being traded with long/long or short/short positions:

Error creating thumbnail: Unable to save thumbnail to destination
EUR/EWH trade log

[edit] Hints & Tips

By using inverted strategies with transformed prices you can also achieve mean-reversion pairs trading without using real short positions whatsoever. Example here: https://www.pairtradinglab.com/backtests/Vrdh5bxv5LE53pQz

Personal tools
Namespaces

Variants
Actions
Navigation
Toolbox