Inspiration
Retail investors today bounce between broker apps, news feeds, and social media, trying to make sense of noisy, conflicting signals. Most tools either feel like black‑box quant platforms or pure hype streams with no grounding in fundamentals or risk. We wanted something in the middle: an AI layer that doesn’t tell you what to buy, but helps you understand where your portfolio is exposed and what narratives are currently driving a stock. That’s how Market Lens was born: as a way to turn scattered financial data, headlines, and posts into one coherent, explainable story for each investor.
What it does
Market Lens is a two-part fintech AI suite that acts as a copilot for understanding portfolio and stock‑level risk.
First, the Portfolio Risk Manager lets you upload a simple CSV of your holdings (ticker, quantity, average cost) and returns a 0–100 risk score, highlighting key drivers like concentration, volatility, sector exposure, and basic fundamental red flags. It then generates plain‑English explanations and high‑level, non‑advisory suggestions (for example, “You are heavily concentrated in one sector, which makes you sensitive to sector‑specific shocks”).
Second, the Stock Context Panel analyzes a single ticker by pulling fundamentals, recent news, and high‑impact social content, and summarizes whether the current narrative looks more bullish, bearish, or neutral, along with why.
Together, these two views give retail investors a fast way to see both numeric risk and narrative risk for their portfolios.
How we built it
On the backend, we built a FastAPI service in Python that ingests CSV portfolios, fetches or reads cached price and fundamentals data, and computes key metrics like portfolio value, position weights, simple 30‑day volatility, concentration, sector exposure, and a small set of fundamental indicators.
These raw metrics are normalized into sub‑scores (concentration, volatility, fundamental risk, liquidity) and combined into a single 0–100 risk score using a transparent formula.
For per‑ticker analysis, another endpoint retrieves fundamentals and the latest news headlines/snippets from APIs or cached datasets, and combines them with a curated set of social posts (for the hackathon, we used a mix of real and mocked examples to handle rate limits).
Both flows then send structured JSON into an LLM that produces explanations, news impact labels (High/Medium/Low), and social sentiment summaries, which the React frontend renders as expandable cards showing both numbers and narrative side by side.
Challenges we ran into
The biggest challenge was working with financial data in real time under hackathon constraints while staying within API limits and terms of service. We had to strike a balance between live data and pre‑cached examples so that our demo would be reliable even on shaky Wi‑Fi or limited quotas.
Prompt design was another major challenge: we needed the LLM to stay strictly in an explanatory, non‑advisory role and to always ground its narrative in the numeric evidence we provided.
Finally, the UX had to stay simple enough for a judge to understand in seconds, while still exposing enough detail that more advanced users could expand cards and inspect the underlying metrics and sources.
Accomplishments that we’re proud of
We’re proud that a user can go from a raw spreadsheet of tickers to an interpretable risk score and human‑readable explanation in a single upload.
Every insight in the app is traceable: when the AI says “high concentration risk,” the UI shows the actual weights of the top holdings and sectors that led to that conclusion. The same applies to news and social: headlines and posts are always visible with source links, alongside the model’s impact and sentiment labels, so users and judges can verify what the AI is looking at.
Building this end‑to‑end loop—from data to metrics to explainable narrative—within a short hackathon window is the part of Market Lens we’re most excited about.
What we learned
We learned how crucial structured intermediate representations are for reliable AI behavior in fintech: instead of sending raw text, we pass JSON with clearly defined metrics and flags, then let the LLM focus on explanation instead of calculation.
We also got a crash course in the realities of financial data: APIs have rate limits, ToS constraints, and coverage gaps, so you need caching strategies and sensible fallbacks for a smooth demo.
On the UX side, we saw how much more comfortable users feel when every AI statement is backed by visible numbers and sources, especially in a sensitive domain like investing.
What’s next for Market Lens
Next, we want to turn the Stock Context Panel into a full Chrome extension that detects when a user is on a stock or broker page and overlays Market Lens insights directly in context.
We also plan to expand beyond equities to include ETFs and other asset classes, add more sophisticated risk models (for example, factor exposure and anomaly detection), and support alerts when a portfolio’s risk score or narrative shifts materially.
Longer term, our goal is to make Market Lens a trusted, educational companion that helps retail investors understand why their portfolios behave the way they do, not just what the price is today.


Log in or sign up for Devpost to join the conversation.