<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"><channel><atom:link rel="hub" href="http://tumblr.superfeedr.com/" xmlns:atom="http://www.w3.org/2005/Atom"/><description>Probability is like gravity: you cannot negotiate with gravity.</description><title>Pair Spotting !</title><generator>Tumblr (3.0; @pairspotting)</generator><link>http://pairspotting.com/</link><item><title>Dark Liquidity Pools</title><description>&lt;p&gt;Noting this down as a reminder - this is the twin of algo. trading. need to read up on this.&lt;/p&gt;</description><link>http://pairspotting.com/post/90425800</link><guid>http://pairspotting.com/post/90425800</guid><pubDate>Fri, 27 Mar 2009 15:36:33 -0400</pubDate></item><item><title>Market Neutral Vs. Risk Free</title><description>&lt;p&gt;&lt;b&gt;Market-neutral strategy&lt;/b&gt;: 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. &lt;/p&gt;
&lt;p&gt;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 ﬂuctuation 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.&lt;/p&gt;
&lt;p&gt;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. &lt;/p&gt;
&lt;p&gt;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.&lt;/p&gt;</description><link>http://pairspotting.com/post/78447151</link><guid>http://pairspotting.com/post/78447151</guid><pubDate>Sun, 15 Feb 2009 02:53:36 -0500</pubDate></item><item><title>Duration and Data</title><description>&lt;p&gt;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.&lt;/p&gt;
&lt;p&gt;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.&lt;/p&gt;
&lt;p&gt;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.&lt;/p&gt;</description><link>http://pairspotting.com/post/75630980</link><guid>http://pairspotting.com/post/75630980</guid><pubDate>Wed, 04 Feb 2009 12:06:57 -0500</pubDate></item><item><title>Its the same thing...</title><description>&lt;p&gt;Wanted to note this down before I forget.&lt;/p&gt;
&lt;p&gt;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.&lt;/p&gt;
&lt;p&gt;Now, hold on for a minute.&lt;/p&gt;
&lt;p&gt;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?&lt;/p&gt;
&lt;p&gt;Answer: NO. I’m trying to come up with a mathematical explanation for this, will try to post that soon.&lt;/p&gt;</description><link>http://pairspotting.com/post/75072867</link><guid>http://pairspotting.com/post/75072867</guid><pubDate>Mon, 02 Feb 2009 12:05:35 -0500</pubDate></item><item><title>Understanding Standard Deviation</title><description>&lt;p&gt;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 &lt;a href="http://amarsagoo.blogspot.com/2007/09/making-sense-of-standard-deviation.html"&gt;link&lt;/a&gt;.&lt;/p&gt;</description><link>http://pairspotting.com/post/74574016</link><guid>http://pairspotting.com/post/74574016</guid><pubDate>Sat, 31 Jan 2009 11:22:53 -0500</pubDate></item><item><title>Random Pairspotting..</title><description>&lt;p&gt;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. &lt;/p&gt;

&lt;p&gt;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.&lt;/p&gt;

&lt;p&gt;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? &lt;/p&gt;

&lt;p&gt;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.&lt;/p&gt;

&lt;p&gt;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!&lt;/p&gt;</description><link>http://pairspotting.com/post/73797176</link><guid>http://pairspotting.com/post/73797176</guid><pubDate>Wed, 28 Jan 2009 11:56:03 -0500</pubDate></item><item><title>Am Not Convinced...</title><description>&lt;p&gt;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.&lt;/p&gt;

&lt;p&gt;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.&lt;/p&gt;

&lt;p&gt;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. &lt;/p&gt;

&lt;p&gt;But thats insufficient explanation. I am looking out for more, and will post as I find them.&lt;/p&gt;</description><link>http://pairspotting.com/post/72344106</link><guid>http://pairspotting.com/post/72344106</guid><pubDate>Thu, 22 Jan 2009 11:06:55 -0500</pubDate></item><item><title>Complicated!</title><description>&lt;p&gt;Just started reading &lt;a href="http://www.amazon.com/Pairs-Trading-Quantitative-Methods-Analysis/dp/0471460672/ref=sr_1_1?ie=UTF8&amp;s=books&amp;qid=1232460305&amp;sr=1-1"&gt;Ganapathy Vidyamoorthy’s book&lt;/a&gt; on Pairs trading .. This is a really, really complicated subject !&lt;/p&gt;</description><link>http://pairspotting.com/post/71797148</link><guid>http://pairspotting.com/post/71797148</guid><pubDate>Tue, 20 Jan 2009 09:05:35 -0500</pubDate></item><item><title>Market Neutral..</title><description>&lt;p&gt;Wanted to jot this down before I forget: the most important reason why I am exploring pairs, is the fact that&lt;b&gt; pair trading strategies are “market neutral”&lt;/b&gt;. A good &lt;a href="http://www.traderslog.com/trading-pairs.htm"&gt;article&lt;/a&gt; by Douglas Ehrman explains this with an example:&lt;/p&gt;

