Trading Intelligence Platform with Local AI Inference
Client-hosted trading intelligence system for an active futures trader, combining local model inference with licensed market data, web research, and multi-channel alerting.
The challenge
A full-time S&P 500 and Nasdaq futures trader juggled four or more platforms daily -- one for tick data, another for technical charts, another for journaling and position tracking. When something happened in the market, alerts came from fragmented services that didn't talk to each other.
He wanted to ask questions like "Why is NQ pulling back after that breakout?" and get an answer grounded in licensed live data rather than ungrounded responses from a general-purpose chatbot. Off-the-shelf tools weren't connected to his data and professional platforms carried substantial recurring costs.
What was built
A client-hosted trading intelligence system with local model inference and external services for licensed market data, web research, and alert delivery:

Data pipeline and compute
Real-time market data ingested via DataBento into DuckDB, continuously updated with tick-level precision for ES and NQ continuous contracts. Technical indicators (VWAP, ATR, RSI, Bollinger Bands) and market regime detection computed in real-time using NumPy with Numba-optimized kernels and Polars DataFrame operations.
AI chat copilot
A local 120B-parameter LLM (Ollama) equipped with tool-calling to query live market data — current prices, support/resistance levels, active signals, regime analysis, and open positions. Natural language questions return answers grounded in real-time conditions.
Deep research agent
A multi-agent system that decomposes research questions, searches external web sources, checks source coverage and consistency, and produces structured reports with citations. Research orchestration and model inference run locally; web research still requires internet access.
Alerting and dashboard
Custom rules engine monitoring predefined market conditions with multi-channel dispatch: Discord, email, Windows desktop toasts, and webhooks. Streamlit-based UI with interactive Plotly candlestick charts, live price displays, trade journaling, and a custom JS chat component that streams AI responses via SSE without page reloads.
The result
- Single dashboard consolidated functions previously spread across four or more tools into one interface
- Local model inference through Ollama, with recurring costs limited to the licensed data feed and any selected delivery services
- Real-time streaming UX via custom JS + FastAPI SSE endpoint, solving Streamlit's rerender problem for chat