Skip to content

algoboy-kevin/pair-trading-notebook

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

2 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Pair Trading Notebook

This repository contains my personal research notebooks for backtesting pair trading strategies. There are three main notebooks:

  1. Preliminaries – Downloads Binance price data and performs cointegration-correlation tests to identify the best pair combinations.
  2. Gridsearch – Runs backtests and performs a grid search to find the optimal parameters for entry and exit strategies.
  3. Bidask – Runs backtests while considering bid-ask spreads (incomplete).

Concept Overview

Pair Trading Concept

Installation

To use these notebooks, you will need:

  • Python 3.10 (or later)
  • Jupyter Notebook

Additionally, make sure to clone the Binance public data repository into this folder:

git clone https://github.com/binance/binance-public-data.git

Don’t forget to create a .env file with the following contents:

BINANCE_API_KEY=
BINANCE_API_SECRET=

Todo

  • Complete the Bidask notebook

About

Repository for pair trading research using python

Topics

Resources

Stars

Watchers

Forks

Packages

No packages published