Inspiration
During our brainstorming sessions, we kept coming back to one phenomenon: Polymarket. In recent years, prediction markets have consistently forecasted major global events with higher accuracy than traditional news sources.
This led us to a realization: stock traders are operating with incomplete data. While they obsess over charts and earnings, they are missing the probabilistic signals that drive market sentiment. In an era of peak volatility, we realized that the new 'edge' isn't just about being the first getting the news, it's about connecting these macro probabilities directly to your portfolio. We built this project to unlock that missing dimension.
What it does
Capital bridges the gap between traditional asset data and real-time prediction probabilities. By ingesting the top 50 most active markets from Polymarket, our system executes a complex AI workflow on Gumloop to stress-test your specific portfolio against macro risks.
Beyond simple risk analysis, we utilize cosine similarity algorithms to surface non-obvious correlations. This allows users to discover specific global events, from geopolitical shifts to regulatory changes that statistically align with their holdings, providing a 360-degree view of their market exposure that traditional news feeds miss.
How we built it
We engineered Consensus Capital using a modern polyglot microservices architecture, selecting the best tool for each layer of the stack:
The Frontend (React & TypeScript)
We built a responsive, modular user dashboard using React and TypeScript. Given the complexity of the financial data and the nested JSON structures returned by our AI agents, TypeScript’s strict type safety was crucial. It allowed us to catch errors early and build a seamless visualization layer that presents complex cosine-similarity scores and risk alerts in a clean, readable format.
The Core Backend (Java Spring Boot)
For the heavy lifting, we utilized Java Spring Boot to create a scalable REST API. This layer manages user sessions and portfolio states with enterprise-grade stability. We integrated Auth0 directly into the Spring security context, enabling passwordless login and Multi-Factor Authentication (MFA) to ensure user financial data remains secure. We used MongoDB to store users' portfolios and assets, taking advantage of the performance offered by a NoSQL database.
The Data Science Engine (Java, Python)
We deployed a dedicated Java + Python microservice to handle data ingestion and vector math. This service scrapes the Polymarket API and Yahoo Finance, and computes the Cosine Similarity between user assets and global events.
AI Orchestration (Gumloop)
The intelligence layer is powered by Gumloop. We designed automated workflows that act as the decision-making brain of the app. These flows classify user stocks, filter out "noise" events (like sports betting), and generate the natural language insights that explain why a specific event matters to the user's portfolio.
Challenges we ran into
One of our biggest technical hurdles was bridging the gap between deterministic stock prices and probabilistic event data. We found that simple keyword matching was insufficient; a stock price doesn't always move strictly in line with a prediction market, making direct correlation surprisingly difficult to isolate.
This realization forced us to pivot from simple trend matching to Semantic Analysis. Instead of looking for price correlation, we implemented Cosine Similarity algorithms to match the context of a company's business model against the context of a global event. This shift allowed us to uncover hidden relationships that raw price data missed.
Accomplishments that we're proud of
Advanced Auth: We didn't just build a login screen; we implemented a complete Auth0 system in under 24 hours. This enabled Biometric Passkeys (FaceID/TouchID) and MFA right out of the box. We are proud that we could make the app incredibly secure without making it annoying for users to log in.
Smart Data Caching: To prevent hitting API limits and keep our app lightning-fast, we built a custom caching layer. This stores our heavy Cosine Similarity calculations and Polymarket data, meaning our users get instant insights without waiting for us to re-process the entire market every time they refresh the page.
Cracking the Relevance Code: We moved beyond simple keyword matching by building a Cosine Similarity engine. We are proud that our system can look at a stock like "Nvidia" and understand that a "Taiwan Blockade" event is mathematically relevant, even if the word "Nvidia" never appears in the event title.
Seamless Architecture: We successfully connected three different stacks: a Java Spring Boot backend, a Python data service, and a React/TypeScript frontend. Getting these distinct services to talk to each other flawlessly via Gumloop was a major architectural win.
What we learned
LLMs Need Strict Guardrails: We learned quickly that AI is powerful but chaotic. Getting an LLM to output clean, parsable JSON for our frontend was a challenge that taught us the importance of strict system prompting and validation layers. We realized that for AI to be useful in finance, it needs to be constrained, not just "smart."
Semantic Search: We started trying to match stocks to events using keywords, but realized it missed too much context. Learning to implement Vector Embeddings and Cosine Similarity taught us that the meaning of data is far more valuable than the text of data, especially when connecting two unrelated worlds like stocks and betting markets.
The Challenge of a "Hybrid" Stack: We learned that having a hybrid stack especially with a loose language with a more verbose language isn't always easy. By combining Java (for structure) with Python (for data science), we got some benefits but still faced issues in integration. It forced us to think about API design and inter-service communication much more deeply than a standard monolithic app would have.
Figuring Gumloop on the Fly: This was our very first time using Gumloop, and it definitely had a learning curve. However, we pushed through the initial complexity and successfully architected three distinct workflows handling everything from stock classification to complex noise filtering.
What's next for Consensus Capital
Showing more information about the insights and more actionable insights and deeper insights.
Adding our own refresh tokens with Auth0
Expand on the features of our what-if scenarios
Log in or sign up for Devpost to join the conversation.