/Gemini

Primary LanguagePython

Contributors Forks Stargazers Issues MIT License LinkedIn


Gemini Pair Trade Analyzer

A handy tool to show stock pair properties in regarding correlation & cointegration

Table of Contents
  1. About The Project
  2. Getting Started
  3. Usage
  4. Roadmap
  5. Contributing
  6. License
  7. Contact
  8. Acknowledgements

About The Project

I've put this utility together to help finding pair trade candidates, and to optimize model parameters.

Features:

  • Run linear regression on stock pairs with correlation and display cointegration statistical properties
  • Display historical stock pair relationship
  • Quick & dirty backtesting for ratio and residual model trading strategies
  • Correlation matrix for a universe of stocks - work in progress

With the current setup, the program download hourly and daily OHLC stock data from Interactive Broker API. Other data provider can be used, eg.: yahoo finance.

First step is to modify config.ini so it can match your setup: add IB API IP address and the path for your historical data directory

The technology used here is Bokeh. Run the application as a web service, change to the project root directory and execute the following command:

bokeh serve .

App starts and the UI is available on "http://localhost:5006/Bokeh_Gemini"

Built With

Using the application with ineractive brokers requires ib_insync library

Roadmap

Contributing

License

Contact