Code Monkey home page Code Monkey logo

pairs-trading-with-python's Introduction

Pairs Trading With Python

This project involves using a combination of statistics along with financial thoery to demonstrate a popular trading strategy used in equity markets: Pairs Trading.

Pairs Trading

Goal

Our goal involves the following:

  • Part 1: Creating a model that test for stationarity.
  • Part 2: Creating a model that test for cointegration.
  • Part 3: Assigning a portfolio of assests and testing for a cointegrated pair among the dataset.
  • Part 4: Establishing features and labels that will allow us to create trading signals for the strategy.

Data

I used the data from Yahoo Finance, which provides historical financial data for free. This data was extracted via the yFinance Python module.

Enviroment and Tools

The following are the modules we will use in this notebook. However, the program relies on many more dependencies than what is shown here. Please be sure to set up a virtual enviroment and install the requirements.txt file before running this programming on your own.

  1. Jupyter NoteBook
  2. Numpy
  3. Pandas
  4. Matplotlib
  5. Seaborn
  6. Statsmodels
  7. Pandas DataReader
  8. DateTime
  9. yFinance (formally known as Fix Yahoo Finance)

pairs-trading-with-python's People

Contributors

kidquant avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.