A comprehensive, interactive stock market dashboard that automatically fetches stock data every 5 minutes using GitHub Actions and displays detailed financial information with interactive charts.
- GitHub Actions: Automatically fetches stock data every 5 minutes
- Real-time Updates: Data is updated continuously throughout trading hours
- Comprehensive Data: Fetches 100+ financial metrics for each stock
- Modern UI: Clean, responsive design with dark/light mode support
- Real-time Charts: Interactive 30-day price charts using Chart.js
- Detailed Modals: Click any stock for comprehensive financial analysis
- Market Overview: Summary cards showing gainers, losers, and total stocks
- Price Information: Current price, change, day range, 52-week range
- Financial Metrics: P/E ratio, market cap, dividend yield, beta
- Company Information: Sector, industry, employees, website
- Trading Data: Volume, shares outstanding, institutional ownership
- Analyst Ratings: Target prices, recommendations, analyst opinions
- Dark/Light Mode: Toggle between themes with persistent preference
- Responsive Design: Works perfectly on desktop, tablet, and mobile
- Auto-refresh: Dashboard updates every 30 seconds
- Interactive Elements: Hover effects, smooth animations, and transitions
The dashboard currently tracks these major stocks:
- AAPL - Apple Inc.
- MSFT - Microsoft Corporation
- GOOGL - Alphabet Inc.
- AMZN - Amazon.com Inc.
- TSLA - Tesla Inc.
- NVDA - NVIDIA Corporation
- META - Meta Platforms Inc.
- NFLX - Netflix Inc.
- AMD - Advanced Micro Devices
- INTC - Intel Corporation
All stock data is fetched from Yahoo Finance using the yfinance Python library, providing:
- Real-time and historical price data
- Comprehensive company information
- Financial ratios and metrics
- Analyst recommendations and target prices
git clone <your-repo-url>
cd stock-market-dashboardpip install -r requirements.txtpython fetch_stock_data.pyOpen index.html in your web browser to view the dashboard.
The automated data fetching is configured in .github/workflows/fetch-stock-data.yml:
- Schedule: Runs every 5 minutes (
*/5 * * * *) - Manual Trigger: Can be triggered manually via GitHub Actions
- Dependencies: Automatically installs Python and required packages
- Data Storage: Saves data to
data/stocks.jsonanddata/summary.json - Auto-commit: Automatically commits updated data to the repository
stock-market-dashboard/
βββ index.html # Main dashboard page
βββ script.js # Interactive JavaScript functionality
βββ styles.css # Custom CSS styles
βββ fetch_stock_data.py # Python script for fetching stock data
βββ requirements.txt # Python dependencies
βββ README.md # This file
βββ .github/
β βββ workflows/
β βββ fetch-stock-data.yml # GitHub Actions workflow
βββ data/
βββ stocks.json # Comprehensive stock data
βββ summary.json # Market summary data
Each stock contains:
- Basic info (symbol, name, sector, industry)
- Price data (current, change, ranges)
- Financial metrics (P/E, market cap, ratios)
- Trading information (volume, shares)
- Company details (employees, website, business summary)
- Historical data (30-day price chart data)
Contains:
- Last updated timestamp
- Market summary (gainers, losers, total stocks)
- Array of all stock data
Edit the symbols list in fetch_stock_data.py:
symbols = ['AAPL', 'MSFT', 'GOOGL', 'AMZN', 'TSLA', 'NVDA', 'META', 'NFLX', 'AMD', 'INTC', 'NEW_STOCK']Modify the cron schedule in .github/workflows/fetch-stock_data.yml:
cron: '*/5 * * * *' # Every 5 minutes
# cron: '0 */1 * * *' # Every hour
# cron: '0 0 * * *' # Daily- Edit
styles.cssfor custom CSS - Modify
index.htmlfor layout changes - Update
script.jsfor functionality changes
- β Chrome/Chromium (recommended)
- β Firefox
- β Safari
- β Edge
- β Mobile browsers
- Data Fetching: ~30 seconds for all stocks
- Dashboard Load: <2 seconds
- Auto-refresh: Every 30 seconds
- Chart Rendering: <1 second
- Check GitHub Actions workflow status
- Verify yfinance library is working
- Check for API rate limiting
- Ensure Chart.js is loaded
- Check browser console for errors
- Verify historical data exists
- Clear browser cache
- Check CSS file loading
- Verify Tailwind CSS is accessible
- Fork the repository
- Create a feature branch
- Make your changes
- Test thoroughly
- Submit a pull request
This project is open source and available under the MIT License.
For issues and questions:
- Check the troubleshooting section
- Review GitHub Actions logs
- Open an issue on GitHub
Note: This dashboard is for educational and informational purposes only. Stock data may be delayed and should not be used as the sole basis for investment decisions.