StockWhiz: Project Story

Overview

StockWhiz is a stock market prediction web application designed to provide users with interactive stock visualizations and future price predictions. By leveraging Flask, React.js, and machine learning, StockWhiz enables users to search for stocks, analyze trends, and make informed decisions.

Features

  • Real-time Stock Data: Fetches stock data from Yahoo Finance.
  • Interactive Graphs: Provides dynamic charts with search, sliders, and multiple layers for stock visualization.
  • Predictive Analytics: Uses Linear Regression to predict stock prices for the next 7 days.
  • User-Friendly Interface: Built with React.js for smooth user experience.
  • Cross-Origin Requests: Enabled through Flask-CORS for seamless frontend-backend communication.

Technology Stack

Frontend:

  • React.js
  • Chart.js (via react-chartjs-2)
  • Axios
  • Tailwind CSS (for styling)

Backend:

  • Flask
  • yFinance (for stock data retrieval)
  • Scikit-learn (for prediction modeling)
  • Pandas & NumPy (for data manipulation)
  • Flask-CORS (for API communication)

Project Workflow

  1. User Input: Users enter a stock ticker symbol (e.g., AAPL, TSLA).
  2. Data Fetching: Flask API retrieves historical stock data from Yahoo Finance.
  3. Visualization: The frontend renders a Chart.js graph displaying stock price trends.
  4. Prediction Model: The backend uses Linear Regression to forecast future stock prices.
  5. Interactive Features: Users can navigate through different timeframes and stock layers.

Challenges Faced

  • CORS Errors: Resolved by configuring Flask-CORS properly.
  • Data Formatting Issues: Ensured correct JSON serialization in API responses.
  • Frontend-Backend Connectivity: Debugged API calls using Postman before integrating them into React.
  • Graph Rendering Issues: Fixed missing dependencies and incorrect state updates in React.

Future Enhancements

  • Enhanced Predictive Models: Incorporate LSTMs for better forecasting accuracy.
  • Real-time Stock Updates: Implement WebSockets for live stock price tracking.
  • Portfolio Management: Allow users to track and manage their stock investments.
  • Mobile Optimization: Improve UI/UX for mobile responsiveness.

Conclusion

StockWhiz is an innovative step towards making stock market analysis more accessible to users. With continuous improvements, it aims to be a powerful tool for investors and market enthusiasts.


Built With

Share this project:

Updates