Machine Learning for Options Trading
This project applies machine learning and statistical analysis to options trading. The goal is to analyze whether options contracts reach predefined profit targets and to identify optimal trading setups. We utilize historical options data, perform hypothesis testing, and apply clustering techniques to structure a data-driven approach to options trading.
This repository contains four Jupyter notebooks covering different aspects of the analysis:
-
- Collects and structures intraday options data.
- Merges underlying asset prices with option prices.
- Labels options based on moneyness (ITM, ATM, OTM).
-
Notebook 2: Hypothesis Testing
- Tests whether options reach predefined profit targets (5%, 10%, 15%).
- Uses statistical significance tests (T-tests, confidence intervals).
-
- Applies logistic regression and clustering to identify profitable trade setups.
- Uses Cohen’s D for effect size measurement.
- Implements survival analysis to determine trade longevity.
-
Notebook 4: Summary & Trade Optimization
- Summarizes trade performance by ranking trades based on profitability.
- Generates a trade schedule with optimal setups.
- Clone the repository and install necessary dependencies using:
- Run each notebook sequentially to process the data, analyze profitability, and derive trade setups.
- Expanding the dataset to include more historical trades.
- Exploring additional trade setups based on different market conditions.
- Applying deep learning models for improved predictive accuracy.
This project is part of a blog series that explores the methodology in depth: