{"slug": "building-a-local-first-ai-agent-powered-trading-workstation-in-docker", "title": "Building a Local-First, AI-Agent Powered Trading Workstation in Docker 🚀", "summary": "A developer open-sourced TradingSpy, a local-first AI trading research workstation that runs entirely in Docker. The platform uses AI agents to autonomously generate and backtest trading strategies, supports both cloud and local LLMs, and aggregates market intelligence from multiple sources into a single dashboard.", "body_md": "Like many devs who double as market hobbyists, my weekends usually look like a chaotic mess of Jupyter notebooks, multiple stock data APIs, and half-broken custom scripts trying to backtest a simple idea.\n\nA few months ago, I hit a wall. I realized I was writing more infrastructure plumbing than actual strategy code. When looking at commercial alternatives, I found they either cost a fortune, forced me into a proprietary cloud, or raised massive data privacy red flags regarding harvesting my strategy ideas.\n\nSo, I built my own ultimate sandbox: TradingSpy. It's a local-first AI trading research workstation running entirely in Docker, and I've just open-sourced it!\n\n👉 Check out the repository: [https://github.com/mrhustlex/TradingSpy-TradingAgentService](https://github.com/mrhustlex/TradingSpy-TradingAgentService)\n\nWhat exactly is TradingSpy?\n\nIt is not a trading bot and it does not connect to live brokerages to place trades. Instead, it's an end-to-end sandbox environment for strategy generation, market intelligence gathering, and automated backtesting.\n\nThe Core Tech Stack & Key Features\n\nLoop-Engineering AI Agents 🤖\n\nThis is where it gets fun. Instead of just chatting with an LLM, you can assign it a self-correcting goal. For example: \"Improve EMA_Trend for TQQQ until it beats the baseline buy-and-hold strategy.\" The agent will autonomously:\n\nWrite the Python code using Backtrader.\n\nRun it through a syntax and runtime validation step.\n\nExecute the backtest against historical candles.\n\nRead the metrics—if it underperforms, it automatically iterates, tweaks the code, and tests again without you having to babysit the terminal.\n\nMulti-Provider & Local LLM Ready\n\nPrivacy was my #1 priority. You can hook it up to cloud providers like Google AI Studio or OpenRouter, or drop in Ollama (qwen2.5-coder, etc.) to run the entire operation completely offline on your local hardware.\n\nAll-in-One Market Intelligence\n\nNo more context switching. It pulls real-time quotes, multi-period sector heatmaps, insider transactions, fundamentals, and even parses academic quantitative papers directly from arXiv into a single UI dashboard.\n\nDeveloper-First Design\n\nThe backend is built with FastAPI and features an OpenAI-compatible API layer (/v1/chat/completions). This means you can easily use TradingSpy as a headless engine to back your own custom automation scripts or external workflows.\n\nGetting Started in 2 Minutes\n\nAs long as you have Docker installed, setting it up locally takes three commands:\n\ngit clone [https://github.com/mrhustlex/TradingSpy-TradingAgentService.git](https://github.com/mrhustlex/TradingSpy-TradingAgentService.git)\n\ncd TradingSpy\n\ncp .env.example .env\n\ndocker compose up -d --build\n\nOnce up, your workspace is ready to go:\n\nFrontend App: [http://localhost:3000](http://localhost:3000)\n\nBackend API Docs: [http://localhost:8000/docs](http://localhost:8000/docs)\n\nWhy I'm Sharing This\n\nRight now, I am a solo developer building this purely because it was a tool I desperately needed for my own research. I'm opening it up to the open-source community because I think quantitative tools shouldn't be gated behind massive paywalls or privacy trade-offs.\n\nDisclaimer: This is experimental software built strictly for educational research and coding exploration, not financial advice.\n\nI'd love to hear your thoughts! What local models are you finding work best for Python code generation? What features or data sources should I add next? Drop a comment below or open an issue on GitHub! ⭐️", "url": "https://wpnews.pro/news/building-a-local-first-ai-agent-powered-trading-workstation-in-docker", "canonical_source": "https://dev.to/mrhustlex/i-built-tradingspy-a-completely-local-privacy-first-ai-trading-research-assistant-backtester-15kj", "published_at": "2026-07-11 20:38:51+00:00", "updated_at": "2026-07-11 21:16:03.516062+00:00", "lang": "en", "topics": ["artificial-intelligence", "ai-agents", "developer-tools", "ai-products"], "entities": ["TradingSpy", "Docker", "Backtrader", "Google AI Studio", "OpenRouter", "Ollama", "FastAPI", "arXiv"], "alternates": {"html": "https://wpnews.pro/news/building-a-local-first-ai-agent-powered-trading-workstation-in-docker", "markdown": "https://wpnews.pro/news/building-a-local-first-ai-agent-powered-trading-workstation-in-docker.md", "text": "https://wpnews.pro/news/building-a-local-first-ai-agent-powered-trading-workstation-in-docker.txt", "jsonld": "https://wpnews.pro/news/building-a-local-first-ai-agent-powered-trading-workstation-in-docker.jsonld"}}