Coder Social home page Coder Social logo

andrew-j-millward / optionarbitragecalculator Goto Github PK

View Code? Open in Web Editor NEW
2.0 1.0 1.0 82 KB

Calculates and maximizes potential risk-free profit points in options trading on major indices.

License: GNU General Public License v3.0

Python 100.00%

optionarbitragecalculator's Introduction

OptionArbitrageCalculator

Calculates and maximizes potential risk-free profit points in options trading on major indices. Though the occurance of such anomalies is extraordinarily rare, using software such as this will help to bring to light these potential points and allow traders to take advantage of them. This application makes heavy use of multithreading and processes large amounts of information. Though it is greatly sped up through this, it can still take as much as one to ten minutes to run a single cycle, depending on your machine specifications. In all likelihood, the chances an anomaly is found on maximum premium prices is very close to zero, but if a suitable price occurs, it will likely not last long and would have resulted from volatility in the market.

Parameters

Some features of this program can be customized, namely the indices you wish to search. In the provided "user_check_symbols.txt" file, a sample of user selection space can be viewed. These user-selected inputs can be run by running the "ticker_arbitrage.py" script directly. To add more indices, simply type the ticker name, which can be found online, on a new line of the text file.

Other customizations users can work with involve the parameter in main.py for NASDAQ. Inputting "NASDAQ = True" as a parameter to the main function will switch the default S&P 500 lookup procedure of the script to the NASDAQ instead. Many of the indices on the NASDAQ do not have active options trading, so a list "ignore_symbol.txt" is prepopulated with several such symbols. If more are encountered, the program will automatically populate them into the list. Periodically, the user should run the "ticker_refresh.py" script to individually ping each ticker to check whether or not it still belongs on the ignore list. This process will take much longer than the standard refresh but will result in an accurate, single-cycle pruning process which will significantly improve performance for the other algorithm. As ticker information is not changed regularly, this will not need to be updated frequently.

A global variable exists at the top of "ticker_arbitrage.py" that allows you to toggle between the last sell price for an option contract (False) and the current ask price for buyers in the market (True). Toggling this variable will impact your odds at finding potential arbitrages with False granting increased probability, but True will allow for much quicker and responsive fulfillment of option contract purchases.

Multi-Threading Support

Depending on memory availability on your machine, you may want to reduce the "max_workers" variable on line 84 in "main.py" and line 115 in "ticker_arbitrage.py". The maximum default value is 32 for this, but you can manually raise it can be raised if you have more processing ability.

optionarbitragecalculator's People

Contributors

andrew-j-millward avatar

Stargazers

Alessandro Mecchia avatar  avatar

Watchers

 avatar

Forkers

webclinic017

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.