March 27, 2009

Dark Liquidity Pools

Noting this down as a reminder - this is the twin of algo. trading. need to read up on this.

Comments (View)
February 15, 2009

Market Neutral Vs. Risk Free

Market-neutral strategy: A trading strategy that derives its returns from the relationship between the performance of its long position and the performance of its short positions, regardless of whether this relationship is done on the security or portfolio level. 

In a perfectly market-neutral portfolio, holding all other factors constant, the performance of the long portfolio and the performance of the short portfolio are perfectly explained by fluctuation in the general market. Net performance for the overall portfolio will be near zero because for every move up or down in the long portfolio, there will be an offsetting move in the opposite direction for the short portfolio (the beta of the portfolio will be zero). In such a case, the investor would expect to earn roughly the risk-free rate.

In a managed market-neutral portfolio, however, if the manager is skilled, the investor expects the long portfolio to outperform the short portfolio in rising markets and the short to outperform the long in falling markets, thus creating a consistently positive return regardless of market conditions. 

There are several types of market neutrality: share neutrality, dollar neutrality, sector neutrality, and beta neutrality. Each of these has a different impact on the portfolio and relates differently to pairs trading. Understanding each and how to apply it appropriately will directly impact the portfolio construction process.

Comments (View)
February 4, 2009

Duration and Data

One of the key challenges in pair spotting is the duration for analysis - how far back do you need to look out to extract pair behavior - finally it boils down to two things: identify the pair, and then look for divergence. We need to understand that without comprehensive tools that can identify divergence signals, we’ll end up ‘guessing pairs’ at some level, which is just gambling.

So we need to have a clear focus on these two aspects. For example, there is nothing to rule out the existence of pair behavior in two instruments across segments. In fact, if we indeed find such a pair, it might be possible to fit in a perfect explanation for the same.

So, the duration is important. Data must be available as well. I have some questions here, for example, if I need to find out the “historic” price ratio of two stock futures, I would definitely need to use different contracts’ prices (June future, July future, etc). Is there some noise we need to eliminate here? I am not too sure.

Comments (View)
February 2, 2009

Its the same thing…

Wanted to note this down before I forget.

One of the main reasons I got interested in Pairs trading is the fact that you are not taking a directional bet in the market, instead, you are taking a bet on the relative performance of two instruments - so basically, we are saying, from where we are now, instrument A will outperform instrument B, since historically they have behaved in a particular way relative to one another.

Now, hold on for a minute.

Isnt that the same thing as saying, lets say, historically some instrument has been at a particular price, now it is trading lower than that, so it has to get back to previous levels? At a conceptual level, are we not talking about the same thing?

Answer: NO. I’m trying to come up with a mathematical explanation for this, will try to post that soon.

Comments (View)
January 31, 2009

Understanding Standard Deviation

Since at this point, standard deviation is an important part of our pairspotting analysis, I wanted to have a better understanding of this measure, and got to this link.

Comments (View)
January 28, 2009

Random Pairspotting..

Since I have ‘gained’ the skills of using excel to calculate standard deviations etc., I thought it would be a good idea to do some random pairspotting and figure out how it works in the market. This is an exercise i started, since ganapathy’s book is too heavy, and turns out i need much more time for the book than what i had originally estimated.

The KRChoksey folks have done a tremendous favor by releasing a set of reports on pair trading, so we already have a set of “possible” pairs where we can look for opportunities. In this exercise, I also want to look at the “how” part, and the associated brokerage costs.

One of the things we need to construct, as part of the pairspotting exercise, is to have some kind of a mega signal picking tool, with the entire universe of the futures segment in NSE, alerting us of any tradable divergence. The trick here is this: do we work with “possible pairs” (same industry / some other fundamental analysis) or do we go for a comprehensive pairspotting exercise?

Like many other cases, scale determines the answer. There are 270 stocks whose futures contracts are traded on NSE. So a comprehensice signal picker would need to consider 270C2 combinations, i.e., 36315 possible pairs. I think we shd be able to build a comprehensive signal picker.

Why is this ‘random’ pairspotting? bcos, except standard deviations, we r not using anything at this point. Well, if google makes you believe that pairs trading is all about standard deviations, have a look at ganapathy’s book!

Comments (View)
January 22, 2009

Am Not Convinced…

One view I have of the markets is (and is shared by many, many people) is that one cannot, just cannot apply mathematics to a sequence of numbers that are generated based on people’s perceptions (buy and sell). I am not saying that the numbers are random: I am only saying that mathematics cannot be used to predict anything about the markets. This, even if you exclude black swan events.

So, whenever I read a concept, I tend to ask, what is the logic behind this? Why is this an indicator? Let me give an example. Institutions buy puts to hedge their large holdings. So if you suddenly see a spike in puts, that means probably someone is taking a huge long position in the underlying, and is trying to cover the downside with the put. Now this, to me, makes sense.

