MIDS Capstone Project Spring 2024

Parallel Portfolios

Demystifying Pair Trading Using AI

Problem and Motivation

In the dynamic world of stock trading, individual retail investors often face challenges in identifying lucrative opportunities while mitigating risks. The sheer volume of available stocks and information can be overwhelming. Advanced portfolio managers, even with their sophisticated models, find it difficult to consistently generate excess returns for their institutional clients. 

Pair trading emerges as a compelling solution to these challenges. Unlike conventional single-stock trading, pair trading involves simultaneously buying and selling two correlated stocks, thereby leveraging market-neutral strategies to potentially generate profits regardless of market direction. This approach offers several advantages, including reduced exposure to market volatility and the ability to capitalize on relative price movements between paired assets.

Recognizing these challenges, our motivation stems from the desire to empower individual stock traders with a sophisticated toolset that simplifies and enhances their trading experience. By developing an application Parallel Portfolios, we aim to address the following key issues:

Complexity in Identifying Profitable Pairs: Identifying suitable pairs for trading requires a deep understanding of market dynamics, correlation analysis, and technical indicators. Most retail traders lack access to advanced tools and expertise needed for effective pair selection.

Risk Management: Trading individual stocks can expose investors to significant risks, especially in volatile market conditions. Pair trading offers a systematic approach to managing risk by simultaneously taking long and short positions on similar stocks, thereby hedging against market fluctuations.

Time and Resource Constraints: Individual traders often lack the time and resources to conduct thorough research and analysis for identifying trading opportunities. A user-friendly pair trading application can streamline this process, providing actionable insights and recommendations in real-time.

Need for Data-Driven Transparent Decision Making: Successful trading relies on data-driven decision-making processes. However, accessing and analyzing vast amounts of financial data can be daunting for individual traders. Our application leverages advanced algorithms and data analytics to deliver transparent, precise and data-backed recommendations.

By addressing these challenges, Parallel Portfolios seeks to democratize access to advanced trading strategies, empower individual investors with actionable insights, and ultimately enhance their potential for achieving consistent returns in the stock market.

Our Mission

With Parallel Portfolios we want to democratize data science techniques to help retail investors generate investment returns the same way nuanced portfolio managers do.

Modeling Framework

The primary data source for our project is the Yahoo Finance database, specifically focusing on 15 years of data from the S&P 500 index.

Utilizing K-Means clustering, we categorized stocks based on similar risk-return profiles, resulting in the creation of 10 distinct clusters. Recognizing that not all stock pairs exhibit profitable patterns or cointegration, we refined our focus to a pool of 500 pairs deemed executable based on cointegration test results. Our algorithm is capable of continually updating this pool on an annual basis.

Employing a supervised learning model, specifically a classification approach, we generate trading signals in the near future each day, with the anticipation a profitable pair trading entry signal will appear soon for these pairs. Upon identification of these pairs, our model continuously monitors them, activating an entry signal once predefined thresholds are reached. Subsequently, pair trading is executed, entailing the purchase of underperforming stocks and the short selling of overperforming stocks. Similarly, our trading system will monitor the predicted performance of the executed pair and generate an exit signal when the exit threshold is met. At this time short-sold stock will be purchased and the long-held stock will be sold.

The Minimum Viable Product (MVP)

Our MVP, Parallel Portfolios, empowers individual investors to confidently engage in pair trading. Unlike traditional approaches that limit pair selection to within the same industry, our unified methodology expands opportunities for users to benefit from pair trading across diverse industries.

Parallel Portfolios strategically invests users' funds across identified profitable pairs. Users gain transparency into their investment performance by selecting specific date ranges. Additionally, users have the flexibility to customize the refresh period for their investments, with our industry-recommended default set at 60 days.

Our platform offers users insights through simulations, allowing them to forecast the performance of their stocks. Moreover, users have access to analytics highlighting the most traded, most profitable, and most loss-inducing pairs, enabling informed decision-making and deeper understanding of their investment strategies.


The Parallel Portfolios team extends its sincere gratitude to our Capstone professors, Frederick Nugen and Korin Reid, whose guidance and support have been invaluable throughout this semester. Your expertise and feedback have been instrumental in shaping our vision into reality.

Additionally, we would like to express our appreciation to our classmates for their valuable feedback and input, which have contributed significantly to the success of this project.

Thank you all for your unwavering support and collaboration.



Parallel Portfolios Demo

Parallel Portfolios

If you require video captions for accessibility and this video does not have captions, click here to request video captioning.

Last updated:

April 15, 2024