A simple, real-time stock ticker web application that displays simulated price updates for the top 50 S&P 500 companies.
- Real-time price updates for 50 major stocks
- Dark, professional UI with scrollable stock list
- Interactive line chart for comparing multiple stocks
- Sort stocks by price (high/low), percentage change, or default order
- Select up to 10 stocks to plot simultaneously on the chart
- Visual indicators for price movements (green for up, red for down)
- Pause/resume automatic updates
- Manual refresh option
- Configurable server port
- Python 3.7 or higher
- pip (Python package manager)
- Install dependencies:
pip install -r requirements.txt- Run the application (default port 5000):
python app.py- Open your browser and navigate to:
http://localhost:5000
To run on a different port, use the --port flag:
python app.py --port 8080Then visit http://localhost:8080
- The stock prices update automatically every 2 seconds with simulated market movements
- Click Pause Updates to stop automatic refreshes
- Click Refresh Now to manually update prices
- Use the filter buttons at the top of the sidebar to sort stocks:
- Default: Original order
- Price High: Highest price first
- Price Low: Lowest price first
- % Change: Largest absolute percentage change first
- Click on stock cards to add them to the comparison chart (up to 10 stocks)
- Click again to remove stocks from the chart
- Green borders indicate price increases, red borders indicate decreases
- Backend: Python with Flask
- Frontend: Vanilla JavaScript with HTML5/CSS3
- Charting: Chart.js
- Data: Simulated price movements for demonstration purposes
The application includes 50 stocks from various sectors:
- Technology (AAPL, MSFT, GOOGL, NVDA, etc.)
- Healthcare (LLY, UNH, JNJ, etc.)
- Financial Services (JPM, V, MA, etc.)
- Consumer Goods (WMT, KO, PEP, etc.)
- Energy (XOM, CVX, COP, etc.)
- And many more...
Prices start at realistic values and fluctuate randomly between -2% and +2% per update to simulate market activity.
- This is a demonstration application with simulated data
- Price movements are random and do not reflect real market conditions
- For production use with real data, integrate with a financial data API (e.g., Alpha Vantage, Yahoo Finance, IEX Cloud)
