
A Private AI Research Desk for Traders
A self-hosted AI research platform that searches a trader's private documents and videos, provides source citations, reads chart information, and runs trading strategy backtests.
Custom SaaS Platforms- Python
- Gemini
- PostgreSQL
Overview
This project delivers a private AI assistant for an active trader working with ICT trading concepts. It combines document and video search, AI-powered answers, chart analysis, and a Python backtesting engine in one platform. The system runs on the client's own VPS, keeping their data, infrastructure, and operating costs under their control.
The Problem
The client's trading knowledge was spread across hundreds of hours of mentorship videos, PDFs, Pine Script references, and price-data spreadsheets. Finding specific explanations required manually searching through documents and videos, while testing strategies meant writing code from scratch.
General-purpose AI assistants were not reliable enough because they could mix outside information with the client's material or provide incorrect chart prices with confidence. The client needed a private system that could provide source-backed answers and perform real backtests using their own data.
How It Works
- Private AI Chat: Open WebUI provides a secure chat interface, with Caddy handling HTTPS and LiteLLM connecting the AI models.
- Document Processing: The FastAPI and Haystack services extract content from uploaded documents, divide it into searchable sections, generate embeddings, and store them in Qdrant.
- Video Processing: Videos are downloaded, transcribed, and analyzed using keyframes, OCR, and visual descriptions. The extracted information is indexed so users can search for specific explanations and chart moments.
- Intelligent Retrieval: The platform combines keyword and semantic search, reranks results, and filters out low-confidence matches. A query planner also rewrites natural-language questions into clearer search queries.
- Source-Based Answers: The AI answers using retrieved client materials and provides document-page or video-timestamp citations. Uncertain chart prices are marked rather than presented as confirmed values.
- Trading Backtesting: An isolated Python environment runs strategy backtests, parameter sweeps, indicators, ICT pattern detection, performance metrics, and chart exports.
- Administration and Monitoring: A Streamlit dashboard manages uploads, video processing, storage, costs, and restoration. Phoenix tracing and encrypted backups support monitoring and recovery.

The Result
The platform provides the client with a private workspace to search trading knowledge, review source materials, and test strategies. It also supports a shared knowledge base across different user accounts, allowing authorized users to access relevant documents and videos. By connecting AI-powered research with an isolated backtesting environment, the system keeps the client's data and infrastructure under their control.



Tech Stack
- Open WebUI: Provides the private AI chat interface.
- LiteLLM: Connects and manages AI models, including Gemini Flash.
- FastAPI and Haystack: Handle document processing, retrieval, and RAG services.
- Qdrant: Stores document and video embeddings for search.
- PostgreSQL: Stores application state and related data.
- Apache Tika: Extracts content from documents.
- Voyage AI: Provides embeddings and reranking.
- Groq ASR: Supports speech-to-text processing.
- OCR and Vision Models: Extract and describe information from video frames and charts.
- Python: Runs the trading backtesting engine and analysis tools.
- Streamlit: Provides the administration dashboard.
- Docker Compose and Caddy: Manage self-hosted services and HTTPS.
- Phoenix / OpenTelemetry: Support tracing and monitoring.
- restic and rclone: Handle encrypted backups and storage transfers.
Where This Pattern Applies
- Trading Firms: Search internal research, trading strategies, and market education materials.
- Investment Research Teams: Retrieve information from private reports, documents, and recorded discussions.
- Financial Educators: Make large libraries of training videos and learning materials searchable.
- Quantitative Analysts: Combine AI-assisted research with automated backtesting and strategy evaluation.
- Agriculture: Help farmers and agricultural organizations search farming guides, crop research, soil reports, weather records, and agricultural training materials.
- Healthcare: Help medical research teams retrieve information from clinical studies, medical documents, and educational resources.
- Education: Make institutional learning materials, lectures, research papers, and training content searchable.
- Manufacturing: Provide AI-powered access to equipment manuals, maintenance records, technical documentation, and operational procedures.
- Research Organizations: Build private AI assistants grounded in internal documents and datasets.
This pattern can be applied across industries wherever organizations have large collections of private information. By combining a shared knowledge base, AI-powered search, source-backed answers, and specialized analysis tools, organizations can turn their existing data into a searchable and useful research assistant while keeping control of their infrastructure.