A simple real-time stock price visualization project built using Python, Matplotlib, and Animation. The project simulates live stock market data and displays it as a continuously updating graph.
- π Real-time updating line chart
- π Live animation using Matplotlib
- π° Simulated stock price generation
- π Time-series visualization
- π§ Simple and clean Python implementation
- Python π
- Matplotlib π
- Matplotlib Animation π
- Random library π²
project/
βββ StockStream.py
βββ README.md
pip install matplotlibpython main.py-
The function
get_stock_price()generates a random stock price around 35000. -
Every 5 seconds:
- A new price is generated
- Data is appended to lists (
prices,times) - The graph is updated using
FuncAnimation
-
The chart continuously redraws to simulate live stock movement.
- X-axis β Time (ticks)
- Y-axis β Stock Price
- A live updating line chart showing simulated market movement
This project uses simulated data, not real stock market APIs. It is designed for learning purposes (data visualization + animation in Python).
- π Connect to real stock APIs (Yahoo Finance / Alpha Vantage)
- π Build web dashboard (Flask / Django)
- π Add indicators (moving averages, RSI)
- π¨ Add price alerts
- πΎ Save data to CSV or database
Built as a learning project to explore real-time data visualization using Python.