VibeQuant
AI-Powered Institutional-Grade Financial Intelligence Platform
🌐 Live Demo: www.vquant.ai
The hero adapts to your GitHub theme — just like the app adapts to yours. 🌗
Stack
AI & Data
Database & ORM
Quality & Testing
Metrics
Screenshots • Getting Started • Features • Architecture • API Reference • Contributing
Overview
VibeQuant is a production-grade full-stack financial analysis platform that combines Claude AI (Fable 5 default, 6 selectable models, up to 1M token context) with 265+ financial data endpoints, quantitative Python analysis (Monte Carlo, GARCH, VaR, Black-Scholes, portfolio optimization), and multi-source web research (Tavily, Firecrawl, Exa, SerpAPI) to deliver institutional-grade insights through a real-time streaming conversational interface.
Built with a modern TypeScript stack (React 18 + Vite + Express + Drizzle ORM), validated with Zod schemas, tested with Vitest, and linted with ESLint + Prettier.
Screenshots
📸 Captured live from www.vquant.ai
Features
Financial Data Engine
| Category | Endpoints | Details |
|---|---|---|
| Company Fundamentals | 40+ | Profiles, income statements, balance sheets, cash flows, key metrics, financial ratios, growth rates |
| Market Data | 30+ | Real-time quotes, historical prices, intraday data, batch quotes, market hours, gainers/losers/actives |
| Technical Analysis | 15+ | RSI, MACD, EMA, SMA, ADX, Williams %R, CCI, Stochastic, WMA, DEMA, TEMA, Bollinger Bands |
| Analyst & Ratings | 20+ | Estimates, price targets, upgrades/downgrades, consensus, historical grades, ratings snapshots |
| Insider & Institutional | 15+ | Insider trading, institutional holders, 13F filings, Senate/House trading, beneficial ownership |
| Economic & Macro | 15+ | Economic calendar, Treasury rates, economic indicators, market risk premium, COT reports |
| SEC & Compliance | 25+ | SEC filings (8-K, 10-K, 10-Q), EDGAR search, company notes, earnings transcripts |
| Alternative Data | 20+ | ESG scores, social sentiment, Congressional trading, crowdfunding, equity offerings |
| ETFs & Indices | 15+ | ETF holdings, sector weightings, S&P 500/NASDAQ/Dow Jones constituents |
| Valuation | 10+ | DCF, levered DCF, custom DCF, enterprise values, owner earnings, financial scores |
| Forex & Crypto | 15+ | Forex pairs, crypto quotes, commodity prices, historical forex data |
| Events | 10+ | Earnings calendar, IPO calendar, dividend history, stock splits, mergers & acquisitions |
Quantitative Analysis Engine
| Model | Description | Libraries |
|---|---|---|
| Monte Carlo Simulation | Price path simulation with customizable parameters (10k+ paths, configurable horizon) | numpy, scipy |
| Options Pricing | Black-Scholes model with full Greeks (delta, gamma, theta, vega, rho) | scipy.stats |
| GARCH Volatility | Volatility modeling and forecasting with GARCH(1,1) | arch, statsmodels |
| Value at Risk (VaR) | Historical, parametric, and Monte Carlo VaR at multiple confidence levels | numpy, scipy |
| Portfolio Optimization | Mean-variance optimization (Modern Portfolio Theory), efficient frontier | cvxpy, scipy.optimize |
| Risk Metrics | Sharpe, Sortino, Calmar, max drawdown, beta, alpha, information ratio | numpy, pandas |
| Custom Python | Arbitrary Python code execution with access to 17 libraries and FMP data | All libraries |
Full Python library list (17 packages)
| Library | Version | Purpose |
|---|---|---|
numpy |
latest | Numerical computing |
pandas |
latest | Data manipulation |
scipy |
latest | Scientific computing |
scikit-learn |
latest | Machine learning |
statsmodels |
latest | Statistical models |
matplotlib |
latest | Plotting & charts |
seaborn |
latest | Statistical visualization |
plotly |
latest | Interactive charts |
arch |
latest | GARCH models |
cvxpy |
latest | Convex optimization |
yfinance |
latest | Market data |
ta |
latest | Technical analysis |
quantstats |
latest | Portfolio analytics |
beautifulsoup4 |
latest | Web scraping |
requests |
latest | HTTP client |
lxml |
latest | XML/HTML parsing |
Pillow |
latest | Image processing |
Web Research Engine
AI Agent
| Feature | Details |
|---|---|
| Models | 6 selectable Claude models — Fable 5 (default), Opus 4.8 / 4.7 / 4.6, Sonnet 4.6, Haiku 4.5 — up to 1M token context |
| Model Selector | Switchable from the input bar and the welcome screen (per-model icons); selection persisted in localStorage |
| Reasoning | Adaptive extended thinking shown in a collapsible "Raisonnement" widget that auto-expands while the model thinks (Fable 5 / Opus / Sonnet; Haiku has no adaptive thinking) |
| Tools | 213 specialized financial tools |
| Batching | Intelligent tool batching (5 tools per batch with 500ms pauses) |
| Streaming | Real-time Server-Sent Events (SSE) for instant response display |
| History | Persistent conversation sessions with token tracking |
| Vision | Image analysis support (charts, screenshots, documents) |
| Cost Tracking | Per-session input/output token counting and cost estimation |
Interface & Design
| Aspect | Details |
|---|---|
| Theme | Modern light/dark themes with an indigo-violet accent; toggle persisted in localStorage |
| Design | Rounded soft-cornered components, subtle background gradient, thin rounded scrollbars |
| Welcome screen | Categorized example prompts + dedicated model selector with per-model icons |
| Stack | Tailwind CSS 3.4 + Radix UI primitives |
Export & Reports
Getting Started
Prerequisites
Installation
# Clone the repository
git clone https://github.com/spboucher-ai/vquant.git
cd vquant
# Install Node.js dependencies
npm install
# Set up Python virtual environment
python3 -m venv .venv
source .venv/bin/activate # macOS/Linux
# .venv\Scripts\activate # Windows
pip install -r requirements-safe.txt
# Configure environment variables
cp .env.example .env
# Edit .env with your API keys
# Start development server
npm run devThe app will be available at http://localhost:5000.
API Keys
All services offer generous free tiers:
| Service | Sign Up | Free Tier | Required |
|---|---|---|---|
| console.anthropic.com | $5 credit | Yes | |
| financialmodelingprep.com | 250 calls/day | Yes | |
| firecrawl.dev | 500 credits | Recommended | |
| app.tavily.com | 1000 calls/month | Recommended | |
| exa.ai | 1000 searches/month | Optional | |
| serpapi.com | 100 searches/month | Optional |
Scripts
| Command | Description |
|---|---|
npm run dev |
Start development server (Vite HMR + Express) |
npm run build |
Build for production (client + server) |
npm start |
Start production server |
npm run typecheck |
TypeScript type checking (tsc --noEmit) |
npm run lint |
ESLint check |
npm run lint:fix |
ESLint auto-fix |
npm run format |
Prettier format all files |
npm run format:check |
Prettier check (CI-friendly) |
npm test |
Run all tests (Vitest) |
npm run test:watch |
Run tests in watch mode |
npm run test:coverage |
Run tests with coverage report |
npm run db:push |
Push database schema changes (Drizzle Kit) |
Architecture
vquant/
├── client/src/ # Frontend (React + TypeScript)
│ ├── App.tsx # Router + providers + ErrorBoundary
│ ├── main.tsx # Entry point
│ ├── config.ts # App config, endpoints, feature flags
│ ├── components/
│ │ ├── chat/ # 13 chat-specific components
│ │ │ ├── search-bar.tsx # Query input with image support
│ │ │ ├── streaming-answer.tsx # Real-time markdown rendering
│ │ │ ├── agent-steps.tsx # Tool execution progress
│ │ │ ├── tool-results.tsx # Financial data display
│ │ │ ├── monte-carlo-results.tsx # Simulation visualizations
│ │ │ ├── share-button.tsx # Report sharing
│ │ │ ├── download-buttons.tsx # PDF/DOCX export
│ │ │ └── ... # + 6 more components
│ │ ├── explore/ # 7 stock explorer components
│ │ ├── financial/ # Price charts, options pricing
│ │ ├── ui/ # 35 shadcn/ui primitives
│ │ └── error-boundary.tsx # Global error handler
│ ├── hooks/
│ │ ├── useChatSession.ts # All chat state & business logic
│ │ ├── useChatMutation.ts # SSE streaming client
│ │ ├── useAnalytics.ts # Heartbeat tracking
│ │ ├── use-toast.ts # Toast notifications
│ │ └── use-mobile.tsx # Responsive detection
│ ├── pages/ # 9 route pages
│ │ ├── home.tsx # Main chat interface (255 lines)
│ │ ├── explore.tsx # Stock explorer
│ │ ├── admin.tsx # Admin dashboard
│ │ ├── auth.tsx # Login/register
│ │ ├── showcase.tsx # Community reports
│ │ ├── shared-report.tsx # Shared report viewer
│ │ ├── documentation.tsx # API documentation
│ │ └── ... # + privacy, terms, slides, 404
│ ├── lib/
│ │ ├── queryClient.ts # TanStack Query config
│ │ └── utils.ts # cn() + helpers
│ └── utils/
│ ├── chartCapture.ts # Chart-to-image conversion
│ └── pdfGenerator.ts # Client-side PDF generation
│
├── server/ # Backend (Express + TypeScript)
│ ├── index.ts # Server bootstrap, CORS, sessions
│ ├── routes.ts # /api/chat (SSE streaming) + speech-to-text
│ ├── routes/
│ │ ├── auth.ts # /api/auth/* (register, login, logout, me)
│ │ ├── admin.ts # /api/admin/* (database, CRUD) + requireAdmin
│ │ ├── analytics.ts # /api/analytics/* (heartbeat, active users, metrics)
│ │ ├── fmp.ts # /api/fmp/* (23 financial data endpoints)
│ │ ├── reports.ts # /api/share/*, sessions, PDF/DOCX/slides, download
│ │ └── validation.ts # Zod request schemas
│ ├── services/
│ │ ├── claude/
│ │ │ ├── toolDefinitions.ts # 213 tool definitions (4,480 lines)
│ │ │ └── tokenManagement.ts # Context window management
│ │ ├── claudeService.ts # Claude API integration
│ │ ├── fmpService.ts # 230 FMP API wrapper functions
│ │ ├── python/
│ │ │ ├── monteCarlo.ts # Monte Carlo simulation
│ │ │ ├── optionsPricing.ts # Black-Scholes pricing
│ │ │ ├── garch.ts # GARCH volatility model
│ │ │ ├── var.ts # VaR + portfolio + risk metrics
│ │ │ └── shared.ts # Python executor config
│ │ ├── *.py # 11 Python scientific services
│ │ ├── firecrawlService.ts # Web extraction
│ │ ├── tavilyService.ts # AI search
│ │ ├── exaService.ts # Semantic search
│ │ └── serpapiService.ts # Google search
│ ├── db.ts # Drizzle ORM (SQLite + PostgreSQL)
│ ├── storage.ts # Typed data access layer
│ ├── types/
│ │ └── modules.d.ts # Module declarations
│ └── utils/
│ └── logger.ts # Structured logging
│
├── shared/ # Shared between client & server
│ ├── schema.ts # PostgreSQL schema (Drizzle)
│ ├── schema-sqlite.ts # SQLite schema (Drizzle)
│ └── types.ts # API interfaces (SearchResult, etc.)
│
├── vitest.config.ts # Test configuration
├── eslint.config.js # ESLint flat config
├── vite.config.ts # Vite build config
├── tsconfig.json # TypeScript config
├── tailwind.config.ts # Tailwind CSS config
├── .prettierrc # Prettier config
├── .editorconfig # Editor config
├── .env.example # Environment template
└── .gitignore # Git ignore rulesSystem Architecture
┌──────────────────────────────────────────────────────────────────┐
│ CLIENT (React 18) │
│ ┌──────────┐ ┌──────────────┐ ┌────────────┐ ┌───────────┐ │
│ │ Chat UI │ │ Explore Page │ │ Admin Panel│ │ Auth/Docs │ │
│ │ (SSE) │ │ (FMP data) │ │ (Analytics)│ │ (Sessions)│ │
│ └────┬─────┘ └──────┬───────┘ └─────┬──────┘ └─────┬─────┘ │
│ │ │ │ │ │
│ ┌────┴───────────────┴────────────────┴───────────────┴─────┐ │
│ │ TanStack Query + useChatSession │ │
│ └───────────────────────────┬───────────────────────────────┘ │
└──────────────────────────────┼──────────────────────────────────┘
│ HTTP / SSE
┌──────────────────────────────┼──────────────────────────────────┐
│ SERVER (Express 4) │
│ ┌───────────────────────────┴───────────────────────────────┐ │
│ │ Route Modules (6) │ │
│ │ auth │ admin │ analytics │ fmp │ reports │ chat (SSE) │ │
│ └───┬───────┬──────────┬──────────┬──────────┬──────────────┘ │
│ │ │ │ │ │ │
│ ┌───┴───┐ ┌─┴──────┐ ┌┴────────┐ │ ┌─────┴──────────────┐ │
│ │Storage│ │Analytics│ │Zod Valid│ │ │ Claude Opus 4.8 │ │
│ │(Drizzle)│ │Metrics │ │Schemas │ │ │ 213 tools │ │
│ └───┬───┘ └────────┘ └────────┘ │ │ 5-tool batching │ │
│ │ │ └──────────┬──────────┘ │
│ ┌───┴──────┐ ┌─────┴──────┐ ┌─────┴──────────┐ │
│ │SQLite/PG │ │ FMP Service│ │ Python Engine │ │
│ │(Drizzle) │ │ 230 funcs │ │ 17 libraries │ │
│ └──────────┘ └────────────┘ └────────────────┘ │
│ │
│ ┌────────────────────────────────────────────────────────────┐ │
│ │ External APIs │ │
│ │ Tavily │ Firecrawl │ Exa │ SerpAPI │ ElevenLabs │ │
│ └────────────────────────────────────────────────────────────┘ │
└─────────────────────────────────────────────────────────────────┘API Reference
Chat (SSE Streaming)
| Method | Endpoint | Description |
|---|---|---|
POST |
/api/chat |
Main AI chat with streaming (Server-Sent Events) |
POST |
/api/speech-to-text |
Audio transcription (ElevenLabs Scribe) |
Authentication
| Method | Endpoint | Description |
|---|---|---|
POST |
/api/auth/register |
Create account (generates unique token) |
POST |
/api/auth/login |
Authenticate with token |
POST |
/api/auth/logout |
End session |
GET |
/api/auth/me |
Get current user |
Shared Reports & Sessions
| Method | Endpoint | Description |
|---|---|---|
GET |
/api/shared-reports |
List all shared reports |
POST |
/api/share |
Create shareable report |
GET |
/api/share/:shareId |
Get shared report |
GET |
/api/sessions |
List user sessions |
GET |
/api/sessions/:id |
Get session with messages |
Document Generation
| Method | Endpoint | Description |
|---|---|---|
POST |
/api/generate-pdf |
Markdown to PDF (Puppeteer) |
POST |
/api/generate-docx |
Markdown to DOCX (Pandoc) |
POST |
/api/convert-to-slides |
Markdown to Beamer LaTeX PDF |
GET |
/api/download/:filename |
Download data file |
Financial Data (FMP)
| Method | Endpoint | Description |
|---|---|---|
GET |
/api/fmp/quote/:symbol |
Real-time stock quote |
GET |
/api/fmp/company-profile/:symbol |
Company profile |
GET |
/api/fmp/historical-price/:symbol |
Historical prices |
GET |
/api/fmp/intraday/:symbol |
Intraday price data |
GET |
/api/fmp/income-statement/:symbol |
Income statement |
GET |
/api/fmp/balance-sheet/:symbol |
Balance sheet |
GET |
/api/fmp/cash-flow/:symbol |
Cash flow statement |
GET |
/api/fmp/key-metrics/:symbol |
Key financial metrics |
GET |
/api/fmp/financial-ratios/:symbol |
Financial ratios |
GET |
/api/fmp/analyst-estimates/:symbol |
Analyst estimates |
GET |
/api/fmp/price-target/:symbol |
Price targets |
GET |
/api/fmp/insider-trading/:symbol |
Insider trades |
GET |
/api/fmp/institutional-holders/:symbol |
Institutional holders |
GET |
/api/fmp/earnings-surprises/:symbol |
Earnings surprises |
GET |
/api/fmp/dividend-history/:symbol |
Dividend history |
GET |
/api/fmp/esg-score/:symbol |
ESG score |
GET |
/api/fmp/financial-news/:symbol |
Financial news |
GET |
/api/fmp/upgrades-downgrades/:symbol |
Analyst upgrades/downgrades |
GET |
/api/fmp/gainers |
Top market gainers |
GET |
/api/fmp/losers |
Top market losers |
GET |
/api/fmp/actives |
Most active stocks |
GET |
/api/fmp/market-hours |
Market hours |
GET |
/api/fmp/chart/light/:symbol |
Lightweight chart data |
Analytics & Admin
| Method | Endpoint | Description |
|---|---|---|
POST |
/api/analytics/heartbeat |
Update user activity |
GET |
/api/analytics/active-users |
Active users (admin) |
GET |
/api/analytics/real-time-stats |
Real-time stats |
GET |
/api/analytics/metrics |
Historical metrics (admin) |
POST |
/api/admin/login |
Admin login |
GET |
/api/admin/database |
Full database view (admin) |
DELETE |
/api/admin/users/:id |
Delete user (admin) |
DELETE |
/api/admin/sessions/:id |
Delete session (admin) |
DELETE |
/api/admin/reports/:id |
Delete report (admin) |
Usage Examples
Financial Analysis
"Full analysis of NVDA: profile, financials, insider trades, analyst ratings, sector performance"
"Compare AAPL, MSFT, GOOGL on: market cap, P/E, revenue growth, ESG scores, analyst consensus"
"Due diligence on TSLA: DCF valuation, institutional holders, insider trading patterns, earnings surprises"
"Show me the top gainers today with their financial ratios and analyst ratings"Quantitative Analysis
"Run a Monte Carlo simulation on AAPL with 10,000 paths over 252 trading days"
"Calculate the correlation matrix of FAANG stocks and display a heatmap"
"Backtest an RSI strategy on SPY and show the equity curve with Sharpe ratio"
"Optimize a portfolio of AAPL, MSFT, GOOGL, AMZN for maximum Sharpe ratio"
"Calculate Value at Risk for a $100,000 NVDA position at 95% and 99% confidence"
"Estimate GARCH volatility for TSLA and forecast 30-day ahead volatility"
"Price a call option on AAPL with strike $200, 30 days to expiry, and show all Greeks"Web Research
"Search latest AI industry news this week and summarize key developments"
"Extract the last NVIDIA earnings call transcript and highlight guidance changes"
"Research the impact of Fed rate decisions on tech stocks in 2024-2025"
"Crawl investor.nvidia.com and extract all Q4 financial press releases"Documentation
Exhaustive documentation is available in the docs/ directory:
| Document | Description |
|---|---|
| Getting Started | Prerequisites, installation, Python setup, env vars, first run, troubleshooting |
| Architecture | System diagram, directory structure, data flow, design decisions |
| API Reference | All 44 endpoints with request/response schemas, SSE event types, query params |
| Python Analysis | 8 built-in models (Monte Carlo, Black-Scholes, GARCH, VaR, portfolio, risk, plots, custom), all 17 libraries |
| Database Schema | All 9 tables with columns, types, constraints, relationships |
| Deployment | Production build, env vars, Docker example, CORS, security checklist |
| Contributing | Dev setup, code conventions, commit format, how to add endpoints/tools |
.env.example |
All environment variables with categories |
Testing
| Suite | Tests | What it covers |
|---|---|---|
App.test.tsx |
3 | Smoke test: renders, shows home page, search bar present |
config.test.ts |
5 | App config: name, domain, endpoints, limits, feature flags |
utils.test.ts |
5 | cn(): class merging, conditionals, dedup, edge cases |
queryClient.test.ts |
6 | Query defaults: staleTime, gcTime, retry, refetch policy |
useChatSession.test.tsx |
6 | Hook: initial state, reset, history toggle, mutation shape, handlers |
validation.test.ts |
16 | All Zod schemas: valid/invalid inputs, missing fields, max lengths |
npm test # Run once
npm run test:watch # Watch mode
npm run test:coverage # With coverageDeployment
Production Build
npm run build # Builds client (Vite) + server (esbuild)
npm start # Starts production serverEnvironment Variables
# Required
NODE_ENV=production
PORT=5000
SESSION_SECRET=<generate-a-strong-random-secret>
ANTHROPIC_API_KEY=sk-ant-...
FINANCIAL_MODELING_PREP_API_KEY=...
# Database (default: SQLite)
DATABASE_URL=sqlite://local.db
# DATABASE_URL=postgresql://user:pass@host:5432/db
# Optional APIs
FIRECRAWL_API_KEY=fc-...
TAVILY_API_KEY=tvly-...
EXA_API_KEY=...
SERPAPI_API_KEY=...Contributing
- Fork the repository
- Create a feature branch (
git checkout -b feature/my-feature) - Run checks before committing:
npm run typecheck && npm run lint && npm test - Commit with a descriptive message
- Open a Pull Request
Code Conventions
| Rule | Enforced By |
|---|---|
TypeScript strict mode |
tsconfig.json |
| ESLint (typescript-eslint + react-hooks) | eslint.config.js |
| Prettier formatting | .prettierrc |
| Zod validation on all API inputs | server/routes/validation.ts |
logger instead of console.log |
ESLint no-console rule |
@/ path alias (client), @shared/ (shared) |
tsconfig.json + vite.config.ts |
| Components grouped by domain | components/chat/, components/explore/, etc. |
| One hook per concern | useChatSession, useChatMutation, etc. |
Authors
|
Simon-Pierre Boucher Creator & Lead Developer |
Claude Opus 4.8 AI Pair Programmer |
Full codebase audit, architecture restructuring, TypeScript typing, route modularization, hook extraction, ESLint/Prettier/Vitest setup, ErrorBoundary, Zod validation, and README authored via Claude Code.