# Tag Info

## Hot answers tagged pairs-trading

12

There are multiple approaches that you could consider. The basic idea across all of them is that you want to find a portfolio that is stationary. In the two-asset case, it is well known how to accomplish this. This paper by Marcelo Perlin describes one approach: http://papers.ssrn.com/sol3/papers.cfm?abstract_id=952782 but I am not particularly inclined to ...

10

Well, "mean reversion trading" could mean a lot of things, I am not qualified to describe it in full generality. However, there is a simple model of mean reversion called the Ornstein Uhlenbeck process that is often seen. It has two parameters \lambda and \sigma, where lambda is the strength of the mean reversion (so one over lambda is the mean reversion ...

9

For years, I performed this brute-force search daily on my universe of tradable stocks and futures. It is a waste of time. If your computer discovers that hog futures and MSFT are cointegrated, for example, do you really care? I would never trade that pair. There is no economic connection between hogs and Microsoft, so I must assume that the reported, small ...

9

$\theta$ is the "mean" for this process. If $X_t > \theta \implies (\theta - X_t) < 0$, which means that the drift for the process is negative and tends towards $\theta$. The opposite case can be made for $X_t < \theta$ ; the process will have positive drift when $X_t$ is below $\theta$. Therefore we can consider $\kappa$ to be the "speed" of mean ...

8

Theoretically, the answer to the question is yes, a correlation matrix for potential pairs trades can be computed in $O\left((n^2t)^{(\omega+\epsilon)/3}\right)$ time, for any $\epsilon > 0$, where $\omega < 2.38$ is the so-called exponent of matrix multiplication. However, these algorithms have a reputation for having a very large constant factor ...

7

The following link has a good summary of a typical pair trading strategy: https://www.quantstart.com/articles/Backtesting-An-Intraday-Mean-Reversion-Pairs-Strategy-Between-SPY-And-IWM It actually has full python code as well. It doesn't include a cointegration check though. Edit: if X and Y are cointegrated: calculate Beta between X and Y ...

6

It really depends on the source of your signal. Since you're trading options I assume it is either volatility signal, or volatility + basis signal. If you have signal only on basis don't bother with options and just trade underlying. Now if you are trading vol signal only, you will need to hedge all basis risk - so gamma hedge (dynamic hedging with ...

6

Pairs trading is just one type of statistical arbitrage (check out references on wikipedia page). It sounds like you are talking about trading "factors" against each other. Factors could be industries, size, fundamentals, or purely statistical. Start with Ed Thorp's Wilmott articles on statistical arbitrage. Then read Attilio Meucci's Review. An example ...

6

Sharpe should only be computed from daily returns because finer granularity leads to a larger sample size. The larger sample makes the standard deviation metric more accurate. As a counter-example, how reliable would the Sharpe be using yearly returns?

6

Such tests should always be done using adjusted prices. In fact, ideally, you should reconstruct your own price series using the total returns series. To see this, suppose you have a 10:1 split rather than a relatively small cash dividend. Then it is clear that the cointegration relationship can only hold with respect to the adjusted series.

6

Similar to Juan Gil's answer but a bit differently I would say the following based on this: The OU process $$dX_t = \kappa(\theta-X_t)dt + \sigma dW_t$$ can be (Euler-Maryuama discretization) discretized at times $n \Delta t,n=1,\ldots,\infty$ which gives with $t = k \Delta t$ $$X_{k+1} - X_k = \kappa \theta \Delta t -\kappa X_k \Delta t + \sigma (W_{k+1} ... 6 A few possibilities - Trading costs kill your returns (often a problem for very highly correlated securities) Mean reversion of the cointegration spread is either very weak, or happens over periods which are too long to be practical, or there is no mean reversion whatsoever. For example, consider the following two securities, which are clearly very ... 6 Let's say your cumulative return series is \{R_i \mid i=0,1,...,N-1\} of length N days. There's 3 conventional ways to do this at this stage. You may convert the cumulative dollar return curve into arithmetic returns: \displaystyle{r_i}= \dfrac{R_i-R_{i-1}}{R_{i-1}} Or dollar returns: \displaystyle{r_i=R_i-R_{i-1}} Then take the ratio: \... 5 Fatih Yilmaz, formerly of Bank of America (currently BlueGold), has a piece called "Imaginal Spreads and Pairs Trading" on exactly this topic, if you can find it (I couldn't find a copy on the public internet), originally published April 17, 2009. He writes: Academics and industry practitioners generally concentrate on time series aspects of currency ... 5 Have you checked out the vingette for DLM by Petris? Incidentally, Petris also has an R-book on the DLM package which includes estimation of beta as an example. 5 The basic idea of pair trading is to find two symbols (I'll use that to mean stocks, futures, anything you can trade) that historically have correlated price movements. Then if just one of them increases in price you short that symbol, and buy its pair, on the assumption that they will soon go back in sync. However when you think there is a genuine reason ... 4 There are many. Just to list a few: Capital structure arbitrage (CDS) Convertible bonds arbitrage Merger arbitrage Latency arbitrage Exchange-traded funds arbitrage Correlation and volatility arbitrage Municipal bond relative value arbitrage Regulatory arbitrage ... They are all easily googled. However, the main idea is always the same. 4 It depends on which return you precisely attempt to measure: Gross Return on trade: Forget about margin or not margin, it does not matter. When you evaluate the performance of a single position you look at the notional to which you exposed yourself to. So if you bought a stock worth 100 dollars and later on sell it for 110 dollars then you generated a ... 4 if you just want to test for significance of the generation of returns exceeding a hurdle rate then you can just setup a standard hypothesis test where you test whether your returns you generate from back tests exceeds a certain return. if you are more interested in testing for co-integration then you should consider the Johansen and/or Engle-Granger tests ... 4 O-U is continuous time mean reverting process, hence used to model stationary series. It has closed form analytic solution. This allows insight into stationary processes and act like asymptotic limiting case for calculating coefficients that matter. EDIT: You can see AR(1) below$$x_{k+1} = c + a x_k + b\varepsilon_k and by substituting c=θμΔt, a=−θΔt ...

4

It depends on if you are trying to do a Dollar neutral hedge or a beta neutral hedge. Method 1 is a Dollar neutral hedge and Method 2 is the Beta neutral hedge ratio. Remember that even if you find a cointegrated pair, share A can have a higher beta than share B.

3

Of course you get through diversification effects different return variation and thus Sharpe ratios depending on whether you calculate the standard deviation on an individual asset or a portfolio standard deviation on a collection of assets. A pairs trade is a small portfolio so with favorable correlation properties you should generally get a better risk ...

3

I personally would not do that! Your regression model has been fitted to approximate $Y(t)$ (the reality) as much as possible. If I understand you well, you say: at the previous period $Y(t)=55$ (Starbucks traded at 55 USD) the last period's estimate from the regression is $\hat{Y}(t)=60$ Since $\hat{Y}(t)-Y(t) > 0$, you want to invest. This does not ...

3

I urge you to not compare CDS contracts and pairs with cash equity pair trades. The profiles are entirely different. CDS pairs are much more similar to being long and short an options contract. As protection buyer you are essentially long an option, you pay an "insurance premium" and that is what you are standing to lose at maximum. However, as protection ...

3

Your spread does not look similar to the random walk. Many of the observations are the same as the previous observation. This means most of the first differences are zero, which is why the test indicates your series has a unit-root. The current value is very good at explaining what the next value will be.

3

Both models are based on a spread, which has to be as stationary / mean reverting as possible. $y_t = \beta_0 + \beta_1 x_t + \epsilon_t$ In pairs trading, $y_t$ and $x_t$ are log prices, and (e.g.) the Johansen cointegration test is used to identify candidates for a pairs trade. For entry and exit points an error correction model is used. In the ...

3

Here is a link to a paper with concrete details of calculating the hedge ratio for your position: http://quanttrader.info/public/betterHedgeRatios.pdf. Certainly, you want to check that it is reasonable to hedge one position with the other, as Freddy warns. But assuming it is, the paper suggests that using total least squares is better than using ordinary ...

3

I would concur with Chrisaycock if the volatility between two assets is constant, but because it never is I find there are way better approaches. Generally correlations fly all over the map once things start to become interesting in the market, even for generally highly correlating assets. I would look to generate an algorithm that can determine a range of ...

3

How about an O(N log(n)) solution ? To be a viable trading strategy, you often expect them variances to be similar, so just calculate ordinary volatility and put it in an ordered array. Of course that's going to be period dependent, so pick a few arbitrary periods and see which instruments end up being together. Then you get clusters of vastly smaller ...

3

Are you trying to trade RV in delta (that is, conditional out-performance of one over the other) or identify RV in volatility (that is, you want to cover a delta-neutral vol position in one index with vol position in another index)? You approach would be very different for these two trades.

Only top voted, non community-wiki answers of a minimum length are eligible