This Python script tracks the daily stock price of a company (default: Tesla Inc.) and sends email alerts with the latest news headlines if a significant price movement (more than 5%) is detected between two recent trading days.
- β Tracks stock prices using the Alpha Vantage API
- π° Fetches the latest news headlines via NewsAPI
- π§ Sends automatic email notifications using Gmail SMTP
- π Secure credential storage using
.env - βοΈ Easy to configure and customize
- Python 3.7+
- Alpha Vantage API Key
- NewsAPI Key
- Gmail account with App Password
- Clone the repository
- Install dependencies
- Create a .env file
- Run the script
- Python
- Alpha Vantage API
- NewsAPI
- smtplib / email.mime
- python-dotenv
- Change the stock symbol by editing STOCK_NAME
- Adjust percentage threshold if needed (> 5 in if statement)
- You can track multiple stocks by looping over a list of symbols
- This project is for educational and informational purposes only. It does not constitute financial advice.
- MIT License