AI-Powered Stock Sentiment and Trend Analysis SDK
Project description
📊 StockLens SDK
StockLens SDK is an AI-powered Python toolkit designed for stock sentiment analysis, news summarization, and trend prediction.
It enables traders, analysts, and developers to extract, analyze, and interpret financial insights from real-time market data using natural language processing (NLP) and machine learning.
🚀 Features
- 📰 Fetch and analyze stock market news sentiment via NLP (TextBlob)
- 🧠 Generate summaries using transformer-based models (Hugging Face BART)
- 🔊 Convert summaries to speech with gTTS for auditory insights
- 📈 Compute technical indicators like RSI, MACD, and Bollinger Bands
- ⚙️ Predict short-term stock trends using combined sentiment and technical signals
🧩 Installation
pip install stocklens-sdk
💻 Usage Example
from stocklens_sdk import analyze_sentiment, generate_summary, generate_audio
Example text
text = "Apple reported strong quarterly earnings with increased iPhone sales."
Analyze and summarize
summary = generate_summary([{"headline": "Apple Q2 Results", "summary": text}]) audio = generate_audio(summary, "AAPL")
print("Summary:", summary) print("Audio File:", audio)
🧠 Modules Overview
| Module | Description |
|---|---|
| news_fetcher.py | Fetches latest stock news via n8n webhook |
| sentiment_utils.py | Performs sentiment scoring using TextBlob |
| summarizer.py | Generates AI-powered natural summaries |
| tts_generator.py | Converts summaries to speech (MP3 format) |
| indicators.py | Computes RSI, MACD, and Bollinger Bands for trend insight |
🏗 Architecture Overview
Frontend or Marketfeed API Call ↓ Flask Backend ↓ StockLens SDK ├── Fetch News ├── Analyze Sentiment ├── Summarize Text ├── Generate Audio ↓ Returns JSON + Audio Summary
🧾 Acknowledgment
This project, StockLens – AI-Powered Stock Sentiment and Trend Analyzer, was developed with the guidance and support of the Centre of Excellence, Artificial Intelligence and Robotics (AIR).
🧑💻 Developer Notes
The SDK can be integrated with web platforms like Marketfeed as a modular AI plugin.
It can process financial data, summarize insights, and output both text and speech results.
For enterprise-scale usage, batch or async processing can be enabled.
📜 License
MIT License © 2025 — Developed by Karthik R S
🌐 Project Links
- PyPI: https://pypi.org/project/stocklens-sdk/
- GitHub: https://github.com/karthikrajesh10/stocklens_sdk
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file stocklens_sdk-1.0.1.tar.gz.
File metadata
- Download URL: stocklens_sdk-1.0.1.tar.gz
- Upload date:
- Size: 7.7 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.11.0
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
563ac9fb452672cefe47b1e70a9d378fd1ebdb039b6604e8d01555abb456844e
|
|
| MD5 |
5ad480af7e9c401eecea97a569846cb3
|
|
| BLAKE2b-256 |
f8a2104415732dd2de5325000de140e2caba29f940a4d7f6fe2bc6fb8a4cb0ac
|
File details
Details for the file stocklens_sdk-1.0.1-py3-none-any.whl.
File metadata
- Download URL: stocklens_sdk-1.0.1-py3-none-any.whl
- Upload date:
- Size: 7.6 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.11.0
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
3b8c930b2d215357358304cedfbbccefbbf6667eb11133c2e3bf030d32c092fe
|
|
| MD5 |
735928f7c391edc3df141a19c5fdc22f
|
|
| BLAKE2b-256 |
81a811d614215f37a57c09005030acae1473dcbd14c7999680b998ccf8395865
|