&lt;p&gt;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.&lt;/p&gt;

&lt;p&gt;Consider the following comparison of a spread trade vs. a pairs trade:&lt;/p&gt;

&lt;p&gt;Stock A: $20 per share&lt;br/&gt;
Stock B: $10 per share&lt;/p&gt;

&lt;p&gt;Spread trade&lt;br/&gt;
Long 100 shares of stock A: $2,000&lt;br/&gt;
Short 100 shares of stock B: $1,000&lt;/p&gt;

&lt;p&gt;Net long: $10 per share ($1,000)&lt;br/&gt;
This is a hedged, bullish position.&lt;/p&gt;

&lt;p&gt;Pairs trade&lt;br/&gt;
Long 100 shares of Stock A: $2,000&lt;br/&gt;
Short 200 shares of Stock B: $2,000&lt;/p&gt;

&lt;p&gt;Net long/short: $0&lt;br/&gt;
This is a true market-neutral position.&lt;/p&gt;

&lt;p&gt;Scenario 1&lt;br/&gt;
Both stocks rise 50 percent.&lt;br/&gt;
Stock A: $30&lt;br/&gt;
Stock B: $15&lt;/p&gt;

&lt;p&gt;Scenario 2&lt;br/&gt;
Both stocks fall 50 percent.&lt;br/&gt;
Stock A: $10&lt;br/&gt;
Stock B: $5&lt;/p&gt;

&lt;p&gt;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).&lt;/p&gt;

&lt;p&gt;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.&lt;/p&gt;

&lt;p&gt;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).&lt;/p&gt;

&lt;p&gt;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). &lt;b&gt;A trade can only capture this relative performance if the trade is dollar-neutral.&lt;/b&gt;&lt;/p&gt;

&lt;p&gt;And thats the whole concept: The trade &lt;b&gt;MUST &lt;/b&gt;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).&lt;/p&gt;</description><link>http://pairspotting.com/post/71334960</link><guid>http://pairspotting.com/post/71334960</guid><pubDate>Sun, 18 Jan 2009 10:51:00 -0500</pubDate></item><item><title>Queries</title><description>&lt;p&gt;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:&lt;/p&gt;

&lt;p&gt;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.&lt;/p&gt;

&lt;p&gt;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?&lt;/p&gt;

&lt;p&gt;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?&lt;/p&gt;

&lt;p&gt;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?&lt;/p&gt;

&lt;p&gt;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 &lt;strike&gt;easy&lt;/strike&gt; non-computationally-intensive task.&lt;/p&gt;

&lt;p&gt;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?&lt;/p&gt;

&lt;p&gt;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? &lt;/p&gt;

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

&lt;p&gt;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?&lt;/p&gt;

&lt;p&gt;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.&lt;/p&gt;</description><link>http://pairspotting.com/post/71329792</link><guid>http://pairspotting.com/post/71329792</guid><pubDate>Sun, 18 Jan 2009 10:21:24 -0500</pubDate></item><item><title>NSE Pair Trading Example</title><description>&lt;p&gt;There can be many types of pairs: two stocks, one stock and a group of stocks, one stock and an index, a group of stocks and an index and so on. To understand the concept of mean reversion and the instruments required to execute a pairs trade on NSE, we’ll start with two stocks: Wipro and Infosys.&lt;/p&gt;

&lt;p&gt;According to a &lt;a href="http://www.moneycontrol.com/news_html_files/news_attachment/2008/Pair%20Strategy%20-%20Long%20INFOSYSTCH%20Short%20WIPRO.pdf"&gt;KRChoksey Report&lt;/a&gt;, the recommended strategy is to long infosys and short wipro. lets understand the reasoning, and see if this strategy would actually have worked. &lt;/p&gt;

&lt;p&gt;Although the report refers to futures positions, I have done the complete analysis based on closing prices of these stocks (underlying) for the past 20 days. I have not understood this 20 day thing (except that it represents the number of trading days in the past month - why a month shd be taken, i don’t know), but for now, we’ll go ahead with this 20 days data.&lt;/p&gt;

