Skip to content
T

TradeSenti

Shows you why a stock moved. Not just that it did.

Created on 9th November 2025

T

TradeSenti

Shows you why a stock moved. Not just that it did.

The problem TradeSenti solves

TradeSage AI: Hybrid ML/LLM Analyst

1. Inspiration

We were inspired by the recent advances in hybrid AI systems and the critical gap between predictive modeling and human-like interpretation. We realized that effective investment analysis requires two distinct capabilities: pure statistical forecasting and contextual, qualitative risk assessment. This led us to design a system where a quantitative model provides the prediction, and specialized AI agents provide the structured, interpretable reasoning.

2. What it Does

TradeSage AI is a sophisticated hybrid decision engine that transforms raw trading ideas and live market data into precise, interpretable forecasts. Users input a stock ticker and relevant context (e.g., "AAPL announced record profits"), and the system orchestrates six specialized AI steps:

  • Prediction Agent (Core): Executes a trained LSTM neural network on live data and sentiment features to forecast the next-day price and percent change.
  • Contradiction Agent: Acts as the stress-test layer, identifying technical conflicts or fundamental risks that could invalidate the model's prediction.
  • Synthesis Agent: Balances the prediction's high/low confidence signal against the identified risks to assign a final, comprehensive Confidence Score and write a detailed rationale.
  • Alert Agent: Translates the quantitative forecast into an actionable signal (e.g., "High confidence buy zone").

The system delivers a predictive analysis and a dashboard showing all active forecasts, their performance metrics, and the full interpretive reasoning.

3. How We Built It

We engineered a full-stack system focused on speed and data integrity:

  • ML Prediction Engine: A custom LSTM model was trained on OHLCV data combined with FinBERT sentiment scores, encapsulating both technical patterns and market emotion.
  • AI Reasoning Layer: The sequential, six-step analytical structure is powered by the Google Gemini 1.5 Flash SDK for reliable, fast interpretation of the prediction results.
  • Data Persistence: We used MongoDB (NoSQL) for schemaless storage, perfect for efficiently saving the complex, nested JSON structure of the full analysis output.
  • Live Data Integration: The system fetches real-time stock data for technical indicator calculation and prediction input via the Alpha Vantage API.
  • Technology Stack: Python/FastAPI (Backend API), TensorFlow/Keras (ML Model), Gemini 1.5 Flash (LLM), MongoDB (Persistence), and a single-file React UI for fast demonstration.

4. Accomplishments That We're Proud Of

  • Functional Hybrid System: Creating a working, end-to-end hybrid AI system where the LSTM performs the forecast and Gemini provides the interpretable context.
  • Interpretability and Trust: Successfully transforming a raw, statistical prediction (a number) into a human-readable, actionable signal, complete with a risk-assessment layer that specifically challenges the model's own forecast.
  • Speed and Stability: The entire process—data fetch, ML prediction, and 4-step LLM interpretation—runs cleanly and efficiently, delivering a full analysis in under one minute.

5. What We Learned

  • Context is King: We learned that market forecasting requires context, confirming that the marriage of technical data with sentiment is critical.
  • MLOPs Mindset: The real engineering difficulty is not model training, but making the ML asset run reliably and instantly within a live web environment.
  • System Resilience: When dealing with multiple external components (ML files, LLM APIs, live financial APIs), robust error handling and clear component separation are essential to prevent total system failure.

6. What's Next for TradeSage AI

  • Self-Learning Loop: Implement a feedback mechanism to allow the LSTM model to learn from new data and pa

Challenges we ran into

  • ML Operationalization: The most significant hurdle was reliably integrating the custom-trained ML model. This involved solving classic deployment issues, such as debugging mismatched joblib scaler files, ensuring non-blocking asynchronous execution of the TensorFlow model within the FastAPI server, and maintaining stability even when external data feeds were delayed.
  • Model Naming and Integration: We navigated challenges in the backend migration, including integrating a bespoke ML prediction service into the existing six-step agent architecture while maintaining clean code separation.
  • Initial API Stability: Ensuring consistent, structured JSON output across all reasoning steps required precise prompt engineering and robust response parsing logic, which had to be continually adapted to the model's output style.

Tracks Applied (2)

Best Use of Gemini API

We leveraged the Google Gemini 2.5 Flash SDK as the Hybrid AI System's reasoning engine. This required a direct technolo...Read More
Major League Hacking

Major League Hacking

Best Use of MongoDB Atlas

Role in the Project: MongoDB serves as the single source of truth for persisting the entire analysis history for the use...Read More
Major League Hacking

Major League Hacking

Discussion

Builders also viewed

See more projects on Devfolio