This is a program that will find certain arbitrage opportunities for a given input of stocks. In particular, this program looks for situations where put-call parity does not hold. These situations arise when the difference in price between a call option and a put option of the same stock, expiry, and strike price does not equal to the difference in price between the spot price and the strike price. The reason why an arbitrage opportunity arises here is that synthetic put and call options can be generated by shorting the stock and purchasing a call and buying the underlying and purchasing a put respectively. If the formula does not hold, this means there is an opportunity to buy low and sell high, as the option and its corresponding synthetic are not priced equally. More info can be found here.
-
Command Line: Run the main module of the package on an input .csv file containing comma separated names of the stocks to check opportunities for.
pip install -r requirements.txt python src stock_names.csv
-
Flask: In command line set up flask app as flaskr, run flask, and head to the url. There will be a search bar to input the name of a stock to check opportunities for.
pip install -r requirements.txt export FLASK_APP=flaskr flask run