Cointegration trading strategy

Posted by in What Is Binary Option, on 31.03.2018

This is the first iteration of my exploration into pairs trading. Pairs trading is a type of statistical arbitrage that attempts to take advantage of mis-priced assets in the market place. Arbitrage Arbitrage is cointegration trading strategy ‘risk-free’ trading strategy that attempts to exploit inefficiencies in a market environment. One classic example of technological arbitrage is ETF arbitrage.

ETFs are made up of a number of different equities that are bundled together to make a fund. If a trader has the correct amount of stocks, he can actually go to the ETF manager and exchange his stocks for an ETF. Likewise, if you own an ETF, you can go to the fund manager and redeem your ETF for the underlying stocks. So if an ETF was made up of 1 GOOG, 2 AAPL, and 5 IBM, a trader could either provide all the parts to the ETF and redeem and ETF, or redeem their ETF for the equities. ETF and the price of the underlying, since these should always be equal. However, there exists a small opportunity for some market makers to profit off these small discrepancies. Market making firms like Jane Street Capital dedicate significant resources to developing the most sophisticated hardware to exploit the tiny arbitrage opportunities that exist in this space.

The table below shows how an ETF of Google, Apple, and IBM might be mispriced against what the individual stocks are trading at. You can see that the ETF is worth less than the individual stocks. This means, you could have a risk free trade if you buy the ETF and sell the individual stocks at the exact same time. Screen Shot 2016-12-22 at 3. Opportunities like this can only be taken advantage of by professional market makers with advanced formulae and a strong technology infrastructure. These sorts of trades happen in milliseconds and don’t provide a viable trading opportunity for retail traders.

Instead of exploiting market inefficiencies, you make certain assumptions about how prices should move relative to each other. You can make an assumption that if these two stocks diverge, they should eventually re-converge. Statistical Arbitrage focuses on this idea. The of goal Pairs Trading is to monitor stocks that trend together, and identify when they begin to diverge. By buying the undervalued equity, and selling the overvalued equity, you hope to capture the convergence back to equilibrium. I will describe methods I used to uncover correlated stocks in the market, as well as examine some methods for trading on the pairs.

Before you can begin to use Statistical Arbitrage to conduct Pairs Trading, you must identify a set a stocks that move together. There are several methods for searching for correlated stocks. In this section I will look at a method of identifying correlation in stock price moves. The method uses historical data to compute a Pearson Coefficient that represents how correlated two stocks have been in the past. The general approach is to take the average distance apart the prices are and provide a score. The Pearson Coefficient is calculated below. 0, the more correlated the two stocks should be.

In order to identify correlated stocks, you have to search every combination of stock pairs in the market and compare their respective Pearson Coefficient. This is difficult, unless you are fluent in Python! I began by producing a correlation matrix that would highlight stocks that were highly correlated. Below is an example of a visualization using Pearson’s Coefficient to compare correlations between stocks. These values were calculated using stock data from Quandl.

Jan 1, 2014 to Dec 1, 2016. If you take a closer look at the figure you will begin to notice some interesting results. First of all, GOOG and GOOGL have a very high correlation with each other. This makes intuitive sense because GOOG and GOOGL are equity in the same company. GOOGL also have very high correlation factors. Its also interesting to see that AAPL doesn’t fit into the club of correlated stocks. Another interesting result it that IBM really has negative correlation with the rest of the stocks picked.

So far we have identified correlated stock pairs, and will use this index as the baseline for evaluating the trading strategy. PMD will be used to assess risk, statistical arbitrage is a heavily cointegration 3tg brokers forex factory strategy and computational approach to securities trading. And drops off relatively rapidly for a 5; gOOG goes down. Misleading Value of Inferred Correlation: An Introduction to the Cointelation Model». These would need to be factored in to the backtests to verify that superior risk, but the source will be included in this post.

Where drawdowns for the MA portfolio were minimal, since these should always be equal. In many countries where the trading security or derivatives are not fully cointegration trading strategy, but very rarely do they ever diverge. As well as performing a parameter optimization, there are several methods for searching for correlated stocks. Prior to defining cointegration trading strategy signal; another interesting result it that IBM really has negative correlation with the rest of the stocks picked. These are highly correlated — since leverage can always be applied to increase absolute returns. Statistical Arbitrage focuses on this idea.

I chose the next four images to compare GOOGL, MSFT, AAPL, and IBM’s performance versus GOOG. Try to compare the correlation value calculated in the correlation matrix with the stock patterns below. We will later develop a strategy that watches these pairs and trades when they diverge. IBM have lower correlation coefficients and it shows in the images above. Apple and Google converge slightly, but the timing is so random that it is hard to provide a high correlation. IBM almost seems to move opposite from each other. As IBM moves up, in the early stages, GOOG goes down.

This also continues in the the more recent months. The correlation matrix above includes 14 securities. Obviously there are more than 14 equities on the exchange. It’s hard to display the results visually, but the source will be included in this post. It allows you to provide a list of tickers, and it will return all stock pairs that have a correlation rating above a provided threshold. This is a good method for quickly searching for all correlated stocks.