/options_nb

Primary LanguageJupyter Notebook

Option Trading and Analysis

A tutorial notebook that examines how options data can be scraped using Python and how that data can be implemented for trading strategies.

This walkthrough starts by first scraping put and call pricing data for commonly-traded index equities (SPY, QQQ, etc.). After the data is scraped, pandas DataFrames are put together for puts and calls. From there, we explore how to turn that code into a Class and expand upon it to implement trading strategies such as credit spreads and iron condors. Finally, we run through examples before delving into some analysis that examines the efficacies of potential strategies. By the end of this notebook, I hope that it is clearly conveyed how options can be traded in an everyday account to augment a portfolio and how such strategies would be implmented and analyzed with Python.

The table of contents, which can be found inside, is as follows:

  1. Web-scraping the option chain

  2. Other Necessary Functions/Concepts

  3. Covered Call Example

  4. Defining our strategy class

  5. Credit Spread Example

  6. Monte Carlo analysis

  7. Conclusion

The full repo can be found here: https://github.com/lbianculli/options