Naharul98 / Pairs-Trading-Highly-Correlated-Assets

Developing and backtesting performance of a market neutral trading strategy which aims to exploit temporary anomalies in correlation between 2 pair of assets.

Home Page:https://nbviewer.jupyter.org/github/Naharul98/Pairs-Trading-Highly-Correlated-Assets/blob/main/Pairs-Trading-Highly-Correlated-Assets.ipynb

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Pairs-Trading-Highly-Correlated-Assets

Developing and backtesting performance of a market neutral trading strategy which aims to exploit temporary anomalies in correlation between 2 pair of assets.

Project Demo

Screenshots

Example Comparision ScreenShot

About the project

More often than not, asset prices in the stock market follow each other. When the index goes up, it is highly likely other stocks (even the ones not in the index) will follow as well. The strategy aims to exploit this pattern by betting on mean reversion.

Strategy Description

  • Observe price correlation of different assets in the market and pick a pair which has a high positive correlation with each other.
  • When the correlation breaks, make a bet that eventually things will get back to the usual state. i.e: revert back to the mean
  • Example backtest of the strategy is demonstrated in the Jypyter Notebook Demo

Libraries used

  • Yfinance
  • Pandas
  • Talib
  • Numpy
  • Plotly
  • Scipy
  • Backtesting.py
  • Seaborn

About

Developing and backtesting performance of a market neutral trading strategy which aims to exploit temporary anomalies in correlation between 2 pair of assets.

https://nbviewer.jupyter.org/github/Naharul98/Pairs-Trading-Highly-Correlated-Assets/blob/main/Pairs-Trading-Highly-Correlated-Assets.ipynb


Languages

Language:Jupyter Notebook 100.0%