FinanceIQ: Platform & Architecture Summary

  1. Executive Overview & Problem Statement Modern financial markets generate an overwhelming volume of unstructured data. The primary problem—often described as the 'Signal vs. Noise Crisis'—is that retail investors and small portfolio managers are drowning in information asymmetry. While institutional hedge funds spend millions scraping supply chain data, SEC filings, and alternative insights, the average investor is left reacting to context-less events.
  2. The Solution FinanceIQ acts as a sophisticated Alternative Data Sentiment Engine. It levels the playing field by automatically digesting dense SEC 10-K filings, real-time market news, and social media trends (Reddit/Twitter). Instead of just providing raw data, the platform uses advanced Explainable AI (XAI) and Large Language Models (LLMs) to extract actionable insights, score supply chain contagion risks, and identify divergences between public sentiment and actual price action.
  3. Impact & Differentiators • Tackling Information Asymmetry: Equips advanced retail investors and SME advisors with institutional-grade insights. • Divergence Detection: Flags 'Teflon Stocks' (price rises despite bad sentiment) and 'Value Traps' (price drops despite good sentiment). • Supply Chain Contagion: Doesn't just analyze a single ticker—it evaluates the downstream impact of suppliers and global events using 10-K risk factors.
  4. Technical Architecture: Backend & ML Features Applied AI & Machine Learning • Explainable AI (XAI) using Occlusion Sensitivity: The platform systematically masks features (like Volume or Opening price) flowing to the ML model to mathematically explain why a specific price forecast was made. • PyTorch LSTM Forecaster: An auto-regressive neural network that learns from the last 2 years of historical data to project a 10-day forward-looking sequence. • FinBERT Sentiment Engine: Uses Hugging Face's ProsusAI/finbert to perform deep, contextual NLP classification on financial news articles, translating headlines into precise positive/negative/neutral probabilities. • Contagion Risk Assessor (LLM): Extracts raw SEC 'Item 1A: Risk Factors' using the sec-api and commands Groq (Meta Llama 3) to strictly categorize the severity of Geopolitics, Governance, and Supply Routes. • Conversational AI Council: A dedicated LLM assistant meant entirely for summarization of technical metrics, strictly barricaded from hallucinating price predictions. Quantitative Finance & Mathematics • Monte Carlo GBM Simulations: Simulates 100 stochastic price paths over 30 days based on historical drift and daily volatility. • Options Pricing & Greeks: Implements the Black-Scholes formula to calculate live exact Greeks (Delta, Gamma, Vega, Theta, Rho) alongside a profit/loss Payoff Diagram. • Algorithmic Backtester: Evaluates historical EMA crossovers (fast EMA > slow EMA) yielding win rates and total simulated returns on an initial theoretical layout.
  5. Challenges Addressed Building this complex architecture posed several structural challenges, such as handling heavy ML models (PyTorch LSTM & FinBERT) without lagging the API. This was solved using background threading, multi-level Redis caching (TTL scaling from 5 minutes for prices up to 12 hours for ML projections), and utilizing lightweight local fallback databases (aiosqlite) to maintain real-time responsiveness. Integrating multi-provider data (yfinance, SEC, Groq) seamlessly creates the ultimate 'Information Asymmetry' breaker.

Built With

  • css
  • layer-technology-backend-flask
  • python-3.10+-data-yfinance
  • yahoo-finance-api-ai-google-gemini-2.0-flash-database-sqlite-(wal-mode)-charts-tradingview-lightweight-charts-frontend-vanilla-js
Share this project:

Updates