A Comparison of Structural & Predictive Models in Asset Price Prediction
A Project Designed to Compare the Structural & Predictive Models in Asset Price Prediction!
Explore the Docs »
Check Out The Model
·
Report Bug
·
Request Feature
Click to View Table of Contents
-
Welcome
to structural vs predictive models repository! This project aims to compare two distinct approaches to stock price prediction: the structural model, represented by the Capital Asset Pricing Model (CAPM), and the predictive model, represented by the Gradient Boosting Regressor (GBR). -
Introduction:
In financial modeling, two primary cultures have emerged: the structural model culture, which emphasizes economic theory and hypothesis testing, and the prediction model culture, which prioritizes statistical accuracy and data fit. This project explores these cultures through the lens of CAPM and GBR, respectively.
The goal
is to evaluate the strengths and limitations of each model in terms of theoretical grounding, predictive accuracy, and practical application.
Python
Pandas
NumPy
Matplotlib
Seaborn
YahooFinance
Monte Carlo Simulation
The dataset
used in this project includes historical stock prices and relevant financial indicators.
CAPM Implementation:
- Step 1: Download Data for Assets and Market Index
- Step 2: Calculate Returns
- Step 3: Calculate Beta for Each Asset
- Step 4: Calculate Expected Returns for Each Asset (CAPM)
- Step 5: Calculate Portfolio Expected Return using Monte Carlo Simulation
GBR Implementation:
- Step 1: Download Data for Assets and Market Index
- Step 2: Calculate Returns
- Step 3: Prepare Data for Gradient Boosting Regressor(Split the data into training and testing sets)
- Step 4: Train Gradient Boosting Regressor model on the training set.
- Step 5: Calculate Portfolio Expected Return using Monte Carlo Simulation
- Evaluate the model’s performance on the testing set.
The results
section will compare the performance of CAPM and GBR in terms of:
- Predictive accuracy
- Generalization to out-of-sample data
- Interpretability of results
This project highlights the trade-offs between the structural model (CAPM) and the predictive model (GBR). While CAPM provides insights grounded in economic theory, GBR offers superior predictive power and flexibility. The choice between these models depends on the specific requirements of the analysis.
- Clone the repo:
git clone https://github.com/ClassicCollins/structural-vs-predictive-models.git
cd structural-vs-predictive-models.git
- Install required packages:
pip install -r requirements.txt
MIT
License applies.
Collins Emezie Ugwuozor - @twitter_handle - ugwuozorcollinsemezie@gmail.com
Project Link: structural-vs-predictive-models_project
Don't forget to give the project a star! Thanks again!