# Stock Analysis **Repository Path**: autumn-pool/stock-analysis ## Basic Information - **Project Name**: Stock Analysis - **Description**: For our report. - **Primary Language**: Unknown - **License**: Not specified - **Default Branch**: master - **Homepage**: None - **GVP Project**: No ## Statistics - **Stars**: 0 - **Forks**: 0 - **Created**: 2025-06-29 - **Last Updated**: 2025-06-29 ## Categories & Tags **Categories**: Uncategorized **Tags**: None ## README # 📈 Microsoft Stock Price Prediction using XGBoost ## Overview This project predicts Microsoft stock prices for Q2 and Q3 2025 using XGBoost machine learning algorithm, based on financial and stock price data from 2015-2024. ## Quick Start **Option 1: Run with pre-trained model (Recommended)** ```bash pip install -r requirements.txt python visualization.py ``` **Option 2: Retrain from scratch** ```bash pip install -r requirements.txt python generate_enhanced_dataset.py python my_xgboost.py python visualization.py ``` ## Project Structure ``` ├── data/ # Raw data files ├── results/charts/ # Generated visualization charts ├── generate_enhanced_dataset.py # Data preprocessing ├── my_xgboost.py # Main ML model ├── visualization.py # Generate charts ├── enhanced_dataset.csv # Processed dataset └── xgboost_model.pkl # Trained model ``` ## Features - **Data Integration**: Combines financial data with stock technical indicators - **Feature Engineering**: Creates 11 predictive features from raw data - **XGBoost Model**: Trains regression model with hyperparameter optimization - **Visualization**: Generates 5 comprehensive analysis charts - **Future Prediction**: Forecasts Q2/Q3 2025 stock prices ## Results - **Q2 2025 Prediction**: $426.04 - **Q3 2025 Prediction**: $410.98 - **Training R² Score**: 0.9992 - **Test RMSE**: $37.03 ## Technology Stack Python • XGBoost • Pandas • NumPy • Matplotlib • Scikit-learn