Aug 2024 - Dec 2024
In the rapidly evolving intersection of finance and artificial intelligence, our team embarked on an ambitious project to redefine options pricing. As part of the advanced 'Machine Learning & Applications' module, we challenged conventional methodologies by leveraging cutting-edge machine learning models to predict stock market option prices with unprecedented accuracy.
Our research focused on three powerful models: Support Vector Regression (SVR), Artificial Neural Networks (ANN), and Long Short-Term Memory networks (LSTM). By comparing these advanced techniques with traditional mathematical option pricing models, we aimed to uncover new insights and push the boundaries of financial modeling.
This project not only showcases the potential of machine learning in financial markets but also demonstrates our team's ability to apply theoretical knowledge to real-world challenges. The resulting paper, which meticulously details our methodology, findings, and analysis, stands as a testament to the innovative spirit driving the future of quantitative finance.
Options are financial derivatives that grant buyers the right, but not the obligation, to buy or sell an asset at a predetermined price. Accurate options pricing is crucial for developing effective hedging strategies, assessing potential risks, and protecting portfolios against adverse market movements. Additionally, it creates profit opportunities by identifying mispriced options in the market. However, due to market unpredictability and the complex, non-linear relationships between features, accurately pricing options remains a significant and challenging problem.
The Black-Scholes model (BSM), is a traditionally used mathematical option pricing framework, and relies on several key assumptions—constant volatility, a log-normal distribution of asset returns, and constant interest rates. These assumptions rarely hold true in real-world markets, limiting the model's ability to generalize effectively.
The inherent complexity of non-linear feature interactions in options pricing provides an opportunity to leverage machine learning (ML) models for better predictions. The ML models we employed include Support Vector Regression (SVR), Long Short-Term Memory (LSTM) networks, and Artificial Neural Networks (ANN).
Models were developed for both puts and calls and evaluated against one another on the basis of Root Mean Squared Error (RMSE), Mean Absolute Error (MAE), and coefficient of determination (R-square).
We analyzed SPX and SPXW options data, consisting of 1,021,314 rows collected at 3600 second intervals over six trading days across four months (July 2024 to October 2024). Our exploratory data analysis (EDA) revealed three key insights:
The first observation underscores the potential for machine learning to address this problem effectively. The second and third observations suggest that the market's stability during the observed period makes it well-suited for training predictive models.
The data source for this project was the Chicago Board Options Exchange.
The Black-Scholes model (BSM), developed in 1973, prices European-style options with significant and unrealistic assumptions (Constant volatility, log-normal distribution of asset returns, and assumption of constant interest rates). Insert latex formula for BSM.
This serves as our traditional baseline for comparison to evaluate performance improvements made by ML approaches.
SVR is an ML approach that aims to find a function that approximates the relationship between input features and output values. Limitations our group faced were exceptionally long running times with our large dataset.Support Vector Regression (SVR) model is an adaptation of Support Vector Machines (SVM) for regression tasks. SVR aims to find a function that approximates the relationship between input features and a continuous target variable while minimising prediction error, rather than classifying data into categories.
The SVR model outperformed BSM.
The LSTM model is designed to handle data that depends on time sequences, making it effective for tasks like time-series forecasting. The key difference from traditional neural networks is that LSTM includes memory cells and gate mechanisms, letting it retain information from previous states. This 'memory' allows the model to use historical data as context, ideally improving accuracy when predicting option prices over time. Additionally, the structure of LSTM helps avoid issues like gradient explosion or vanishing gradients that traditional RNNs face, making it reliable for long-term sequences.
Additionally, the structure of LSTM helps avoid issues like gradient explosion or vanishing gradients that traditional RNNs face, making it reliable for long-term sequences.
Our LSTM out performed our SVR, but was itself outperformed by our ANN approach below. Our group believes that our training data is a limiting factor in this situation, and with longer continuous time sequences of data performance will improve.
Our final model, the ANN, is a deep learning model comprising an input layer for data features, hidden layers for processing, and an output layer for predictions. Its adaptability lies in adjusting weights and biases via back-propagation, making it ideal for tasks like option pricing and financial modeling.
Developing this model was my key contribution. Initially, a 'Single-Stage ANN' was implemented with two hidden layers (64 and 32 nodes) and an output node for price prediction. However, this approach suffered from overfitting due to the dataset's noise, as it included numerous untraded options recorded with a closing price of zero. These zeros skewed the model and led to poor performance, necessitating a new approach.
The most effective solution I devised was the 'Two-Stage ANN'.
Stage 1: Binary Classifier - This stage predicts whether an option is buyable, filtering out irrelevant options (e.g., those with zero closing prices) to focus on tradable ones.
Stage 2: Price Regressor - The filtered data is used to predict the price of buyable options through regression.
By separating classification and regression, this approach improves focus, reduces overfitting, and enhances efficiency.
The general structure of my models was similar with differences in node number due to hyperparameter tuning. Binary Classifier ANNs had an input layer with 14 input nodes for 14 relevant features in data, 1 hidden layer with 14 to 56 units with leaky ReLU function, and 1 output node with a sigmoid function to predict option buyability. Price Regressor ANNs had an input layer with 14 input nodes for 14 relevant features in data, a hidden layer with 14 to 56 units with leaky ReLU function, and a second hidden layer with 7 to 28 units with leaky ReLU function, and 1 output node for final price prediction.
Models | RMSE (Call) | MAE (Call) | R² (Call) | RMSE (Put) | MAE (Put) | R² (Put) |
---|---|---|---|---|---|---|
BSM | 112.55 | 60.69 | 0.99 | 112.55 | 60.99 | 0.99 |
SVR | 17.20 | 4.55 | 0.99 | 44.03 | 4.58 | 0.99 |
ANN | 3.82 | 2.95 | 0.99 | 20.04 | 8.02 | 0.92 |
LSTM | 40.80 | 37.45 | 0.79 | 87.27 | 41.86 | 0.96 |
Models | RMSE (Call) | MAE (Call) | R² (Call) | RMSE (Put) | MAE (Put) | R² (Put) |
---|---|---|---|---|---|---|
BSM | 112.55 | 60.69 | 0.99 | 112.55 | 60.99 | 0.99 |
SVR | 17.06 | 6.79 | 0.99 | 13.37 | 5.29 | 0.99 |
ANN | 19.28 | 6.14 | 0.91 | 6.14 | 3.14 | 0.97 |
LSTM | 40.80 | 37.45 | 0.79 | 87.27 | 41.86 | 0.96 |
Overall, our analysis revealed that the ANN model performs best for SPX Call options and SPXW Put options, while the SVR model shows superior performance for SPX Put options and SPXW Call options. Despite achieving high R-squared values of 0.99, the Black-Scholes Model (BSM) consistently recorded the highest RMSEs and MAEs across all categories, indicating that while it explains the variance in the data reasonably well, it struggles with accuracy in absolute error terms compared to the machine learning models
Our project concludes that machine learning models hold significant potential for transforming options pricing. While traditional models like the Black-Scholes Model provide a solid foundation, they are constrained by assumptions that often fail under real market conditions.
Machine learning models such as SVR, ANN, and LSTM have demonstrated superior predictive power over BSM. However, these models require substantial time and computational resources to develop and are highly reliant on data quality. Overfitting and challenges in generalizing to extreme market conditions remain key concerns.
Nonetheless, as computational power advances and data quality improves, machine learning offers promising opportunities for more accurate and adaptive pricing strategies. Future research should explore hybrid approaches that combine the strengths of traditional and machine learning models to address current limitations in financial applications.