Finance is an open-source AI-powered financial research assistant that transforms natural language queries into deep institutional-grade analysis. It’s designed for financial analysts, quantitative researchers, and investors who need real-time market data, SEC filings, academic research, and news sentiment without switching between expensive platforms. Built with Next.js and TypeScript, it integrates Valyu’s unified search API for financial data, Daytona for secure Python code execution, and supports local LLMs via Ollama or LM Studio for private, offline use.
The application runs in self-hosted mode using SQLite for local data storage, eliminating dependencies on Supabase or third-party authentication. It supports real-time web search, interactive charting, and secure sandboxed Python execution for backtesting and ML models—all accessible through a conversational interface. Deployment options include local development with Ollama/LM Studio or production via Valyu’s OAuth and Supabase stack.
What You Get
- SEC Filings Analysis - Deep search and extraction of key metrics from 10-Ks, 10-Qs, 8-Ks, and insider trading reports using Valyu’s specialized financial index.
- Real-Time Market Data - Access live and historical stock prices, volumes, and technical indicators across 50+ global exchanges via Valyu’s unified API.
- Python Code Execution - Run complex financial models, Monte Carlo simulations, and ML algorithms in secure Daytona sandboxes with automatic result visualization.
- Interactive Visualizations - Generate publication-ready charts and dashboards directly from natural language prompts, with export options for PNG and CSV.
- Multi-Source Research - Unified search across SEC filings, academic papers (arXiv, Wiley), real-time news, and social sentiment—all in a single query.
- Local LLM Support - Use Ollama or LM Studio for private, unlimited, offline AI inference with model switching in the UI—no cloud API required.
Common Use Cases
- Running quantitative backtests - A hedge fund analyst uses Finance to execute Python-based Monte Carlo simulations on Tesla’s stock price using real-time market data and historical volatility.
- Analyzing SEC filings for due diligence - An investor queries GameStop’s latest 10-K to extract revenue trends, debt ratios, and management commentary without manually downloading PDFs.
- Researching market sentiment from news - A journalist tracks how political statements impact tech stocks by asking Finance to analyze recent headlines and social sentiment across multiple sources.
- Building private financial research tools - A quant researcher deploys Finance in self-hosted mode with Ollama to run unlimited, confidential analyses without exposing data to cloud APIs.
Under The Hood
Architecture
- Clear separation of concerns via Next.js App Router with server components and API routes, isolating data fetching from UI rendering
- Unified database abstraction layer using Drizzle ORM that enables seamless adapter switching without business logic changes
- Server state managed through React Query with intelligent caching, decoupling data fetching from component rendering
- Type-safe UI components built with Tailwind CSS and class-variance-authority, ensuring consistent theming and composability
- Domain-specific PDF generation logic isolated in dedicated utilities, handling SVG-to-PNG charts and markdown-to-HTML conversion with citation support
- Component props validated via Zod and Radix UI primitives, with dynamic class merging utilities enhancing reusability
Tech Stack
- Next.js 15 with RSC and Turbopack powering a server-rendered React 19 frontend, tightly integrated with TypeScript and Tailwind CSS
- Drizzle ORM with better-sqlite3 for type-safe, schema-driven database operations, supported by Drizzle Kit for migrations
- Supabase for authentication, real-time data, and edge-compatible backend services, complemented by Vercel Analytics for behavioral insights
- AI SDKs including OpenAI, Ollama, and Valyu, combined with React hooks to deliver LLM-powered financial insights
- Dockerized production environment with optimized builds, pnpm workspaces, and pre-installed Chromium for consistent deployment
- Comprehensive ESLint and TypeScript configurations with Next.js plugin and aliased module paths ensuring code quality across a monorepo structure
Code Quality
- Robust environment validation with structured error reporting for self-hosted and OAuth modes
- Clear separation between server-side authentication flows and client-side state management
- Custom hooks and context patterns enforce component composition rules and provide meaningful runtime feedback
- Consistent naming and modular UI architecture using Tailwind and Lucide icons promote reusability and theme consistency
- Defensive error handling with graceful degradation in API calls, though unit tests for edge cases are limited
- Strong accessibility focus with semantic HTML, ARIA roles, and keyboard navigation embedded in core components
What Makes It Unique
- Native integration of Valyu OAuth as the exclusive authentication system, unifying identity across financial and AI platforms in a federated model
- Dynamic inline citation rendering with embedded financial charts and LaTeX support, creating a seamless analytical narrative
- Intelligent environment detection that adapts configuration based on deployment context, enabling flexible enterprise and open-source use
- Client-side memoization of chart data and markdown transformations to optimize streaming performance during real-time analysis
- Custom Embla Carousel implementation designed specifically for multi-source financial data visualization with full accessibility
- Ollama status detection that dynamically enables/disables local LLM features without server reconfiguration, supporting hybrid AI architectures