Page 14 of 134 FirstFirst ... 412131415162464114 ... LastLast
Results 131 to 140 of 1336
Like Tree265Likes

Thread: Statistical Arb/Pairs trading strategy!

  1. #131
    Richard87's Avatar
    Richard87 is online now Senior Member
    Join Date
    Aug 2011
    Location
    London
    Posts
    349
    Thanks for the in-depth explanation, Ill keep re-reading this


  2. #132
    Jedster is offline Junior Member
    Join Date
    Oct 2011
    Location
    UK
    Posts
    230
    No problem...

    Actually, as I was looking into the various ways of pairs trading, I was reading a few articles that suggest that it is very hard to pick up the short term fluctuations in the correlation. Rather than trying to quickly trade these correlation changes, we should be looking for longer term divergences.

    It certainly looks like a safer way of doing it as it is less likely that the position will move against you. It is the same strategy in principle, you wait until two well correlated instruments have diverged by 2 standard deviations, and then place the buy/sell trades.

    It is longer though, typically days/weeks, so if doing it by trading CFD's (or spreadbetting in the UK) you would probably also want to look at the financing charges and make sure the trades were also in the same direction as the interest rates (i.e. just like carry trades, etc).

    I'll look into it next week...
    Richard87 likes this.

  3. #133
    medisoft's Avatar
    medisoft is offline FX-Men Honorary Member
    Join Date
    Jan 2011
    Location
    Mexico
    Posts
    1,306
    Thanks Jedster, for your explanation.

    I'm then making this rules to have a more mathematical way to trade this.

    Choose 2 pairs that are highly correlated, with 90 % or more on W1, D1, H4, H1 and M15 (this for the first time)

    Then, everytime the H1 and M15 are above 90 % you configure the MT4 charts on Scale fix, placing the max and min based on current price +/- 1 daily ATR or about 10 times the standard deviation (of 1 day of minutes, in 1 minute time frame, or 1440 minutes) of trading time frame (1 minute view for me). That should keep the price inside the chart for at least that day.

    Because the price is very well correlated at the time of picking the scale fix, you will see very correlated lines at the center of the charts.

    When the prices diverge for about 1 or two standard deviations (in EU/GU 1 deviation on 1 minute view is about 20 pips), you follow Kelton's indications.

    Because the scale don't change over time, when price converge again, you will be winning.

    For lot size, I use a percent of my account. If I want to win 2 % of my account on a spread of 20 pips, I calculate the lot size to win that percent if it moves 20 pips, on both pairs. If I had 1000 USD, and want to win 2 % of the account on a move of 20 pips (20 USD), then I size my trade so each pip is 1 dollar. That is about 0.1 full lots on EU and GU. So, if the spread between EU/GU is 20 pips, I place a trade like Kelton says, and when they touches again, I will win 20 pips, maybe 10 on EU and 10 on GU, maybe another combination.

    After that, I go again to move the scale fix when the correlation on m15 and h1 is above 90 %. I need to wait until this to start with a highly correlated chart.

    So far, this is working good. This generated about 4 trades tonight, all winners, winning about 2 % on each one, on a demo account.

  4. #134
    Jedster is offline Junior Member
    Join Date
    Oct 2011
    Location
    UK
    Posts
    230
    Quote Originally Posted by medisoft View Post
    Thanks Jedster, for your explanation.

    I'm then making this rules to have a more mathematical way to trade this.

    Choose 2 pairs that are highly correlated, with 90 % or more on W1, D1, H4, H1 and M15 (this for the first time)

    Then, everytime the H1 and M15 are above 90 % you configure the MT4 charts on Scale fix, placing the max and min based on current price +/- 1 daily ATR or about 10 times the standard deviation (of 1 day of minutes, in 1 minute time frame, or 1440 minutes) of trading time frame (1 minute view for me). That should keep the price inside the chart for at least that day.
    Yes, I definitely agree that there should be a clear way to determine when a pair is correlated and when it moves away from the correlation so that it can be traded.

    There is another way to measure correlation divergence and that is to work on the ratio from one instrument to another. That is, you simply divide one instrument value by the other and this gives the ratio beween them. This was what I was talking about in previous posts. If this ratio was plotted on a chart, it would show how much variance there has been in the correlation between 2 instruments. Using this as a meausre it is relatively easy to see when the correlation has diverged and thus when to trade.

    Quote Originally Posted by medisoft View Post

    When the prices diverge for about 1 or two standard deviations (in EU/GU 1 deviation on 1 minute view is about 20 pips), you follow Kelton's indications.
    Again, agreed, we are looking for some statistical measure of how much 2 instruments have diverged. Any consistent method should be sufficient. Interestingly, it turns out another good way to do this is to look at the standard deviation of this ratio that I mentioned above.

    Quote Originally Posted by medisoft View Post

    For lot size, I use a percent of my account. If I want to win 2 % of my account on a spread of 20 pips, I calculate the lot size to win that percent if it moves 20 pips, on both pairs. If I had 1000 USD, and want to win 2 % of the account on a move of 20 pips (20 USD), then I size my trade so each pip is 1 dollar. That is about 0.1 full lots on EU and GU. So, if the spread between EU/GU is 20 pips, I place a trade like Kelton says, and when they touches again, I will win 20 pips, maybe 10 on EU and 10 on GU, maybe another combination.
    That is a clear way to set a profit target, which is good, but if your profit level based around 2% what and how are you setting your stop loss/exit strategy ? This leads onto a second part/question...

    You are opening trades when the pair diverge by 2 standard deviations, which you say is about 20 pips, but if the pair regularly diverge by (say) 50 pips, then you could potentially be setting yourself up for a loss (or certainly a period where your positions are sitting at a loss...) It would appear to me that the GU and EU regularly diverge by this amount, so we need to make sure we are not over exposed...

    Quote Originally Posted by medisoft View Post

    So far, this is working good. This generated about 4 trades tonight, all winners, winning about 2 % on each one, on a demo account.
    So far I have only have a few trades and they have all been profitible, but that is because I basically left them open until the prices came back together. I don't know yet if that is a viable long term strategy.

  5. #135
    chamane is offline Newbie
    Join Date
    May 2008
    Posts
    33
    "...What I do is wait untill something upsets the two currency pairs
    that makes them fall out of correlation. Then I buy the underperforming currency and short
    sell the over performing currency at the same time and the same lot size. Eventually these
    currencies will go back to their normal path and touch again. I then close both orders and have
    now profited the distance between the two when I opened the orders..."


    I have two questions. Is it 100% sure that the pairs will go to their normal path and touch again? What if a gap starts off and is maintained forever? The correlation can still be high afterwards and after a while, the chart will make the overlay perfect because the gap will be out of sight.

    Also, has anyone tried indicators? On another forum, someone suggested to use Bollinger bands on the resulting pair. For instance, if price on EURGBP touches the upper BB, it would be time to sell EURUSD and buy GBPUSD.

    Thanks for answering.

    Read more: Statistical Arb/Pairs trading strategy!

  6. #136
    FXEZ's Avatar
    FXEZ is offline Junior Member
    Join Date
    May 2011
    Posts
    132

    Default Long GU, Short EU is not equal to EG!

    Quote Originally Posted by Jedster View Post
    I like that...

    All currencies are pairs, so you are always buying something and selling something else. There are always 3 currencies involved in the "currency triangle"
    So
    Buy 1 GU means you are long 1 GBP and short 1 USD
    Sell 1 EU means you are short 1 EUR and are long 1 USD

    This means you are 1 USD short and 1 USD long, so are net USD flat, and thus have no exposure to the USD.

    That leaves you with the 1 GBP that you bought and the 1 EUR that you sold, so you are net short 1 EURGBP (or net long 1 GBPEUR).
    This is a point that is often raised (long GU, short EU = short EG), but when you get down into the nitty gritty of the calculations there remains some residual USD. While it is true that when you trade equal amounts of GU long and EU short, the GBP and EUR positions offset. However, a small exposure to USD remains due to the price differences between EU and GU. If the prices of the two instruments (EU and GU) were identical then yes, the USD component would completely cancel out and long GU short EU would be equal to EG. However as per this example:

    Long 10,000 GU @ 1.601
    Short 10,000 EU @ 1.334

    To calculate the USD portion of the GU position take 10,000 * 1.601 = 16,010 USD short.
    For EU the equation is 10,000 * 1.334 = 13,340 USD long. Taking the difference you are still left with a residual USD position of $2670 short. This is true because you must borrow more USD to finance your GBP purchase (due to the higher price) than you must borrow to finance your EUR sale.

    The USD portion is smaller so it will have less influence on the P&L than the EUR or the GBP, but there will be some influence from USD moves.
    medisoft likes this.

  7. #137
    Jedster is offline Junior Member
    Join Date
    Oct 2011
    Location
    UK
    Posts
    230
    Quote Originally Posted by FXEZ View Post
    This is a point that is often raised (long GU, short EU = short EG), but when you get down into the nitty gritty of the calculations there remains some residual USD. While it is true that when you trade equal amounts of GU long and EU short, the GBP and EUR positions offset. However, a small exposure to USD remains due to the price differences between EU and GU. If the prices of the two instruments (EU and GU) were identical then yes, the USD component would completely cancel out and long GU short EU would be equal to EG. However as per this example:

    Long 10,000 GU @ 1.601
    Short 10,000 EU @ 1.334

    To calculate the USD portion of the GU position take 10,000 * 1.601 = 16,010 USD short.
    For EU the equation is 10,000 * 1.334 = 13,340 USD long. Taking the difference you are still left with a residual USD position of $2670 short. This is true because you must borrow more USD to finance your GBP purchase (due to the higher price) than you must borrow to finance your EUR sale.

    The USD portion is smaller so it will have less influence on the P&L than the EUR or the GBP, but there will be some influence from USD moves.
    Firstly, what I wa talking about was theoritical to explain the principle. On a practical basis, yes you are correct there are minor exposures, but it shouldn't be anywhere as big as in the example you were using. If it were, then people would be trading it and the broker would be losing money hand over fist.

    I wrote down 3 prices a few days ago:
    GU 1.5901
    EU 1.3297
    EG 0.8362

    If you do GU * EG = 1.5901 * 0.8362 = 1.32964 which is 0.00006 different from the quoted EU price.
    So the three currencies are in (almost) perfect balance. Note that this 0.00006 difference was because the prices were only to 4dp, if I had written down the numbers to 5dp, it would have probably been even closer.

    The reason you are seeing that exposure I suspect is due to your brokers pricing/spread. If you do the calculations ignoring spread, the exposure would be literally a few points, relating to how the broker has updated their prices at that time.

    If it isn't, it would mean the broker was losing money....and that is an entirely separate strategy. If you were quick enough, it would be possible to take advantage of where the broker has been unable to update their price in a quick moving or highly volatile market. However the spreads would have to be very tight for that to work, literally 1 or 2 points (not pips but 1/10th pip). On a practical basis, there are no brokers that quote in the retail market with spreads that tight. Well, not that I know of anyway...
    medisoft likes this.

  8. #138
    medisoft's Avatar
    medisoft is offline FX-Men Honorary Member
    Join Date
    Jan 2011
    Location
    Mexico
    Posts
    1,306
    I'm designing a strategy to trade this technique.

    I think that when placing an order, to be best balanced, i need to check the average moves of both pairs.

    Let say, that I'm going to trade EU and GU. I measure the average move on a daily basis on both, having EU move 123 pips and GU 100pips (an example! hehehe)

    I want to win 2 % of my account on a spread between EU and GU of 20 pips, but at the same time I want to have a trade that is near to perfect neutral trade.

    If I place 1 lot on GU and 1 lot on EU, the trade will be unbalanced, because if I use the average move of both, when GU moves 10 pips, the EU could be moved 12.3 pips, and because the pip value is the same, that means that the trade becomes unbalanced for 2.3 pips. So I need to redistribute the lot size acording to this average move.

    I'm going to trade 2 lots, and I know that there is a proportion of EU/GU of 1.23, I then use this formula

    1-(ATR pair 1)/((ATR pair1)+(ATR pair2)) to get the percent of that 2 lots for each pair.

    I want to get the volume for EU, so I use (1-123/(123+100))=44.84 % of the 2 lots, so the total size for EU should be .8968 lots, and for GU it should be 1.1032 lots, and that should make that a move of 10 pips on GU is equal in price for a move of 12.3 pips on EU, making a more balanced and neutral position.

    This is just an idea, and I'm going to test it on this week. What do you think about it?

  9. #139
    Jedster is offline Junior Member
    Join Date
    Oct 2011
    Location
    UK
    Posts
    230
    Quote Originally Posted by chamane View Post
    [I]

    I have two questions. Is it 100% sure that the pairs will go to their normal path and touch again? What if a gap starts off and is maintained forever? The correlation can still be high afterwards and after a while, the chart will make the overlay perfect because the gap will be out of sight.
    No it is absolutely not 100%. The big question is, when is the change due to a genuine correlation divergence, and when is it due to an actual change in the value between two instruments. All you can do is look at the history of two correlated instruments and see how often they diverge and by how much. You can then decide that when you see a 20 pip divergence, you'll trade it, or that you'll wait because quite often it goes to 40 pips, or 70, or 100... Looking at the history is very revealing and very important in order to help you form your plan as to when to enter, and when to exit.

    Quote Originally Posted by chamane View Post
    [I]
    Also, has anyone tried indicators? On another forum, someone suggested to use Bollinger bands on the resulting pair. For instance, if price on EURGBP touches the upper BB, it would be time to sell EURUSD and buy GBPUSD.
    In some respect that does make sense. Bollinger bands show 2 standard deviations away from the mean, and that is often regarded as a good point to enter the market. However, you are not trading one instrument, you are trading the divergence between 2 and I am not sure how you would see that using standard bollinger band I think you would have to write a custom indicator specifically to do that...

  10. #140
    Jedster is offline Junior Member
    Join Date
    Oct 2011
    Location
    UK
    Posts
    230
    Quote Originally Posted by medisoft View Post
    I'm designing a strategy to trade this technique.
    Do you mean you are designing a strategy to trade the imbalance between a brokers prices on a triangle of currencies, such as the GU/EU/EG ?

    If so, I am interested in that so I suggest you start a new thread and get a discussion going, separate to this thread. I looked extensively into trying to trade the imbalance. I wrote an EA to automatically detect it and trade it. Theoretically it is possible, and it definitely works, but in practise it can only work if your broker has really tight spreads. If your broker has spreads something like 1 or 2 pips, then that is wide enough that you only get 1 trade every blue moon. You need really tight spreads in order for this to work, so something like 0.5 pip max.

    Quote Originally Posted by medisoft View Post

    I think that when placing an order, to be best balanced, i need to check the average moves of both pairs.
    Yes, I agree with that. We need to look historically and see what is a typical move/divergence for the instruments.

    Quote Originally Posted by medisoft View Post

    Let say, that I'm going to trade EU and GU. I measure the average move on a daily basis on both, having EU move 123 pips and GU 100pips (an example! hehehe)

    I want to win 2 % of my account on a spread between EU and GU of 20 pips, but at the same time I want to have a trade that is near to perfect neutral trade.

    If I place 1 lot on GU and 1 lot on EU, the trade will be unbalanced, because if I use the average move of both, when GU moves 10 pips, the EU could be moved 12.3 pips, and because the pip value is the same, that means that the trade becomes unbalanced for 2.3 pips. So I need to redistribute the lot size acording to this average move.
    Nope.

    I've been thinking for quite some time how to explain this clearly, and I am obviously struggling. I know what I know, but trying to get it written down is really hard...I was talking with a trader friend this evening in the pub and we were speaking about this very point. I will try to explain and I'll start by saying, I think the issue gets confusing because the EU and the GU trade very close together.

    That is, the EU is trading at 1.30 and the GU at 1.60, so they appear to be comparable. You would think that a 10 pip move in one is the same as a 10 pip move in the other, but that is not true. They are only comparable if you convert one into the terms of the other. I posted earlier about this using the example of cars, but instead of that, try to see each instrument denominated in it own unit. I'll try to describe this. Lets say the GBPUSD is denominated in units of GU. The EURUSD is denominated in units of EU. EU and GU units are not the same. They look very similar, they are close to each other and they are related to each other, but they are not the same. So, a 10 pip move in GU units is not the same "value" as a 10 pip move in EU units. However, using your example, a 10 pip move in GU units IS the same value as a 12.3 move in EU units. It is all relative....

    A better pair to explain this with is the Dow and S&P. They are approximately 10 times apart (the dow is 13000 and the S&P is 1400). You can't get mixed up talking about these. A 10 point move in the dow in real terms, approximately equates to a 1 point move in the S&P, but you still trade 1 lot in each. You don't trade 10 lots in the S&P because it is only moving 1 point compared to the 10 point move in the Dow. Same thing with the EU and the GU, it is just that the EU and GU are actually much closer together, so the distinction is harder to see.


    Quote Originally Posted by medisoft View Post
    I'm going to trade 2 lots, and I know that there is a proportion of EU/GU of 1.23, I then use this formula

    1-(ATR pair 1)/((ATR pair1)+(ATR pair2)) to get the percent of that 2 lots for each pair.

    I want to get the volume for EU, so I use (1-123/(123+100))=44.84 % of the 2 lots, so the total size for EU should be .8968 lots, and for GU it should be 1.1032 lots, and that should make that a move of 10 pips on GU is equal in price for a move of 12.3 pips on EU, making a more balanced and neutral position.
    Um, ok, you've got me I am completely lost...

    The ATR is a measure of volatility, why is it relevent in determining how far two correlated instruments have diverged? All it is telling you is that one instrument is more or less volatile than another, it is not an indication of how they are correlated.

    How about you rework your example using the hypothetical dow and S&P:

    The dow trades at 14000, the S&P trades at 1400. Lets ignore spreads here as it is hypothetical...

    A typical daily range for the dow is 150 points, and also 150 pips because the precision of the dow is to 1.
    A typical daily range for the S&P is 12 points which is around 120 pips because the precision of the S&P is to 0.1.

    1 lot for the dow is 10 points (10 pips).
    1 lot for the S&P is 1 point (10 pips).

    The two are highly correlated, so if the dow moves to 14050, the S&P typically moves to 1405.

    Lets say our dow now moves 20 points up, but the S&P stays flat. You see this divergence, what do you trade?

    I'll tell you what I will do. I will sell 1 dow and buy 1 S&P.

    If the S&P stays where it is, and the dow moves back to where it was, I close my positions at +20pips.

    If the dow stays where it is, and the S&P rises to join the dow, I only need the S&P to rise 2 points and I have also made +20pips.

    If the dow drops 10 points and the S&P rise 1 point, again I close my positions as I am +20pips.

    I thinks that is all the information needed, so, what would you trade an why?
    Last edited by Jedster; 03-31-2012 at 07:28 PM. Reason: Crikey - it took me an hour and a half to write that post, and I still had typos...

Similar Threads

  1. Opinions on this News Trading Strategy
    By dpaterso in forum Newbie Island
    Replies: 4
    Last Post: 05-25-2012, 08:08 PM
  2. "haba" Trading Strategy
    By haba in forum Free Forex Trading Systems
    Replies: 6
    Last Post: 11-29-2011, 06:45 AM
  3. Free Forex Trading Strategy
    By ForexPro7 in forum Free Forex Trading Systems
    Replies: 5
    Last Post: 12-20-2007, 10:11 AM
  4. How to backtest a trading strategy?
    By lilax in forum Newbie Island
    Replies: 2
    Last Post: 09-09-2007, 05:10 PM
  5. forex trading strategy
    By alhaimy in forum Show me the money! [Daytrading]
    Replies: 5
    Last Post: 08-04-2007, 11:26 PM

Tags for this Thread

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
"You will become as small as your controlling desire; as great as your dominant aspiration."
James Allen