hi,
do you have any example (in python or in detailed explanation) on how to calculate the return of a portfolio when applying cointegration between two pairs that have different quote currency (let's say Q1 and Q2) and the account currency is different (let's call it Q3) from the two quote currencies being traded.
thanks
Raimondo
Suppose you have 10000 long positions on EUR/USD. The current EUR/USD rate is 1.1089. If the price moves from 1.1089 to 1.1099, which is 10 pips, then for a 10000 EUR/USD long position, you will get a profit of 0.0010 *10000= $100. For a short position, if the price moves up, it will be a loss. To convert this P&L into EUR, you have to divide the P&L by the EUR/USD rate.
As a general rule, the P&L will be denominated in the quote currency, so if it's not in your account currency, you will have to convert it into account currency as illustrated in above example.
Thanks for the answer
Just to be on the safe side let me give you an example to see if I understood it correctly when working with Currencies and Cointegration
Suppose I'm testing with CADF/Johansen test two pairs: USD/CHF and GBP/JPY that are likely to cointegrate for some fundamental reason and my currency trading account is Euro.
- In order for the CADF/Johansen to to make sense (i.e. calculate the correct hedge ratio) I need to have my pairs in the same Quote currency where the Quote currency is the denominator of the pair (Base currency)/(Quote Currency).
Since my account is in Euro for USD/CHF I use the CHF/EUR quote getting in the end the synthetic ratio USD/EUR.
For GBP/JPY I use the quote JPY/EUR getting in the end the synthetic pair: GBP/EUR.
- Now since both my pairs have the same quote currency (i.e. EUR) I can apply the CADF/Johansen test to these modified pairs to get the correct hedge ratio. Let's suppose beta = 2:
beta is the hedge ratio of this formula:
spread = synthetic(USD/CHF) - beta* synthetic(GBP/JPY )
- If conditions for the spread (not important for this discussion) are met I open a position. Suppose:
- go LONG on USD/CHF
- go SHORT on GBP/JPY
4) If I want to long 1 lot of USD/CHF I need to short 2 lots of GBP/JPY.
In this case I open a position in the original pairs not the synthetic ones even if the test was run on the synthetic version of them (their purpose was only to calculate the correct hedge ratio for the original pairs)
Is this the correct way of proceeding or am I missing something?
thanks again
Raimondo
Co-integration is a statistical tool to estimate long term co-dependency of two time-series. For conintegration in Forex, think in terms of currencies rather than currency-pairs. Typically USD is considered the basis for conintegration analysis as most currencies are quoted against USD. You can use EUR instead of USD, but make sure the resulting instruments are tradeable to capture reality. So for your case you should test if CHF and GBP (or CHF and JPY) are conintegrated or not (using CHF/USD vs. GBP/USD in the first case for example). In such cases, even if your account is in a third currency (say euro) you are good to use the standard method of calculating hedge ratios. Only ff you want to model your trade account (pnl evolution or risks), you will need to consider the account currency as well in such cases. For more information on the later, google change of numeraire.
Testing conintegration in currency pairs does not make much sense. In your example, you effectively end up testing if USD and GBP currencies are cointegrated (using EUR as the common currency). The original pairs does not matter.
completely agree on what you stated.
In my case I will end up testing the cointegration of USD and GBP currency pair and so It will be required to open a position on USD and GBP. However, I cannot trade currency spot (they are not available through my broker) I can only trade currency pairs through CFD (Contract for Difference).
Furthermore, in the book 'Algorithmic Trading' by Ernst Chan, from which the course I attended here is derived (Mean Reversion Strategy), there is written on page 109, to quote the author, that "even when a cross-rate is ready-made for trading, we may sometimes find it advantageous to weight two currencies differently by trading them separately". In my case they would be: USD/CHF GBP/JPY with the same quote currency (be it USD or EUR). There is also another quote of Chan on page 112: "you may sometimes find profitable opportunities trading two pairs of entirely different cross-rates against each other B1.Q1 vs. B2.Q2… "
There is no clear explanation why this is should be done since by trading the resulting pair (USD and GBP) should in theory be better (less transaction costs) than trading the two currency pairs separately.
I think that this is the only option I have if I want to use a Mean Reversion strategy on currency pairs
Only experimentation will tell if this is a profitable strategy
R