Skip to content

ClassicCollins/structural-vs-predictive-models

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

16 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

structural-vs-predictive-models

A Comparison of Structural & Predictive Models in Asset Price Prediction

MIT License LinkedIn Twitter


CAPM vs Gradient Boosting Regressor

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
  1. Overview
  2. Conclusion
  3. License
  4. Contact
  5. Acknowledgments

Overview

Product Name Screen Shot

  • 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.

(back to top)

Project Goal

The goal is to evaluate the strengths and limitations of each model in terms of theoretical grounding, predictive accuracy, and practical application.

Tools and Libraries

  • Python
  • Pandas
  • NumPy
  • Matplotlib
  • Seaborn
  • YahooFinance
  • Monte Carlo Simulation

(back to top)

Data

The dataset used in this project includes historical stock prices and relevant financial indicators.

Implimentation

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.

(back to top)

Results

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

(back to top)

Conclusion

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.

Installation Steps

  1. Clone the repo:
    git clone https://github.com/ClassicCollins/structural-vs-predictive-models.git
    cd structural-vs-predictive-models.git
  2. Install required packages:
    pip install -r requirements.txt

(back to top)

License

  • MIT License applies.

(back to top)

Contact

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!

(back to top)

Acknowledgments

(back to top)

About

A Comparison of Structural & Predictive Models in Asset Price Prediction: CAPM vs Gradient Boosting

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published