&lt;p&gt;I downloaded the closing prices of wipro and infosys for the 20 days before the day of recommendation (Dec 11, 2008). For 20 data points, I had to download data from 10-Nov-2008 to 10-Dec-2008. I figured out the following (I am guessing, since my analysis is based on actual stock prices and not the future contract prices, my results are slightly different). Pls note that this whole exercise is based on 20 most recent data points.&lt;/p&gt;

&lt;p&gt;1. The mean price ratio of the closing prices: 5.05&lt;br/&gt;
2. Standard Deviation: 0.17&lt;br/&gt;
3. Based on 10 Dec closing stock prices, the price ratio is 4.49, which is at -3.29 times the mean price ratio.&lt;br/&gt;
4. So the conclusion, based on mean reversion, is to go long on Infosys and short on Wipro.&lt;/p&gt;

&lt;p&gt;But we need two more pieces of info before we can enter this trade: when do we book profits, and whats the stop loss. How do we calculate that? There are many ways we can determine this, but for now, we’ll go with a simple rule: movement of 1 more standard deviation away from the mean we’ll cut losses, and movement of 3 standard deviations towards the mean we’ll book profits. So, a price ratio of 4.32 or 5.0, we are out of the trade.&lt;/p&gt;

&lt;p&gt;Now, for the interesting parts. There are two interesting parts: How exactly do we implement this strategy, and, what would have been the results. &lt;/p&gt;

&lt;p&gt;Lets postpone the “How exactly do we implement this strategy” to a separate post. I have many queries around the nature and availability of the appropriate derivative instruments. &lt;/p&gt;

&lt;p&gt;For now, lets assume we had taken these positions, again using closing prices for the next 20 days, lets see how we would have fared. &lt;/p&gt;

&lt;p&gt;I downloaded the data again, and did the price ratio calculations, and realized that on 24-Dec-08, the price ratio was 5.05. we would have booked profits and gotten out. Pairs Trading WORKS! &lt;/p&gt;

&lt;p&gt;The exact percentage of profit would be decided by the investment, which depends upon the instruments we used to implement this trade. That would be the subject of the next post.&lt;/p&gt;</description><link>http://pairspotting.com/post/71317990</link><guid>http://pairspotting.com/post/71317990</guid><pubDate>Sun, 18 Jan 2009 09:03:50 -0500</pubDate></item><item><title>Pairs Trading - Level 0 understanding</title><description>&lt;p&gt;&lt;a href="http://luminouslogic.com/a-pairs-trading-example.htm"&gt;Luminous Logic&lt;/a&gt; provides an example and a very very high level overview of pairs trading. The basic idea is presented below:&lt;/p&gt;

&lt;p&gt;1. Find a pair of stocks (or ETFs) whose prices tend to move together.&lt;/p&gt;

&lt;p&gt;2. If the price movements are indeed highly correlated, then on most days the price per share of Stock A divided by the price per share of Stock B should come out to be about the same number, within a small range.&lt;/p&gt;

&lt;p&gt;3. But occasionally, you might notice a significant divergence from this “average” ratio. If you do, enter a pairs trade. This will involve simultaneously shorting one of the stocks while taking a long position in the other.&lt;/p&gt;

&lt;p&gt;4. At some time in the future when the price ratio (hopefully) reverts to the mean, exit the pair trade.&lt;/p&gt;

&lt;p&gt;So the basic idea is that the price ratio reverts to a mean. We’ll test this hypothesis with some numbers in the next post.&lt;/p&gt;</description><link>http://pairspotting.com/post/71283487</link><guid>http://pairspotting.com/post/71283487</guid><pubDate>Sun, 18 Jan 2009 03:15:55 -0500</pubDate></item><item><title>What is Pair Spotting?</title><description>&lt;p&gt;Few days back, &lt;a target="_blank" href="http://radhakrishna.typepad.com"&gt;my friend&lt;/a&gt; introduced me to &lt;a target="_blank" href="http://en.wikipedia.org/pairs_trade"&gt;Pairs Trading&lt;/a&gt;. Strategies are formulated, based on the idea that the price relationship between two related instruments tends to fluctuate around its average in the short term, while remaining stable over the long term.&lt;/p&gt;
&lt;p&gt;I plan to study pairs in more depth, and try and do actual trades based on what I find. I plan to keep my notes in this blog.&lt;/p&gt;
&lt;p&gt;Welcome to Pair Spotting!&lt;/p&gt;</description><link>http://pairspotting.com/post/70952567</link><guid>http://pairspotting.com/post/70952567</guid><pubDate>Fri, 16 Jan 2009 13:09:11 -0500</pubDate></item></channel></rss>
