An intelligent stock market insights platform simplifying investment decisions with AI-driven recommendations and real-time data.
FINSIGHT is an intelligent stock market insights platform designed to simplify the investment journey for both beginners and seasoned investors. The platform centralizes essential stock market data, financial news, and personalized recommendations, providing users with actionable insights to make informed decisions.
To create a user-friendly application that integrates historical stock data, real-time news sentiment analysis, and AI-driven recommendations for smarter investment decisions.
- Centralized stock market data from trusted sources like NSE India, Economic Times, and Yahoo Finance.
- Sentiment analysis of financial news headlines for real-time market insights.
- Personalized investment recommendations based on historical data, sentiment analysis, and trends.
- Portfolio management tools to track and analyze investment performance.
- Visual representation of stock trends, sentiment scores, and recommendation confidence.
- Real-time alerts for significant market fluctuations and investment opportunities.
- Stock Data Sources: NSE Website, Economic Times, Finnhub API, Google API, Yahoo Finance API.
- News Sources: NewsAPI, Reuters API.
- Data Processing:
- Text preprocessing using SpaCy.
- Semantic embeddings with SentenceTransformer.
- Numerical normalization using StandardScaler.
- Sentiment classification with fine-tuned BERT models.
- Sentiment Analysis Models:
- VADER for basic sentiment scoring.
- FinBERT for financial context analysis.
- Fine-tuned BERT models for enhanced sentiment classification.
- Summarization Model:
- Gemini for generating concise and informative summaries of financial news.
- Trend Prediction:
- Machine Learning Models: LSTM, GRU, Transformer models for time-series predictions.
- Feature Integration:
- Combines numerical stock data with semantic news embeddings and user-defined preferences.
- Frontend:
- Built with React for dynamic interfaces.
- Styled using Tailwind CSS and Bootstrap.
- Backend:
- Flask/FastAPI for API handling.
- Axios for HTTP requests.
- Deployment:
- Hosted on Vercel with model training on Google Colab and Hugging Face Spaces.
- React, Tailwind CSS, JavaScript, Bootstrap
- Python, Flask/FastAPI
- NSE Website, Economic Times, Finnhub API, Google API, Yahoo Finance API, NewsAPI, Reuters API
- Google Colab, Vercel, Hugging Face Spaces
- GitHub
- SpaCy, SentenceTransformer, VADER, FinBERT, StandardScaler, Gemini, Hugging Face Transformers
- Scrapes stock data from multiple sources.
- Updates trends dynamically for user convenience.
- Processes headlines using sentiment analysis tools (VADER, FinBERT, fine-tuned BERT models).
- Categorizes sentiments into positive, neutral, and negative.
- Utilizes Gemini to generate concise and informative summaries of financial news articles, allowing users to quickly understand key points.
- Analyzes historical trends, market sentiment, and user preferences.
- Suggests investment actions (e.g., invest, hold, avoid) with confidence scores based on sentiment analysis and market trends.
- Tracks stock purchase price, current value, profit/loss, and percentage changes.
- Provides notifications for major market shifts and investment opportunities based on AI-driven insights.
- Interactive graphs for stock trends.
- Sentiment dashboards for quick market sentiment overviews.
- Set up APIs for data aggregation (Finnhub, Google, NewsAPI, Reuters API, Yahoo Finance API).
- Automate scraping tasks for real-time updates.
- Clean and tokenize news data using SpaCy.
- Normalize numerical stock data for consistency.
- Fine-tune sentiment analysis models for accuracy.
- Train sentiment analysis models on labeled datasets.
- Fine-tune Gemini for financial news summarization.
- Fine-tune LSTM, GRU, and Transformer models for time-series predictions.
- Build Flask/FastAPI endpoints for model predictions.
- Handle user requests and serve real-time data.
- Create interactive dashboards and widgets with React.
- Use Chart.js and D3.js for graph visualizations.
- Hosting: Vercel for the web application.
- Model Training: Google Colab, Hugging Face Spaces for scalable training.
- Version Control: GitHub for code management and collaboration.
The FINSIGHT API provides programmatic access to stock market data, financial news sentiment analysis, and AI-driven investment recommendations. This documentation covers the available endpoints, authentication, request/response formats, error handling, and usage examples.
- API uses Bearer Token authentication.
- Include your API key in the
Authorizationheader as:
Authorization: Bearer YOUR_API_KEY - Obtain API keys by registering on the platform.
https://api.finsight.com/v1
- URL:
/stocks/{symbol} - Method: GET
- URL Params:
symbol=[string](required) - Stock ticker symbol (e.g., "AAPL", "TCS.NS") - Success Response:
- Code: 200
- Content:
{ "symbol": "AAPL", "price": 150.25, "change": -0.45, "volume": 1200000, "timestamp": "2024-06-01T12:00:00Z" } - Error Response:
- Code: 404 NOT FOUND
- Content:
{ "error": "Stock symbol not found" }
- URL:
/news/sentiment - Method: POST
- Body Params:
{ "symbols": ["AAPL", "GOOG"], "date_range": { "start": "2024-05-01", "end": "2024-05-31" } } - Success Response:
- Code: 200
- Content:
{ "AAPL": { "positive": 0.6, "neutral": 0.3, "negative": 0.1 }, "GOOG": { "positive": 0.5, "neutral": 0.4, "negative": 0.1 } } - Error Response:
- Code: 400 BAD REQUEST
- Content:
{ "error": "Invalid request parameters" }
- URL:
/recommendations/{user_id} - Method: GET
- URL Params:
user_id=[string](required) - Unique user identifier - Success Response:
- Code: 200
- Content:
{ "user_id": "12345", "recommendations": [ { "symbol": "AAPL", "action": "buy", "confidence": 0.85 }, { "symbol": "TSLA", "action": "hold", "confidence": 0.65 } ] } - Error Response:
- Code: 401 UNAUTHORIZED
- Content:
{ "error": "Invalid or missing API key" }
- Standard HTTP status codes are used.
- Error responses include an
errorfield with a descriptive message. - Common codes: 400 (Bad Request), 401 (Unauthorized), 404 (Not Found), 500 (Internal Server Error).
- API requests are limited to 1000 requests per minute per API key.
- Exceeding the limit returns HTTP 429 Too Many Requests.
import requests
API_KEY = "YOUR_API_KEY"
headers = {"Authorization": f"Bearer {API_KEY}"}
response = requests.get("https://api.finsight.com/v1/stocks/AAPL", headers=headers)
if response.status_code == 200:
data = response.json()
print(f"Price of AAPL: {data['price']}")
else:
print(f"Error: {response.json()['error']}")curl -H "Authorization: Bearer YOUR_API_KEY" https://api.finsight.com/v1/stocks/AAPL- Register for an API key on the FINSIGHT platform.
- Review the API endpoints and authentication method.
- Use the provided SDK examples or your preferred HTTP client to integrate.
- Handle errors and respect rate limits in your application.
- Integration with global stock markets (e.g., NYSE, NASDAQ, London Stock Exchange).
- Enhanced AI-driven recommendations using reinforcement learning and transformer-based models.
- Mobile application development for on-the-go insights.
- Advanced analytics for institutional investors.
- Automated trade execution based on AI-driven predictions.
- Expansion to include cryptocurrency and forex market insights.
- Multi-language support for international investors.
The project is currently in active development. Contributions and feedback are welcome!
- Add support for additional global stock markets.
- Improve AI recommendation models with reinforcement learning.
- Develop mobile applications for iOS and Android.
- Implement automated trade execution features.
- Expand to cryptocurrency and forex markets.
- Add multi-language support.
Q: How do I contribute to the project?
A: Please see the CONTRIBUTING.md file for detailed guidelines.
Q: Where can I report issues?
A: Use the GitHub Issues tab to report bugs or request features.
Q: Is there a code of conduct?
A: Yes, please see the CODE_OF_CONDUCT.md file.
- Fork the repository.
- Create a new branch for your feature or bug fix.
- Commit your changes and push them to your branch.
- Create a pull request detailing your contributions.
For detailed contribution guidelines, please see the CONTRIBUTING.md file.
Please use the provided issue and pull request templates to help maintainers understand your contributions and issues.
This project follows a Code of Conduct. By participating, you agree to abide by its terms.
- Clone the repository:
git clone https://github.com/fahad10inb/Stock_prediction.git - Install dependencies:
- Frontend:
npm install - Backend:
pip install -r requirements.txt
- Frontend:
- Start the development server:
- Frontend:
npm start - Backend:
python app.py
- Frontend:
This project is licensed under the MIT License. See the LICENSE file for details.
For any questions or contributions, please visit the GitHub repository.