Skip to content

Aakashgone10/stock_price_prediction

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

4 Commits
 
 
 
 
 
 
 
 

Repository files navigation

Stock Price Prediction and Analysis Using Regression Models

This project involves predicting the stock prices of Apple Inc. using historical data and various regression techniques. The models were implemented and evaluated using Python, with a focus on Linear Regression, Ridge Regression, and Lasso Regression.

Technologies Used

  • Python
  • NumPy
  • Pandas
  • Matplotlib
  • scikit-learn

Project Overview

1. Data Collection

  • Historical stock price data for Apple Inc. was obtained from Yahoo Finance in CSV format.

2. Data Preprocessing

  • Processed and visualized stock price data.
  • Calculated moving averages to smoothen stock price trends.
  • Analyzed return deviation to understand price fluctuations.

3. Model Building

  • Implemented three regression models:
    • Linear Regression
    • Ridge Regression
    • Lasso Regression
  • Split the data into training (80%) and testing (20%) sets.

4. Performance Evaluation

  • Evaluated model performance using the testing data.
  • Compared the accuracy of the three regression models.
  • Identified the best-performing model based on the accuracy score.

5. Visualization

  • Visualized the actual vs. predicted stock prices.
  • Plotted moving averages alongside adjusted closing prices.
  • Displayed future stock price predictions for a 30-day period.

Results

  • The model that performed best was the Lasso Regression, achieving an accuracy score of 96.3%.

Conclusion

This project demonstrates the application of regression models for stock price prediction and highlights the importance of data visualization and model evaluation in financial forecasting.


Note: The historical stock price data used in this project was sourced from Yahoo Finance and is intended for educational and illustrative purposes only.

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published