Pair Selection Framework in Pairs Trading using Unsupervised Machine Learning

Market Neutral
7 min readJul 3, 2021

Pioneered by two Morgan Stanley Quants in the 1980s, Gerry Bamberger and Nunzio Tartaglia, “pair trading” is an investment strategy that exploits the disequilibrium of the financial markets. The strategy studies the price spread of two securities that are historically proven to follow the same long-run path.

A classic, simple example to understand the strategy is to choose Coca-Cola (KO) and Pepsi (PEP) as our pair. These two companies create a highly similar product for their main activity: soda. By using statistical tests (that will be developed in the following sections), we can prove that the price of these two securities follow a similar path, they shared lows and highs. If the price of Pepsi would increase significantly and the price of Coca-Cola would decrease/stay the same, the spread of these prices would increase in absolute.

A trader who uses the pairs trading strategy would then buy Coca-Cola and sell Pepsi, since we are almost sure that the prices of two companies would get back to a certain “mean” value. The signals are usually triggered when spread breaks a certain threshold, e.g. ±2σ.

Machine Learning application in Pairs Trading

The first step of the pair trading strategy is to determine a profitable pair. Thanks to the advances in technology, the amount of data accessible in the financial markets has been growing substantially. Therefore, finding…

--

--

Market Neutral

A quantitative finance blog focusing on systematic market neutral strategies, derivatives pricing and more. By MEng Financial Engineering student Berke Aslan.