Sentichart AI
Live Price & Sentiment Visualization
Created on 12th October 2025
•
Sentichart AI
Live Price & Sentiment Visualization
The problem Sentichart AI solves
Sentichart AI is a high-performance financial analysis platform that fuses real-time market data with GPU-accelerated AI sentiment analysis, providing traders with actionable context behind price action.
This project was built from the ground up during a high-intensity hackathon, demonstrating rapid prototyping, advanced technical integration, and collaborative development under pressure.
🚀 The Problem We Solved
In today’s volatile market, looking at a price chart is not enough. A sudden dip or spike in a stock’s price is often a reaction to real-world events—earnings reports, regulatory announcements, or major product news.
The challenge for traders is the disconnect between price data and news data. Cross-referencing chart movements with headlines is manual and time-consuming, leading to missed insights and delayed reactions.
Our mission: build a tool that doesn’t just show what happened, but helps explain why—directly on the chart.
✨ Our Solution: Sentichart AI
Sentichart AI provides an integrated, data-rich market view. Key features:
-
📊 Interactive Candlestick Chart:
High-performance charting powered by TradingView Lightweight Charts™, supporting candles, line, and area modes. -
🧠 AI-Powered Sentiment Analysis:
Uses FinBERT (a financial-domain BERT model) to evaluate the last 30 days of news for any ticker and classify daily sentiment. -
📰 Sentiment Timeline Panel:
Instead of cluttering the chart, sentiment data is presented in a clean right-hand sidebar. Each day shows:- The overall daily sentiment (Highly Positive → Highly Negative)
- The top three news headlines for that day
- The total number of related headlines
-
📉 Technical Indicator Suite:
Configurable from the UI with live reload:- SMA
- EMA
- MACD (with its own histogram pane)
-
⏱️ Multi-Timeframe Support:
1m to 1mo intervals, toggleable via one-click controls.
Challenges we ran into
🚧 Development Journey
🧩 Environment Hell
From conflicting Python versions to VS Code interpreter chaos, environment setup consumed our first full day. We eventually consolidated to a single global Python 3.12 environment and reinstalled everything cleanly.
⚙️ GPU Integration
We made FinBERT GPU-accelerated by:
- Installing CUDA-enabled PyTorch
- Verifying GPU usage with
nvidia-smi
- Explicitly binding the model and tensors to CUDA
⚡ The FinBERT Challenge: Beating the “Too Slow” Problem
At first, we assumed AI-driven sentiment analysis would be too computationally expensive for real-time use.
FinBERT, being a large Transformer model, is known for slow inference times on CPU — and we were analyzing up to 100 headlines per ticker over a 30-day window.
Our first prototype on CPU confirmed this: each batch took 20–30 seconds to process, making it unusable.
We overcame this bottleneck through three key optimizations:
-
🚀 GPU Acceleration (PyTorch + CUDA):
Offloaded FinBERT to an RTX 4060 GPU, reducing inference time to under 2 seconds per ticker — a 15–20× speedup. -
🧠 Sentiment Caching:
Implemented in-memory caching for repeated headlines to save processing cycles. -
📅 Daily Sentiment Aggregation:
Aggregated daily results instead of headline-by-headline analysis, improving clarity and speed.
These steps turned FinBERT from a performance bottleneck into a real-time sentiment engine.
🧑💻 Collaboration Chaos: Git for the First Time
Half our team used Git for the first time — during a hackathon.
We faced:
- Merge conflicts on shared files like
index.html
- Lost commits from incorrect pulls
- Confusion over branching and pushing
We recovered by:
- Assigning ownership per module (backend, frontend, UI).
- Learning Git basics together live.
- Committing small and frequently.
- Restoring working versions via GitHub history.
By the end, the same team that struggled with Git merges was confidently collaborating in true parallel development.
🎯 Frontend Integration: The Chart–Sentiment Bridge Problem
After separate backend and frontend builds, integration became the hardest phase.
🧩 The Early Struggle — Highcharts
We first tried Highcharts, but it wasn’t robust enough:
- Performance drops on large datasets
- Weak overlay support
- Inconsistent OHLC rendering
We switched to TradingView Lightweight Charts, which offered:
- Smooth performance
- Professional-grade rendering
- Perfect control for financial overlays
⚙️ Integration Issues
- Timestamp mismatches
- Async render delays
- Tooltip desync between sentiment and candles
✅ Our Fix
- Unified timestamps in UTC
- Merged data into one payload from Flask
- Deferred rendering until all data fetched
- Synced sentiment highlights with chart hover
This finally gave Sentichart a seamless, responsive experience.
💸 The API Limitation Wall
We were restricted to free-tier APIs and libraries, including:
- NewsAPI (100 requests/day, 30-day history)
- yFinance (rate-limited)
- Hugging Face (local-only FinBERT inference)
We adapted by caching data, batching requests, and preloading sentiment for key tickers.
🔍 The Search Bar Experiment: UX Meets API Limits
To enhance usability, we built a ticker search bar.
The plan: query live stock suggestions via API and auto-complete.
But due to API limits and broken keys, we couldn’t fetch symbols dynamically.
Instead, we hardcoded popular tickers (AAPL, TSLA, MSFT, NVDA, AMZN, GOOG) for demo use.
The modular system still supports swapping to live API search later — no structural rewrite needed.
🐞 Backend Bug Hunt: The Case of the Missing Indicators
Multi-line indicators like Bollinger Bands broke because
pandas_ta
created multiple columns.We fixed this by detecting all new columns dynamically before returning data to the frontend.
⚖️ The Indicator Overload: When More Became Less
Some indicators (like Ichimoku Cloud and SuperTrend) proved unstable and unresponsive with our real-time structure.
We removed them to preserve chart fluidity and ensure consistent redraws.
The result: a stable, high-performance chart focused on reliability and clarity.
🔥 The Firewall Fiasco
Our API failed over LAN due to Windows Firewall restrictions.
We resolved it by adding an inbound rule for
python.exe
.🎨 Frontend Evolution: The Quest for Clarity
Our frontend evolved through multiple failed experiments:
- Attempt 1: Text Markers — unreadable clutter.
- Attempt 2: Histogram Bars — clean but detached from price action.
- Attempt 3: Elegant Dots — visually nice but unclear in interaction.
- ✅ Final Solution: A right-hand Sentiment Timeline Panel, combining clarity, detail, and performance.
Tracks Applied (1)
Open Track - Development
Technologies used
