A professional financial analytics platform for stock market analysis using natural language queries powered by AI.
- Natural Language Queries: Ask questions about stock data in plain English
- Interactive Dashboard: Visualize market trends and sector performance
- Data Explorer: Filter and analyze stock data with an intuitive interface
- AI-Powered Analysis: Get instant insights from Groq LLM
- Modern UI/UX: Clean, responsive interface built with Streamlit
View the StockSense Analyzer Demo (Add your deployed app link here)
-
Clone this repository:
git clone https://github.com/yourusername/stocksense-analyzer.git cd stocksense-analyzer
-
Create and activate a virtual environment:
# On Windows python -m venv venv venv\Scripts\activate # On macOS/Linux python -m venv venv source venv/bin/activate
-
Install dependencies:
pip install -r requirements.txt
-
Configure API access:
- Obtain a Groq API key from Groq's platform
- Create
.env
file and add your API key:GROQ_API_KEY=your_api_key_here CSV_FILE_PATH=data/stocks.csv RESULTS_FILE_PATH=results/analysis_results.csv
streamlit run app.py
This will start the Streamlit server and open the application in your default web browser.
For headless analysis without the web interface:
python main.py --query "What is the average P/E ratio of technology stocks?"
Available options:
--data PATH
: Path to stock data CSV file--api-key KEY
: Groq API key (if not set in environment)--query "QUERY1" "QUERY2"
: Custom queries to run--visualize
: Generate data visualizations--interactive
: Run in interactive mode
- Push your code to GitHub
- Go to Streamlit Sharing
- Connect your GitHub repository
- Add your Groq API key as a secret
- Deploy the app
- Heroku: Use the provided Procfile to deploy on Heroku
- AWS/GCP/Azure: Deploy using cloud platform services
- Docker: Use the included Dockerfile for containerized deployment
stocksense-analyzer/
│
├── data/ # Stock data files
│ └── stocks.csv # Sample stock dataset
│
├── results/ # Analysis results
│ ├── analysis_results.csv # Query results
│ └── plots/ # Generated visualizations
│
├── app.py # Streamlit web application
├── config.py # Configuration settings
├── data_processor.py # Data loading and processing
├── analyzer.py # LangChain and Groq integration
├── visualizer.py # Data visualization functions
├── main.py # CLI entry point
│
├── requirements.txt # Project dependencies
└── README.md # This file
- Python: Core programming language
- Streamlit: Web application framework
- LangChain: Framework for LLM applications
- Groq: Large Language Model provider
- Pandas: Data manipulation and analysis
- Matplotlib/Seaborn: Data visualization
- Scikit-learn: Machine learning utilities (for extensions)
- Portfolio Optimization: Add portfolio construction features
- Predictive Analytics: Implement machine learning for predictions
- Real-time Data: Connect to live market data APIs
- Sentiment Analysis: Analyze news sentiment for stocks
- Advanced Visualization: Add interactive charting with Plotly
This project is licensed under the MIT License - see the LICENSE file for details.
- Stock data curated for educational purposes
- Icons by Icons8