I am searching for a similar logic as to why pairs should work. I am not going to deploy any of the pair trading strategies unless i am convinced that mean reversion of the price ratio of two entities happens for a reason. As of now, I am not convinced. The only point that I can think of is, since pairs are typically from the same sector, logically, even if in the short run one firm does”better than usual” relative to the other firm, in the medium to long run, the other should catch up, and the performance of the two firms should revert to the mean.

But thats insufficient explanation. I am looking out for more, and will post as I find them.

Comments (View)
January 20, 2009

Complicated!

Just started reading Ganapathy Vidyamoorthy’s book on Pairs trading .. This is a really, really complicated subject !

Comments (View)
January 18, 2009

Market Neutral..

Wanted to jot this down before I forget: the most important reason why I am exploring pairs, is the fact that pair trading strategies are “market neutral”. A good article by Douglas Ehrman explains this with an example:

Many traders think of a pair as a “spread” trade, but this comparison is not quite accurate. A spread trade creates either net long or net short exposure, but a properly executed pairs trade is dollar-neutral. By maintaining a market-neutral position, the effects of market direction can be largely eliminated from the trade.

Consider the following comparison of a spread trade vs. a pairs trade:

Stock A: $20 per share
Stock B: $10 per share

Spread trade
Long 100 shares of stock A: $2,000
Short 100 shares of stock B: $1,000

Net long: $10 per share ($1,000)
This is a hedged, bullish position.

Pairs trade
Long 100 shares of Stock A: $2,000
Short 200 shares of Stock B: $2,000

Net long/short: $0
This is a true market-neutral position.

Scenario 1
Both stocks rise 50 percent.
Stock A: $30
Stock B: $15

Scenario 2
Both stocks fall 50 percent.
Stock A: $10
Stock B: $5

A spread trade is a market bet with a built-in hedge, while a pairs trade is a market-neutral position. In the first scenario’s bull market, the spread trade gains $500 (Stock A’s $1,000 profit - Stock B’s $500 loss), and the pairs trade is flat (Stock A’s $1,000 profit - Stock B’s $1,000 loss).

In the second scenario’s bear market, however, the spread trade loses $500 (Stock A’s $1,000 loss - Stock B’s $500 profit) as the pairs trade stays flat. Here, the spread trade loses money despite both stocks dropping by an equal percentage. In both scenarios, the specifics of either stock had no effect on price — the entire move is explained by the broader market fluctuations.

The trade must be market-neutral to ensure it won’t lose money unless there’s a change in relative performance (i.e., one stock performs better than the other).

Similarly, if both stocks dropped by $5, the spread trade would remain flat even though Stock A outperformed Stock B (Stock A loses 25 percent, while Stock B loses 50 percent). A trade can only capture this relative performance if the trade is dollar-neutral.

And thats the whole concept: The trade MUST be market-neutral to ensure it won’t lose money unless there’s a change in relative performance (i.e., one stock performs better than the other).

Comments (View)

Queries

Even before I get into the “How do we implement this strategy” part, I thought it will be a good idea to pen down my questions at this point. I know some of them might have obvious answers and some would just become redundant, but here goes:

1. Prices constrained by Contracts: The way I understand futures, there are set futures for a given stock at set prices, typically expiring end of the month. So, there is a huge constraint introduced by the availability of a future at a given price, unlike the underlying. This, I believe, I will figure out as I start trading in future contracts.

2. Margin: The only way you can make any decent returns on Pair Trading, as I understand it now, is by trading in derivatives. In fact, in NSE, thats the only way you can do pair trading. How else do you carry forward a short position?

3. “Gaps”: This is a big one. The query I have is, if end of a particular day you decide to get out of a trade, whats the guarantee that you will be able to exit at that price when the market opens the next day? as in, what if the market opens with a gap? what exactly is the limit mechanism to sell futures?

4. A long position can be taken as an option, or as a future. What will be the difference in terms of returns? Is there a standard relationship between these returns?

5.How big a concern is liquidity? I mean, the subset of stocks where you can spot pairs will become few in number, thereby making pairspotting an easy non-computationally-intensive task.

6. How do you implement a pair trade where one of the elements is an index (i know this one) or a sector index or a group of stocks? How do you exit?

7. How long can you practically keep a position, assuming neither the profit booking target nor the stop loss target is hit? I mean, will the right contracts be available to carry forward a position?

8. What will be impact of brokerage in percentage terms, on the overall returns, particularly if you need to carry forward a position?

9. Does it make sense to go with a time frame for mean reversion in mind, as another way of stop loss? If yes, what could be a possible time frame?

10. What is the philosophy behind pair trading? As in, why shd mean reversion happen? I guess this is the most important question in my mind, and I hope to find some answers to this as we go along.

Comments (View)