Noureddine RAMDI / QuantDinger: a self-hosted AI-assisted quant trading platform with strong safety controls

Created Mon, 04 May 2026 10:23:02 +0000 Modified Sat, 23 May 2026 20:41:27 +0000

brokermr810/QuantDinger

QuantDinger tackles a common pain point in quantitative trading: fragmented toolchains. Instead of juggling separate charting tools, script runners, and AI chatbots disconnected from your actual strategy workflows, it offers a single deployable platform that integrates AI-assisted market research, backtesting, and execution. Its self-hosted architecture puts you in control of your keys, data, and operational environment — something often missing in SaaS alternatives.

What QuantDinger is and how it works

At its core, QuantDinger is a local-first quant platform written in Python that supports crypto, IBKR stocks, and MT5 forex trading. It unifies AI-assisted market research, Python-native strategy development, backtesting, and live execution under one roof.

Architecturally, it centers around a five-layer quant engine that processes incoming market data feeds and supports a modular workflow. The platform is deployed as a Docker Compose stack consisting of Postgres for data persistence, Redis for caching and messaging, an API backend serving the core logic, and a prebuilt UI served via Nginx in a frontend container. This setup avoids the need for Node.js or complex frontend builds, simplifying deployment.

A crucial element is the Agent Gateway (/api/agent/v1) and the MCP (Multi-Channel Processing) server. These components enable AI coding assistants like Cursor, Claude Code, and Codex to interact programmatically with market data, strategies, backtests, and execution flows. Interaction is controlled through scoped agent tokens with strict safety properties — they default to paper trading only, require explicit admin opt-in for live trading, and all interactions are audit-logged. This design balances powerful AI assistance with operational security.

The platform supports multi-user roles, billing primitives, and operator controls. It’s designed as a deployable “quant OS” rather than a loose collection of scripts or a single backtesting engine. This makes it suitable for teams or advanced individual quants who want an end-to-end solution.

The agent gateway and safety model: AI-assisted trading with guardrails

The standout technical feature of QuantDinger is its approach to integrating AI assistants with live trading workflows safely. The MCP server and Agent Gateway together expose a controlled interface for AI agents to:

  • Perform market research by querying live and historical data
  • Generate or modify Python strategies
  • Run backtests and receive feedback
  • Execute trades in a sandboxed “paper” mode by default

Each AI assistant operates under scoped tokens that strictly limit what it can do. The tokens enforce a paper-only execution mode unless an operator explicitly opts in to live trading for the token. All agent actions are audit-logged for traceability.

This pattern addresses one of the trickiest challenges in AI-assisted finance: how to let AI tools interact with sensitive trading systems without risking unintended or malicious trades. The tradeoff is that developers must manage token scopes and operational policies carefully, but the model provides a clear and auditable boundary.

Under the hood, the codebase implements this via the backend API’s token management system and request routing through the agent gateway endpoint. The safety defaults and opt-in mechanisms are baked into the server’s logic, ensuring no accidental live execution.

Installation and first-time setup with Docker Compose

QuantDinger ships as a Docker Compose stack that includes all major components:

  • Postgres for persistent storage
  • Redis for caching and message brokering
  • API backend written in Python
  • Nginx serving a prebuilt UI from the frontend container

Node.js is not required since the UI is prebuilt and served statically.

The installation path is straightforward:

  1. Clone the repository
git clone https://github.com/brokermr810/QuantDinger.git
cd QuantDinger
  1. Create the backend configuration file from the example
cp backend_api_python/env.example backend_api_python/.env

This .env file drives almost all runtime behavior, including database URLs, admin credentials, LLM keys, billing toggles, and worker configurations.

  1. Adjust ports and image mirrors if needed by editing the root .env.

  2. Start the stack with Docker Compose.

The documentation emphasizes planning for disk space since the Postgres volume grows with users, strategies, and logs.

This setup approach balances ease of use with flexibility. The Docker Compose stack abstracts away the operational complexity, but you retain full control over your data and keys.

Verdict: who should consider QuantDinger?

QuantDinger is a solid choice for quantitative traders and developers looking for an integrated, self-hosted platform that brings AI-assisted workflows into their live trading pipelines.

Its multi-layer architecture and Docker Compose deployment make it suitable for both individual quants who want a local-first platform and teams needing multi-user roles and billing controls.

The agent gateway and MCP server pattern for AI integration is a clean, well-thought-out solution to the tricky problem of safely letting AI assistants interact with market data and execution systems.

That said, it’s not a lightweight tool. The infrastructure footprint (Postgres, Redis, API server) and operational considerations (token management, audit logging, opt-in policies) require some DevOps maturity.

If you want a deployable quant OS that unifies research, backtesting, and execution — and are ready to operate it responsibly — QuantDinger is worth exploring in depth.


→ GitHub Repo: brokermr810/QuantDinger ⭐ 2,929 · Python