The Bottleneck in AI-Powered Quantitative Development: A Broken Automation Workflow
In current quantitative trading development practices, although large language models can efficiently generate strategy code, the entire workflow is far from fully automated. Developers typically need to manually copy AI-generated code to backtesting platforms like JoinQuant, Ptrade, or QMT, then manually trigger backtests, wait for results, export data, and perform analysis. In this process, the human becomes the core bottleneck, as the AI cannot independently complete the “code-test-analyze” closed loop, severely limiting its potential. This “human-AI relay” model hampers the efficiency of strategy iteration and fails to leverage the AI’s advantage in large-scale, high-concurrency exploration.

The Loop Framework: A Minimal Production Unit for AI
To break this bottleneck, a developer known as “Cat Bro Loves Quant” proposed and built an AI-native backtesting framework called “Loop” on July 12, 2026. Its core design philosophy is to create a “minimal unit” that an AI can directly operate and produce.
The framework has several key technical features:
- Architectural Design: It adopts a model where the strategy and the matching engine are completely separate. The strategy module is only responsible for outputting the target portfolio and weights, while the framework’s matching layer uniformly handles all subsequent trade execution logic, such as the T+1 settlement system, order rejections due to price limits or trading halts, and transaction cost calculations. This decoupled design ensures the purity of the strategy logic and lays the foundation for flexible future extensions, which is why existing open-source projects like
backtrader were not used.
- Data Layer: It uses
tushare as the primary data source and has established a two-tier caching mechanism with the parquet file format to optimize data read performance.
- Matching Layer: It simulates the T+1 trading system, executing trades at the opening price, and can automatically handle trade failures caused by market rules like price limits or trading halts.
loop-skill: Multi-Agent Collaboration Based on Hard Tool Isolation
Built on top of the Loop framework, loop-skill is introduced as a multi-agent orchestration method to achieve more complex strategy iteration and optimization. It does not rely on complex prompt engineering but ensures task reliability through the physical isolation of tool permissions.
The loop-skill system consists of three roles:
- Builder: An AI agent with Read/Write/Edit permissions. Its sole responsibility is to generate or modify strategy code according to instructions, without performing self-checks.
- Checker: An AI agent with strictly limited permissions. It can only use read-only tools like Read, Grep/Glob, and Bash, and physically lacks permission to modify code. Its duty is to run backtests, check the code (e.g., for look-ahead bias), evaluate results (e.g., for overfitting risk), and provide objective failure reports.
- Orchestrator: The human developer, who is responsible for defining top-level tasks, dispatching the
Builder and Checker, and determining whether an iteration is successful or should be terminated based on the Checker's feedback.
This “hard isolation” is the core principle. It ensures a separation of duties between “code generation” and “code review,” so the Checker's objectivity is not compromised by the Builder's potential “laziness.”
Practical Case Studies: Comparing Single-Agent and Multi-Agent Performance
Through two real-world case studies, the article demonstrates the differences between the traditional single-agent model and the loop-skill multi-agent model.
Case Study 1: Fundamental Small-Cap Strategy (Single-Agent /goal)
In a scenario similar to Claude’s Code Interpreter (/goal mode), a developer asked a single agent to write a new fundamental small-cap strategy based on an existing template. The requirements included: EPS > 0, year-over-year growth in revenue and net profit > 0, ROE in the top 30% of the market, and selecting the 10 stocks with the smallest market capitalization. The AI completed the code writing and backtesting in a single pass and returned the result directly. This model is suitable for well-defined, one-off tasks.
Case Study 2: ETF Slope Momentum Rotation (Multi-Agent loop-skill)
In the second case, the developer used loop-skill to ask an AI to optimize an ETF rotation strategy. The goal was to increase the Sharpe ratio while avoiding overfitting and to propose three optimization solutions. The AI autonomously completed the following iterations:
- Solution 1 (Trend Filtering): The AI generated a solution, but the
Checker determined it did not meet the optimization target.
- Solution 2 (Volatility Momentum): Successfully increased the strategy’s Sharpe ratio to 1.035, a 27.6% improvement over the baseline.
- Solution 3 (Diversified Holdings): Further boosted the Sharpe ratio to 1.093, a 34.8% improvement over the baseline.
This case demonstrates that the loop-skill multi-agent orchestration model is better suited for complex, exploratory optimization tasks. The Checker agent acts as a knowledgeable “referee” with quantitative expertise, capable of evaluating domain-specific issues like overfitting and look-ahead bias—something that the built-in evaluation mechanisms of general-purpose single agents can hardly match.
Conclusion: Moving Towards a New Stage of Human-AI Collaboration
The Loop Engineering paradigm reveals the core elements of quantitative development in the AI era: an AI-native automation environment, an AI partner capable of providing critical feedback, and the engineer’s own professional judgment. The advancement of tools aims to liberate developers from repetitive work, allowing them to focus more on strategy innovation and final decision-making. Ultimately, the human expert still decides which strategy is worth deploying in live trading.