Pairs Trading

Discussion in 'Trading' started by jcstylin, Apr 12, 2007.

  1. Could you talk about what allowed you to scale up to such a large automated trading platform?

    In other words, as a trader for 13 years there must of been an "edge" that you have either carried forward as a sole cornerstone or adapted to the markets for your system.

    Anyways, congratulations on your system and the innumerable benefits of hard work. You are also an example of not listening to the crowd as they talk about opportunities that no longer exist or are simply told that it is impossible and not profitable to pursue in the trading world.
    #61     Apr 14, 2007
  2. fvmn


    Everything what HoundDogOne seems to be right.. But exaggerated a bit ;)

    I almost finished my pairs trading system. And I would say my advanced-amateur level in programming and beginner level in trading was enough. However the biggest problem was that I had to deal with 3 different programming languages simultaneously (pascal-like Wealth-Lab scripting, C# for core programming and MatLab for some advanced math). And two different APIs.. But still it does not require you to be professional (I mean “PROFESSIONAL!”).
    #62     Apr 15, 2007
  3. There are no exceptions...
    or you will *****FAIL******
    #63     Apr 15, 2007
  4. Midas


    Quote from gkishot:

    Does anyone know of a good free software for charting pair spreads?

    Free pair chart. The symbol should be entered with a : separating the 2 securities. Example BAC:C

    I do not think this will give you intraday but it is a good start. Good luck.:cool:
    #64     Apr 15, 2007
  5. segv


    Why do you always break your sentences up this way...
    It really does not make make you sound very smart.

    It is almost like you are trying to write lyrics...
    But somewhere in the middle you lost the poetic spark.

    It is pretty easy to understand that a diversified pairs strategy is really just short gamma, short vega, long correlation. It should also be pretty easy to understand that regressing the universe of highly liquid stocks to find the subset with a stationary residual is a pretty easy problem to solve. That ease of implementation is precisely why these analytics are worthless. That in turn is the reason that Don Bright cannot find a stable hedge ratio or time-frame for his pairs strategy. Before any sheep here go spending money with PairCo or some other vendor, I posted the 200 lines of C# (SmartQuant) code for creating a pairs basket based on Vidamurthy's "Distance Vector" on my web site. As to the other poster, who required 70,000 lines of code to create a basket tracking system, all I can say is "wow". You can tweak the parameters and horizons in my code to pick different baskets all day. Alternatively, you could just take my word for it that this area has been fully exploited already, and that those touting this as a high-alpha strategy probably have an agenda.
    #65     Apr 15, 2007
  6. <i>Always on the cutting edge, here's an article i did with Darren Clifford several years ago, it will shed some light on "pair trading" for those new to the concept:</i>

    Dave: Hi my name is Dave G. I am executive producer at Real World Today I am joined by professional trader Darren Clifford. Darren came to us with very high recommendations from expert trader and industry icon, Don Bright. Don explains that Darren is on the cutting edge of daytrading methods and techniques. Let’s get started. How are you today, Darren?

    Darren: I’m doing great, thank you for having me Dave.

    Dave: Why don’t we start out by learning a bit about yourself and what started you in the market. Your basic evolution as a trader to where you are now.

    Darren: Sure, it would be my pleasure. I started in the market about two and half years ago. I graduated with a masters degree in economics. I specialized in financial mathematical modeling.. I didn’t even know that this career existed and that you can be a professional trader. On the recommendation of a friend, I went to check out what they were doing over at Bright Trading . Once I saw it, I called them up and began my career. I had to start like a lot of traders, by borrowing money from family to get involved with trading. I started with $5000 as a sponsored trader. I lost that couple of times before I became consistent and successful.

    Dave: Did you start out as a discretionary trader, or did you follow Bright guidelines at the beginning.

    Darren: I was very fortunate to start in the office in Langley, British Columbia. Rob Friesen, the office manager, a great experienced trader himself does a lot of trading with a specific trading strategy called, Pair Trading. I was able to sit, learning from him to soak up his knowledge, in my first couple of months on the job. That really helped, so I wasn’t necessarily on my own. From there I have gone on to be more established and take in more trading strategies that they teach at Bright. Bob Bright is now my mentor, a person whom I trust and keep in contact with in my trading.

    Dave: I know Bob has quite a reputation on the street. He is known as being one of the smartest guys out there in the business of daytrading. You mentioned Pair Trading. What exactly is Pair Trading?

    Darren: Pair Trading is when you are trading from a hedged position. I would be looking at two correlated stocks like Coke and Pepsi. I may buy one, and short the other to play the price differential between the two. This allows the trade to be a lot more stable and a lot more predictable. There are a lot of old school traders who crave and love volatility and they just wish the markets would move again. As a professional trader, I don’t care a bit about volatility, I care about predictability. Even if something is highly predictable in small patterns, I can trade it in a lot bigger size to make my money out of it. If something is moving all over the place, yet I can’t predict where it is moving, it is going to be trouble and I can be losing a lot of money.

    Dave: What do you look for when you are setting up a pair trade?

    Darren: The first place I will look is intuition. You can go through the NYSE and you may see two companies like Citibank and Harley Davidson. They are both highly correlated with each other. Statistically this may be true, but intuitively give me a justification why Citibank and Harley Davidson are correlated.

    Dave: Would there be a justification? To me there wouldn’t be any at all. Perhaps when people are happy they buy Harley’s and charge up their Citibank credit cards. Other than that, I can see no correlation.

    Darren: They are both stocks on the NYSE. They both react to the market but that is where the correlation ends. Because of that, intuitive reason is not there. It is something I would say. Though statistically you may be able to come up with a great model for these two stocks to trade against each other. Intuitively it does not work. The place that we really look would be for Citibank is JP Morgan, Bank One, maybe Bank of America., for Coke, Pepsi.
    #66     Apr 15, 2007
  7. Dave: Let’s take the Coke and Pepsi example. What is the next step after you find a pair that is intuitively correct.

    Darren: So now you come up with a pair that is intuitive and it makes common sense. The next step is looking at exactly how they trade with each other. Traditionally, when you have a sector like Coke and Pepsi, there isn’t anyone else. There really is only two of them. What you see is that some companies like this don’t trade as correlated as you expect. This is due to the money that may flow out of one company is actually flowing into the other one. Yes, we may like the soft drink industry, but right now we favor Pepsi more than we favor Coke; or now we favor Coke more than Pepsi. You can actually see anti-correlated movement even though they are in the same sector. After we have gone through the intuitive basis we take a look at statistically and historically how they traded.

    Dave: You do this using technical analysis? You put the pair on a chart?

    Darren: Absolutely, we put them on charts and take a look at the correlation between the two stocks. We see if they have traded within a range or some sort of pattern with each other. The big test is when you see news events happened with one of your stocks, and how the stock behaves. For example, you are looking for something that says, ‘Coke moved up $4 this morning, did Pepsi move too?" " Did Pepsi move at least $2?" You are looking for a real sign that you have a knowledge based industry, meaning that company sympathy is actually going to occur. When people see coke rally they figure they should buy Pepsi.

    Dave: Now specifically, when you set up the chart, is it a daily chart?

    Darren: Well, as professional trader you have to appreciate that I trade every time frame. From short, short term to longer term.

    Dave: When you say short term do you mean a tick chart?

    Darren: Everything from a tick chart, a one minute bar chart, all the way up to a daily, or even a weekly chart. As a professional, I take advantage of every edge that is available to me. This means I may be holding a smaller position for a long time trying to get $5-6, as an investment out of it, or I may be taking a larger position for a shorter amount, trying to take 5-6 cents out of it. For each one of those trades I need to have a justification for my entrance, and I need to make sure I am looking at the appropriate time frame that I am analyzing for actually making that trade.

    Dave: Let’s talk about the difference between trading and analysis. When you are performing the analysis on a stock pair, is there a specific time frame that you use?

    Darren: I will look at everything from the last 1000 days that it has traded on down. You are almost talking about 5 years there, anywhere down to the last couple of minutes. I prefer to take a look at, on the technical aspect of it, most of my trades intra day, then the last 20 days of data.

    Dave: What type of chart do you use?

    Darren: Generally a candlestick chart with a moving average and some Bollinger Bands.

    Dave: I know you trade with a theory that tries to develop each pair as an individual business model. Please elaborate a little on this idea.

    Darren: This is something that should apply to all trading strategies regardless of if you are pair trading, momentum trading or something else. Every time you approach the market, you are an independent business person. This is your job, this is your company, you are a trader. As you know, every company before it starts has a business plan.

    Dave: Ok, so this is what you mean when you treat each pair as an individual business? The trade itself has its own plan.

    Darren: Absolutely, even the small scalp have a plan. They are just like micro-business. This is the place where I take profits, this is where I exit, this is where I take a loss. Everything has a known entry and exit before I even begin. This way I am trying to take the emotion out of it.

    Dave: Is this a written plan, or is it something you do mentally?

    Darren: For my new traders, absolutely it is written. Even their small trades I have them write down where they are planning to enter and exit. For the shorter term trades, the less likely I am to write it down. But for the longer term trades, everything is written down.

    Dave: The other word for pair trading is statistical arbitrage. Does that refer to a reversion to the mean type strategy?

    Darren: Well, within a pair, you have to appreciate that there is actually a reversion that should occur. The natural way that free market economics works is that you should have a leader in every sector who has all the technologies, then these technologies being adopted by the secondary companies in the sector. You constantly see one company taking advantage of new technology, and taking a lead with their stock price. The other companies within that sector adapt to the new technology and catch up with the leader.
    #67     Apr 15, 2007
  8. Dave: Like a follow the leader idea?

    Darren: Absolutely, it’s free market economics at work. You get a new technology that assists them, then it comes back to equilibrium, or at least starts reverting back. This is something that does not actually occur within the individual stocks. Mathematical modeling of the stock market as a whole, is said to be a random walk. While there is an upward drift to it. The idea is that we are going to go up in time but there is no reason that since the market rallied up 1000 points in the Dow that we should actually see it come back down. Within a pair, there is a reason that says when one company rallies $20 ahead of another company they will go back into line. Here is one reason why, the other company is going to take a look at what their peer is doing, adopt the successful technologies to catch up.

    Dave: Let’s say we are following a pair that has had very strong correlation within the last 20 days, I am just using this as an example. That all of a sudden they veer off. Lets say Coke starts going up, and Pepsi starts going down. In a situation like that would you then short the stock that is going up and buy the stock that is going down, betting that they are going to come back into correlation? Or does it all depend?

    Darren: There are exceptions to every rule, but on average my trading strategy tends to be contrarian. I am fading moves so I’ll take the opposite side in this case. If Coke pulls back like it has, which has happened in the last couple of months, I am buying Coke and selling Pepsi. I am expecting it to revert back to a mean between the two companies.

    Dave: You guys take pair trading to what seems to be the next level. You go beyond the simple pair into 3, 4 and even 6 way trades. Can you explain?

    Darren: One of the most profitable strategies we have is trading one company against a second company. Going into a sector like oil where there are an assortment of similar companies that do similar things. Then you start looking at them and ranking them fundamentally, and technically. I then get myself a list of these companies I want to buy, and those companies that I want to short.. What this allows me to do is take a position in a basket going long and take a position in a basket going short. Say you have maybe $500,000 in capital, as a new trader. Then be able to transfer the risk based on which one is actually performing well and which one is not. It allows you to move in and out of the different stocks between all six of them. You can capture within the basis of the relationship the predictability that is there, but you are getting more volatility to capture bigger moves and more of the moves.

    Dave: Ok I see, you are limited to your capital as to how many stocks you can do this with across a sector?

    Darren: Absolutely

    Dave: How many different stocks have you ever traded at one time, using this method? Have you gone as far as almost creating a small index?

    Darren: Probably the biggest I have done is a 5-way pair. Two companies long, two companies short, and one company as neutral as the middle, where I either long or short it. It allows you to play all five against one another. If one really rallies, you are able to sell another and buy more of that and are able to hedge it. It really works out well for me.

    Dave: I know you said earlier that volatility doesn’t really matter to you, but is there any way you can play these pairs as a momentum trader would?

    Darren: Well you can always trend trade a pair. You can setup your pair just like you would an individual stock. The type of thing you are looking for is higher highs and lower lows, buying on pullbacks. You can even do traditional technical analysis, things like MACD, and RSI, put them on the pair themselves. Now with doing this you can actually look at everything a regular trend trader would be looking for. I want my long stock to have increased volume on its up days, buying that to continue more of the trend, and hedging that off with some other stock that you want to go in short that is not showing momentum characteristics.

    Dave: Okay, lets get off of pair trading and get onto another one of your strategies. I know Don is really big on a strategy called "opening orders". Do you guys utilize this method?

    Darren: Absolutely, but I do have to revert back to pair trading here. One of the things that we do on our open is we use them within a pair trading context. For example, if I see an extreme open on one stock, I’ll take a look at its peers to see what its peers are doing. If I see Coke is gapping down $1, not only will I be buying Coke, but I am going to sell Pepsi against it.
    #68     Apr 15, 2007
  9. Dave: For our members that may not know anything about "opening orders" Please give me a brief tutorial and explain the concept.

    Darren: Basically, you are fading opening gaps on the expected price on the stocks open. You are looking at a stock like General Electric. It generally is a market performing stock and it behaves correlated to the S&P 500. You watch the futures contract of the S&P 500 in the morning to see if the futures contract is up .5%, you expect GE to be up .5%. Now if GE opens up 1.5% you are going to short it. You are going to fade that extreme open of General Electric. If GE opens down .5% you would buy it. You would say it opened below where you would expect it to in comparison to the S&P 500.

    Dave: You are placing multiple orders above and below the price? So you are basically enveloping the price?

    Darren: Basically enveloping the expected opening price. Taking a look at the morning, and we have automated programs that do it, all the way up to about one minute before the opening bell. I will look at if the S&P futures contracts have moved, and the E-minis right now, where I expect the market to open. Using that information I make an estimate of where I think my stock should open, and that is where I envelope.

    Dave: Once the order executed, do you just take it for a couple of ticks or do you take it for as long as it will go?

    Darren: To do the entry is actually a very easy thing for an experienced trader, once you get into the habit of it. The entry side is always the place where traders have difficulty. This is what being an experienced trader really means. When you do get in to a position, how you manage getting out. There are times where you just take it for a couple ticks, there are times where you pair it off, there are times where you turn around and just take a loss as soon as you can. It all depends what you see on the tape.

    Dave: How many opening orders do you throw out in the morning?

    Darren: On any given morning I may have 600 open orders out there.

    Dave: Wow, obviously this is something that is computerized?

    Darren: It all depends on the approach you are taking. Some people who just like focusing on the broad market, and focus the strategy on five different pairs and only five pairs. Everyday they do the same stocks over and over again. But they become very familiar with their stocks. While I am putting an order quite away from the expected opening price, they may be looking at putting it five cents from the expected opening price, and not get in. They become a lot more aggressive to get more fills.

    Dave: Let me see if I understand you. You place your order five cents away from the opening price and if you get filled you are betting the momentum would carry that price forward resulting in profits?

    Darren: No, not exactly, let’s say you are looking at a stock that closed at $40. You expect it to open at $40.50 the next morning because the S&P is up quite a ways. Then what I am doing is taking a price like $41, and I am shorting. At a price like $39.50 I am buying. If I get the $41 short then I expect it to come back down to that expected open price of $40.50. So in that case I have faded the gap open.

    Dave: Man, it looks to me, if you have 600 orders out there, often, when you try to fade a gap, the stock will just keep ripping. Is this the case?

    Darren: It happens more often than I would like it to happen. That is when the advantage of being an experienced trader comes in. If I see an opening price of $41 where I have sold it and I notice that, first off, going through that open is an indicator to me that it wasn’t as good as I thought it was. It should be that the opening is quite often the extreme for the day for a lot of stocks. So that should be a great trade, I should see some instant gratification there to it and if I don’t see some resistance building on that opening price and others aren’t coming in and saying ‘Wow, I missed the plane, I need to get it up here at this price,’ then it is probably better off getting out. If I do get into a position where it is running hard against me, I’ll find another stock that is sympathetic to it and I’ll buy twice as much to balance out the position and turn a profit.

    Dave: Buying the stock that is sympathetic to the one that is ripping against you. Do you have software or some sort of program to instantly locate these candidates?

    Darren: I have a quote window on my screen that tells me what all the pairs in a sector are doing. If I do hit something like Citibank, and I am struggling with that open, I can just glance at my screen. If Citibank is up a dollar, JP Morgan is up 50 cents, Bank of America is flat. Well maybe JP Morgan is moving much more sympathetically to Citibank.

    Dave: I know that you guys have software that specializes in finding gaps. Tell me a little about your gap system.

    Darren: Absolutely. If you take this strategy of enveloping that we have been doing at the open, and carry it forward into the middle of the day. In this case, what you are looking at is gaps. Traders are paid on the NYSE in one of two ways: 1. Finding inefficiency, something that is undervalued or overvalued that shouldn’t be. 2. We are trying to take on the roll of a market maker which is to provide liquidity. This is a service to the market, and over the long term you should get paid for it. What we are doing is putting envelope orders out around the last print of the stock, so that if it gaps 20 cents or 25 cents, you are providing liquidity for that gap. This strategy is something that, especially if you go back to the late 90s, early 2000 period, the way that the market was behaving, was probably one of the most successful strategies that was there for our traders. They were able to provide liquidity in situations that were trading, and if things did not work they had the other side to sympathetically use to make sure they were not getting overly hurt.

    Dave: This has been a very insightful conversation. Is there anything you would like to leave us with?

    Darren: We do offer some mentoring and training up here with our company. You can look at our website . There is a group of us, so feel free to look us up. We are always looking to improve what we are doing and to help the trading community.

    Dave: Do you have remote traders?

    Darren: Absolutely, we have traders all across North America and some internationally.

    Dave: To trade in Canada, do you need to have a series 7?

    Darren: Yes, you do need to have a series 7. Currently the only province we have license to trade in Canada is British Columbia and that is because we all trade through Bright. That is the province Bright is licensed to trade in. We do have a number of traders here. Our Langley office is actually our second largest office.

    Dave: What is the minimum capital contribution from a trader?

    Darren: A mentor trader through us is $10,000 as a minimum capital contribution. You do come spend two months time with us in British Columbia.

    Dave: Thank you very much for joining me, Darren.
    #69     Apr 15, 2007
  10. segv... I took a cursory glance at your code and basically, please correct me if I'm wrong, it just sorts a universe of stocks by highest correlation and stops after 200 pairs are made.

    You could generate 1000 random walks and just as easily find correlations in those samples... but the resulting pair is still random. i.e., There isn't any new information gained in high correlation pairs, and your profit potential is much lower because there isn't enough spread.
    #70     Apr 15, 2007