Inspiration
“All models are wrong, but some are useful.” — George Box
This quote captures the reality of AI in finance and serves as the philosophical foundation of AlphaSharp.
Most financial applications today excel at reporting prices. They present real-time numbers, short-term volatility, and endlessly updating charts. What they rarely provide is context. They tell us what the market is doing, but not where it is doing it—or how similar price movements can represent fundamentally different risks under different conditions.
We observed that while price tracking is trivial, understanding the underlying market regime is not. Markets behave differently during expansions, corrections, recoveries, and crises. These regimes shape volatility, correlations, drawdowns, and tail risk, yet they remain largely invisible in retail financial tools.
AlphaSharp was built to surface this invisible layer. Instead of focusing on point predictions, it models market structure, regime persistence, and uncertainty, mirroring how institutional research teams reason about financial systems—especially during periods of stress and market dislocation.
What AlphaSharp Does
AlphaSharp is a financial intelligence platform that combines market regime modeling, stock and portfolio analysis, news-driven context, and AI-assisted research into a single coherent system.
Market Regime Detection (The Invisible Context)
At the market level, AlphaSharp uses a Hidden Semi-Markov Model (HSMM) trained on S&P 500 and volatility data from 1990–2022 to classify the market into nine distinct regimes, such as Strong Bull, Correction, Bear, and Recovery.
Unlike traditional Hidden Markov Models, HSMMs explicitly model state duration, reflecting the fact that market regimes persist and evolve rather than switching randomly. This allows AlphaSharp to learn from multiple historical cycles and crashes, capturing how markets behave before, during, and after periods of extreme stress.
Probabilistic Forecasting Beyond Normal Assumptions
Most financial models implicitly assume normal (Gaussian) distributions, which significantly underestimate tail risk and fail during crises. AlphaSharp challenges this assumption.
Based on the current regime, the platform runs 2,000 Monte Carlo simulations to generate probabilistic price scenarios, producing a cone of outcomes rather than a single forecast. These simulations are designed to reflect flat-tailed and fat-tailed behavior, helping users reason about uncertainty, drawdowns, and rare but impactful events.
The goal is not prediction, but education—to show that market paths are shaped by history, structure, and regime dynamics, not just recent momentum.
Stock-Level Analysis with News Context
When analyzing an individual stock, AlphaSharp goes beyond price charts.
Each asset is evaluated within the current market regime, alongside:
- Fundamental and valuation metrics
- Growth and risk indicators
- Peer and sector comparisons
In addition, AlphaSharp aggregates recent, relevant financial news and generates concise, AI-assisted summaries that highlight key events, structural shifts, and emerging risks. This allows users to connect price behavior with underlying narratives, rather than interpreting movements in isolation.
Custom Portfolio Tracker
AlphaSharp includes a portfolio analysis layer that allows users to track custom holdings and view them through the lens of market regimes.
Instead of simply reporting portfolio returns, the system helps users understand:
- How their portfolio behaves across different regimes
- Exposure to volatility, drawdowns, and tail risk
- Sensitivity to regime transitions and stress scenarios
By combining portfolio data with simulated regime-driven outcomes, AlphaSharp enables users to stress-test portfolios against historical and modeled market conditions, turning portfolio tracking into a learning tool rather than a performance scoreboard.
AI Research Agent
At the center of AlphaSharp is an interactive AI research agent designed to function as a context-aware research partner.
Users can ask natural-language questions such as:
- “Analyze AAPL in the current regime”
- “What risks does my portfolio face if the market enters a correction?”
- “Summarize recent events affecting this sector”
The agent retrieves structured financial data, live market information, portfolio context, and news, maintaining conversational continuity across queries. Its purpose is not to provide advice, but to assist exploration, explanation, and understanding.
How We Built It
AlphaSharp is implemented as a full-stack application with a clear separation of responsibilities:
The Brain (Python & FastAPI) Handles regime detection, feature engineering, Monte Carlo simulations, stock analytics, and news aggregation using
hmmlearn,numpy,scikit-learn, andyfinance.The Orchestrator (Node.js & Express) Manages authentication, rate limiting, caching, and coordination between services. MongoDB is used for persistence and as a shared cache to reduce latency and external API usage.
The Interface (React, Vite & Tailwind CSS) Designed for clarity and narrative flow. Visualizations such as Market Regime History, probabilistic cones, stock dashboards, and portfolio views are built using Recharts to make complex statistical ideas intuitive.
Challenges We Encountered
Modeling Reality vs. Mathematical Convenience Financial markets violate many classical assumptions. Implementing HSMMs and regime-aware simulations required careful tuning to balance interpretability with realism.
Performance and Reliability Monte Carlo simulations, portfolio analysis, and live news aggregation are computationally expensive. We addressed this with multi-layer caching, background jobs, and graceful degradation.
Restraint in AI Design Avoiding buy/sell signals required deliberate design choices. We focused on context, probability, and explanation rather than prescriptive outputs.
What We’re Proud Of
- A fully functional, end-to-end financial intelligence system.
- An explainable regime model grounded in historical behavior.
- Integrated stock, portfolio, and news analysis within market context.
- A coherent narrative: Market Regime → Assets & Portfolio → News → AI Explanation
What We Learned
- Honest uncertainty builds more trust than precise predictions.
- Production systems matter as much as models.
- Context transforms raw data into understanding.
What’s Next for AlphaSharp
- Explicit Flat- and Fat-Tailed Distribution Modeling for extreme events.
- Multi-asset and sector-specific regime models.
- Deeper portfolio stress testing and historical backtesting.
- Smarter AI agent memory and user-specific research workflows.
Built With
- docker
- express.js
- fastapi
- framer-motion
- git
- hmmlearn
- langchain
- langgraph
- mongodb
- nextjs
- node.js
- numpy
- openrouter
- pandas
- react
- recharts
- render
- scikit-learn
- shadcn/ui
- tailwind-css
- tavily-search
- vercel
- vite
- yfinance


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