A desktop GUI application built with Python and tkinter that allows you to track real-time stock prices and view historical price charts.
- Real-time Price Updates: Get current stock prices with automatic refresh every 30 seconds
- Price History Charts: View 30-day price history charts for selected stocks
- Multiple Stock Tracking: Add and remove multiple stocks from your watchlist
- Persistent Storage: Your tracked stocks are saved and restored when you restart the app
- Color-coded Changes: Price changes are displayed in green (up) or red (down)
- Company Information: View company names alongside stock symbols
- Python 3.8 or higher
- Required Python packages (see requirements.txt):
- yfinance
- matplotlib
- pandas
- numpy
- Clone or download this project to your local machine
- Navigate to the project directory
- Create a virtual environment:
python3 -m venv venv
- Activate the virtual environment:
source venv/bin/activate # On macOS/Linux # or venv\\Scripts\\activate # On Windows
- Install the required dependencies:
pip install -r requirements.txt
-
Easy way: Run the shell script (recommended):
./run.sh
-
Manual way: Activate virtual environment and run:
source venv/bin/activate export TK_SILENCE_DEPRECATION=1 python run_stock_tracker.py
-
Adding Stocks:
- Click the "Add Stock" button
- Enter a valid stock symbol (e.g., AAPL, GOOGL, MSFT, TSLA)
- The stock will be added to your watchlist
-
Viewing Stock Information:
- Click on any stock in the left panel
- View current price, change, and company information
- See the 30-day price history chart on the right
-
Removing Stocks:
- Select a stock from the list
- Click the "Remove Stock" button
-
Auto-refresh:
- The app automatically refreshes stock data every 30 seconds
- You can disable/enable this feature using the checkbox
- Use "Refresh All" button for manual refresh
You can track stocks from major exchanges. Some popular symbols include:
- Tech: AAPL (Apple), GOOGL (Google), MSFT (Microsoft), TSLA (Tesla)
- Finance: JPM (JPMorgan), BAC (Bank of America), WFC (Wells Fargo)
- Retail: AMZN (Amazon), WMT (Walmart), TGT (Target)
- ETFs: SPY (S&P 500), QQQ (NASDAQ), VTI (Total Stock Market)
This application uses Yahoo Finance data through the yfinance library. The data is free but may have slight delays and is subject to Yahoo Finance's terms of service.
- "Invalid stock symbol" error: Make sure you're using the correct stock ticker symbol
- Network errors: Check your internet connection
- Slow loading: Stock data fetching depends on network speed and Yahoo Finance response time
stock_tracker.py: Main application filerequirements.txt: Python dependenciestracked_stocks.json: Automatically created file to store your stock listREADME.md: This documentation file
This project is for educational purposes. Please respect Yahoo Finance's terms of service when using this application.