Why AI Trading Is Still Not Widely Adopted
This article explains why AI-powered stock trading remains rare in production despite rapid progress in general-purpose large models. It examines five practical constraints—data quality, latency, cost, compliance, and backtesting reliability—and outlines a modular architecture where the model handles understanding and generation while deterministic engines handle execution. It also covers prompt-chain design, structured output, and the engineering discipline required for credible backtesting and risk control.
1. The Core Issue: Technically Feasible Does Not Mean Operationally Viable
Over the past two years, general-purpose large models with reasoning capabilities have made clear progress in understanding natural language, interpreting charts, and generating structured strategies. As a result, “using AI to trade stocks” has become a frequent topic of discussion. Yet when moving from public debate to real production environments, few systems run reliably over the long term. The reason is not that models cannot write strategies, but that securities trading is an engineering domain with extremely demanding requirements for latency, cost, compliance, and reproducibility. Placing a model inside the trading loop is only one component; success is ultimately determined by the data pipeline, the execution pipeline, and the risk-control pipeline.
This article discusses general technical methods and does not address the capabilities of any specific vendor’s products. Terms such as “AI coding tool,” “a cloud platform,” and “an open-source model” are used in a neutral way.
2. Five Real-World Constraints
2.1 Data Quality and Timeliness
Model output quality is bounded by input quality. Market data involves complex cases such as price adjustment for corporate actions, trading halts, price limits, call auctions, and after-hours fixed-price trading. Fundamental data is subject to changes in reporting standards and retrospective restatements. Alternative data often carries collection delays and noise. If uncleaned data is handed directly to a model, the resulting “strategy” is merely a fit to noise.
2.2 Latency and Execution Determinism
The decision pipeline includes market data ingestion, feature computation, model inference, risk validation, order submission, and fill reporting. General-purpose large models typically take seconds to produce a response, with noticeable variance, which makes them hard to fit hard latency requirements for high-frequency or intraday timing. A more common engineering practice is therefore to place the model in “offline research” and “strategy generation” roles, while leaving online execution to a deterministic rule engine.
2.3 Cost and Compute
Embedding a model in every decision introduces substantial inference overhead. Calling the model once for every instrument and every cycle causes cost to scale linearly with the number of instruments and the frequency. A reasonable approach is to layer the system: use the model at low frequency for screening and explanation, and use lightweight rules or traditional factor models for high-frequency execution.
2.4 Compliance and Accessibility
Different regions impose explicit requirements on model services, cross-border data transfer, and securities advisory qualifications. Individual developers often face risks around services that are not directly accessible and non-compliant account or API usage, while institutions face regulatory demands for model explainability and audit trails. This directly constrains the path toward “available to everyone.”
2.5 Evaluation Difficulty and Overfitting
Backtesting is easy; credible backtesting is hard. Common problems include look-ahead functions, survivorship bias, underestimated transaction costs, and excessive in-sample parameter tuning. Natural-language strategy descriptions produced by models may look reasonable, but when translated into executable conditions they often hide a large number of undefined assumptions.
3. A Practical Modular Architecture
A practical design splits the system into five layers, with the model responsible only for “understanding and generation,” not for placing the final order.
Data Layer -> Feature Layer -> Decision Layer (Model/Rules) -> Risk Layer -> Execution Layer↑__________ Backtesting and Evaluation Loop __________↓
- Data layer: unify the definitions and timestamps of market, financial, and alternative data; store them in object storage and a relational database; use a message queue for incremental synchronization.
- Feature layer: transform raw data into factors and state variables, ensuring they are recomputable and versionable.
- Decision layer: the model translates natural-language intent into a structured strategy object; the rule engine handles deterministic execution.
- Risk layer: position caps, single-instrument exposure limits, drawdown circuit breakers, and price-limit and liquidity checks.
- Execution layer: integrate with broker or exchange interfaces, and implement an order state machine with idempotency control.
4. Prompt Chain Design: Turning Intent into Executable Conditions
The multi-step process described above can be abstracted into four stages—classification, routing, generation, and post-processing. The engineering implementation is as follows:
- Request classification: determine whether the user intent is screening, portfolio creation, fundamental analysis, or risk adjustment.
- Prompt routing: dispatch the request to the corresponding prompt template, avoiding a single prompt that carries all responsibilities.
- Structured generation: require the model to output strict JSON with fixed fields for easy validation.
- Post-processing and validation: convert the generated result into SQL or a strategy DSL, and run schema validation and semantic checks before execution.
Example output structure:
{"portfolio": {"name": "Omni", "initial_value": 10000},"steps": [{"action": "buy", "asset": "example instrument", "size": "10%_of_power","when": "close_above_ma20", "guard": "max_position_20%"}]}
In terms of prompt writing, models with reasoning capabilities are not sensitive to lengthy preamble; the focus should be on the objective, constraints, output format, and prohibited actions. Compared with earlier approaches that required meticulous prompt engineering, simpler instructions are often more stable today.
5. Backtesting and Risk Control: Non-Negotiable Engineering Discipline
- Use strict time-series splits and prohibit look-ahead functions; all features must use only data visible at the decision point.
- The cost model must include commissions, stamp duty, slippage, and market impact, with sensitivity analysis.
- Use rolling forward validation rather than a single random split.
- Assign version numbers to strategies and data so that any historical conclusion can be reproduced.
- In the online stage, set circuit breakers and a manual review switch; model output enters risk control only as a recommendation.
6. Conclusion
AI has not become widespread in technical stock trading not because models lack capability, but because the bottlenecks of trading systems lie in data, latency, cost, and compliance. Positioning large models as “strategy translators and researchers,” placing deterministic engines in the execution role, and combining them with rigorous backtesting and risk control is the more realistic engineering path today. If unified data storage, message synchronization, containerized deployment, and monitoring and alerting capabilities are needed, general product categories from cloud platforms such as Baidu AI Cloud can be evaluated, but selection should still be based on your own latency and compliance requirements.
