A comprehensive stock analysis tool that combines financial data analysis, news sentiment analysis, and social media insights to provide detailed stock comparisons and portfolio analysis.
- Stock Comparison: Compare multiple stocks with detailed financial metrics
- Portfolio Analysis: Analyze your investment portfolio with sector breakdowns and performance metrics
- News Analysis: Track and analyze news sentiment for stocks
- Social Media Integration: Monitor social media sentiment from Twitter and Reddit
- Data Export: Export analysis results in multiple formats (JSON, MD, PNG)
- Interactive CLI: User-friendly command-line interface with rich formatting
- Clone the repository:
git clone https://github.com/yourusername/gpt4o_stock_analyzer.git
cd gpt4o_stock_analyzer- Install dependencies:
pip install -r requirements.txt- Set up environment variables:
Create a
.envfile in the project root with the following variables:
OPENAI_API_KEY=your_openai_api_key
TWITTER_API_KEY=your_twitter_api_key
TWITTER_API_SECRET=your_twitter_api_secret
REDDIT_CLIENT_ID=your_reddit_client_id
REDDIT_CLIENT_SECRET=your_reddit_client_secret
python gpt4o_stock_comparator.py compare AAPL MSFT GOOGLpython gpt4o_stock_comparator.py portfolio --stocks AAPL MSFT GOOGL --weights 0.4 0.3 0.3python gpt4o_stock_comparator.py news AAPL --days 7python gpt4o_stock_comparator.py social AAPL --platform twittergpt4o_stock_comparator.py: Main script for stock comparison and analysisanalysis.py: Core analysis functionsnews.py: News gathering and sentiment analysissocial.py: Social media data collection and analysisexport.py: Data export functionalitycli.py: Command-line interface implementationutils.py: Utility functionstests/: Test suite
- Fork the repository
- Create your feature branch (
git checkout -b feature/AmazingFeature) - Commit your changes (
git commit -m 'Add some AmazingFeature') - Push to the branch (
git push origin feature/AmazingFeature) - Open a Pull Request
This project is licensed under the MIT License - see the LICENSE file for details.
- OpenAI for GPT-4 integration
- Yahoo Finance for financial data
- Twitter and Reddit APIs for social media data
- All contributors who have helped improve this project