过去很长一段时间里,我持续研究量化交易,积累了大量策略代码、技术指标组合、市场观察、回测结果和失败案例。
这些资料凝结了许多时间与思考,但也面临一个现实问题:随着研究不断推进,策略文件越来越多,不同版本之间的逻辑差异越来越难追踪。许多曾经非常重要的思想,可能被埋藏在旧代码、参数和零散记录中。
近期,我开始尝试一种新的研究方式:
让AI继承过去的量化策略遗产,将代码、思想与复测结果整理为可持续演进的量化知识库,再由多个AI模型共同研讨、验证和改进。
出于研究保密需要,本文不会介绍具体交易规则、技术指标参数和策略收益,仅分享这套AI协作研究体系。
一、让CODEX继承量化策略遗产
这项工作的第一步,并不是让AI立刻编写新策略,而是要求CODEX认真阅读和理解过去积累的策略代码。
旧策略中经常存在一些看起来并不符合常规认知的逻辑。有些规则形式简单,有些参数显得非常极端,还有些实现方式甚至会让人本能地产生修改冲动。
但我为AI确立了一条重要原则:
实际复测结果的重要性,远高于研究者主观认为某个逻辑是否合理。
因此,CODEX不能因为某段代码看起来“不够优雅”,便擅自改变它。它必须首先忠实复现原始策略,确认真实交易语义,再讨论其中可能存在的错误与优化空间。
为了避免研究过程中逐渐偏离原始策略,我们建立了四类版本标记:
original:原始策略代码,不允许修改;
faithful:忠实复现原始交易语义;
repaired:修复明确错误后的版本;
derived:从原策略思想发展出的派生版本。
这种分类使原始策略、修复版本和优化版本不再混为一谈,也避免了优化失败后反过来错误否定原始思想。
二、从代码仓库升级为量化知识库
简单保存代码,并不等于真正继承了策略遗产。
一套策略通常同时包含多个层面的知识:
它如何理解市场所处的长期阶段;
它允许在哪些环境中交易;
它如何判断方向;
它如何寻找进入位置;
它如何控制失败;
它依靠高胜率,还是依靠少数大趋势盈利;
它在哪些市场环境中容易失效。
因此,我们开始将旧策略拆解为“思想、代码、证据”三个相互对应的部分。
知识库不仅保存原始代码,也记录:
策略核心思想;
原始实现语义;
历史复测结果;
参数稳健性;
失败案例;
已知缺陷;
可优化指标;
当前证据等级;
后续验证方向。
每项重要结论都必须能够追溯到原始代码与复测结果。这样建立起来的知识库,不再只是资料归档,而是一套能够辅助未来策略开发的研究基础设施。
三、让多个AI模型召开量化研究会议
在完成初步知识继承后,我进一步引入了CODEX、Gemini和DeepSeek,尝试建立多模型协作研究机制。
三个模型在研究中承担不同角色:
CODEX负责阅读代码、执行复测、维护知识库,并将会议决议落实为可验证的研究程序;
Gemini从更广泛的结构和逻辑视角提出解释、反例与替代方案;
DeepSeek参与策略推演、指标讨论和风险质疑。
它们并不是通过投票决定策略是否有效。
多个AI意见一致,并不能证明某个策略具有真实优势。会议的价值在于让不同模型提出彼此独立的解释、质疑和实验方案,然后由实际复测决定哪些观点可以进入知识库。
每次研究会议通常围绕以下问题展开:
某个策略为什么可能有效?
它的收益来自稳定机制,还是少数极端交易?
哪些指标承担趋势、方向、位置、触发和风险职责?
新增过滤条件减少了失败,还是同时删除了重要盈利机会?
优化后的策略是否真正优于原始版本?
结果是否依赖特定参数、特定年份或特定市场?
会议最终必须形成可以执行的实验,而不能只停留在理论讨论。
四、复测是AI研究会议的最终裁判
在整个研究过程中,我们坚持一个基本原则:
AI可以提出假设,但复测结果才拥有最终裁决权。
一些理论上非常合理的过滤指标,在加入策略后可能会明显降低收益。原因往往是它们确认得太慢,虽然减少了一部分失败交易,却同时错过了最重要的趋势阶段。
相反,一些看起来简单甚至不够“先进”的规则,经过多年数据复测后,可能展现出更稳定的结果。
因此,我们不仅观察策略总收益,还会检查:
交易失败率;
最大回撤;
参数邻域稳定性;
交易成本敏感性;
年度收益分布;
删除最佳若干笔交易后的表现;
收益是否过度依赖少数极端行情;
不同市场阶段中的表现差异。
只有通过这些检查,一个策略思想才有资格成为知识库中的核心候选。
五、从寻找完美指标,转向明确指标职责
过去研究技术指标时,人们常常希望找到一个能够同时判断趋势、方向、买点和卖点的完美指标。
但在多轮研究会议与复测后,我们逐渐形成了另一种认识:
一个指标最重要的价值,不是解释所有问题,而是稳定地完成一项明确职责。
在当前研究框架中,不同周期与指标被赋予不同责任:
高周期负责判断市场制度与主要方向;
中周期负责识别结构变化和交易机会;
低周期负责优化进入位置与执行成本;
风险指标负责否决交易或调整仓位;
退出模块负责保护收益尾部。
这种职责分离,使策略组合更加清晰,也让每个新增指标都可以被单独验证。
如果一个指标不能为其承担的职责提供稳定增量,就不应仅因为理论解释漂亮而被保留。
六、AI真正带来的改变
AI并没有自动解决量化交易中最困难的问题,也无法保证未来收益。
它真正带来的改变,是显著提高了研究组织能力。
过去,一个人需要反复翻阅旧代码、回忆设计背景、整理数据、修改程序并比较结果。现在,CODEX可以持续维护研究档案,追踪原始代码与派生版本之间的差异,并将新的复测结论及时写入知识库。
多个AI模型则能够从不同角度发起质疑,减少单一研究者陷入固定思维的风险。
但为了避免AI产生新的混乱,我们也建立了严格纪律:
不允许用理论解释覆盖实际复测结果;
不允许派生版本冒充原始策略;
不允许使用未来数据或未完成的高周期数据;
不允许因为历史收益优秀就直接批准实盘交易;
不允许多个AI意见一致被当作有效性证明;
所有重要结论必须能够追溯到代码和数据。
七、这是一项仍在进行中的实验
目前,我们已经完成了第一阶段的重要工作:CODEX初步继承了过去的量化策略遗产,并建立了包含核心思想、原始代码、复测证据和研究决议的量化知识库。
在此基础上,CODEX、Gemini和DeepSeek开始围绕重要策略思想召开研究会议,通过复测区分核心机制、低价值规则和具有优化空间的技术指标。
接下来的研究重点,将不再是无边界地寻找新指标,而是围绕已经得到历史证据支持的核心思想,继续进行:
多周期复合;
市场制度识别;
风险与仓位管理;
跨资产验证;
走前验证;
真正未来样本观察。
我希望最终形成的,不只是一套量化交易策略,而是一套能够持续继承、验证、质疑和演进的研究体系。
量化策略可能会失效,市场环境也会不断变化。但只要原始代码得到保留、研究过程可以追溯、结论始终服从实际证据,那么过去积累的思想就不会消失。
它们会成为下一阶段研究真正可以继续生长的基础。
For a long time in the past, I have continued to study quantitative trading and accumulated a large number of strategy code, technical indicator combinations, market observations, backtest results and failure cases.
These materials have condensed a lot of time and thinking, but they also face a practical problem: as the research continues to advance, there are more and more strategy documents, and the logical differences between different versions are becoming increasingly difficult to track. Many once-important ideas may be buried in old code, parameters, and scattered records.
Recently, I started trying a new research method:
Let AI inherit the legacy of past quantitative strategies, organize code, ideas, and backtest results into a sustainable evolving quantitative knowledge base, and then use multiple AI models to jointly discuss, verify, and improve.
Due to the need for research confidentiality, this article will not introduce specific trading rules, technical indicator parameters and strategy returns, but will only share this AI collaborative research system.
1. Let CODEX inherit the legacy of quantitative strategies
The first step in this work is not to ask the AI to write a new strategy immediately, but to require CODEX to carefully read and understand the strategy code accumulated in the past.
There are often logics in old strategies that do not seem to conform to conventional wisdom. Some rules are simple in form, some parameters are very extreme, and some implementation methods even make people instinctively have the urge to modify them.
But I have established an important principle for AI:
The importance of the actual backtest results is much higher than whether the researcher subjectively believes that a certain logic is reasonable.
Therefore, CODEX cannot change a piece of code without authorization just because it does not look "elegant enough". It must first faithfully reproduce the original strategy, confirm the actual trading semantics, and then discuss possible errors and optimization space.
In order to avoid gradually deviating from the original strategy during the research process, we established four categories of version markers:
original: original strategy code, no modification is allowed;
faithful: faithfully reproduce the original trading semantics;
repaired: version with clear errors fixed;
Derived: A derived version developed from the original strategy idea.
This classification prevents the original strategy, repaired version and optimized version from being confused, and also avoids incorrectly negating the original idea after optimization failure.
2. Upgrade from code repository to quantitative knowledge base
Simply saving the code does not mean truly inheriting the strategy legacy.
A set of strategies usually includes multiple levels of knowledge at the same time:
How it understands the long-term stage of the market;
the environments in which it allows trading;
how it determines direction;
how it finds entry;
how it controls failure;
Does it rely on a high winning rate or a few big trends to make profits;
In which market environments does it tend to fail?
Therefore, we began to break down the old strategy into three corresponding parts: "ideas, code, and evidence".
The knowledge base not only saves the original code, but also records:
Core strategy ideas;
Original implementation semantics;
Historical backtest results;
Parameter robustness;
failure cases;
known defects;
Potential optimization targets;
Current level of evidence;
Directions for further validation.
Every important conclusion must be traceable back to the original code and backtest results. The knowledge base established in this way is no longer just a data archive, but a set of research infrastructure that can assist future strategy development.
3. Let multiple AI models hold quantitative research meetings
After completing the initial knowledge inheritance, I further introduced CODEX, Gemini and DeepSeek to try to establish a multi-model collaborative research mechanism.
Three models play different roles in research:
CODEX is responsible for reading code, performing backtests, maintaining the knowledge base, and implementing meeting resolutions into verifiable research procedures;
Gemini proposes explanations, counterexamples, and alternatives from a broader structural and logical perspective;
DeepSeek participates in strategy reasoning, indicator discussion and risk challenge.
They are not voting on whether a strategy works.
The consensus among multiple AI models does not prove that a strategy has a genuine edge. The value of the meeting is to allow different models to propose independent explanations, questions, and experimental plans, and then actual backtests will determine which ideas can enter the knowledge base.
Each research meeting usually revolves around the following questions:
Why might a certain strategy be effective?
Does its returns come from a stable mechanism, or from a few extreme trades?
Which indicators carry trend, direction, entry location, trigger, and risk responsibilities?
Does adding a filter reduce failures, or does it also remove important profit opportunities?
Is the optimized strategy truly better than the original version?
Do the results depend on specific parameters, a specific year, or a specific market?
The meeting must ultimately lead to executable experiments and not just theoretical discussions.
4. Backtesting Is the Final Arbiter of AI Research Meetings
Throughout the research process, we adhered to one basic principle:
AI can make hypotheses, but the backtest results have the final say.
Some filtering indicators that are very reasonable in theory may significantly reduce returns after adding them to the strategy. The reason is often that they confirm too slowly. Although they reduce some failed trades, they miss the most important trend stage at the same time.
On the contrary, some rules that seem simple or even not “advanced” enough may show more stable results after years of backtesting across historical data.
Therefore, not only do we look at the total strategy return, we also examine:
trade failure rate;
maximum drawdown;
Parameter neighborhood stability;
trading-cost sensitivity;
Annual return distribution;
Performance after deleting some of the best trades;
Whether returns are overly dependent on a few extreme market conditions;
Performance differences in different market regimes.
Only after passing these checks is a strategy idea eligible to become a core candidate in the knowledge base.
5. Shift from looking for perfect indicators to clarifying indicator responsibilities
In the past, when studying technical indicators, people often hoped to find a perfect indicator that could determine the trend, direction, buying point, and selling point at the same time.
But after multiple rounds of research meetings and backtests, we gradually formed another understanding:
The most important value of an indicator is not to explain all problems, but to steadily complete a clear responsibility.
In the current research framework, different periods and indicators are given different responsibilities:
Higher timeframes are responsible for judging the market regime and main direction;
Intermediate timeframes is responsible for identifying structural changes and trading opportunities;
Lower timeframes is responsible for optimizing entry position and execution cost;
Risk indicators are responsible for rejecting trades or adjusting positions;
The exit module is responsible for protecting the earnings tail.
This separation of responsibilities makes the strategy portfolio clearer and allows each new indicator to be independently verified.
If an indicator does not provide a stable incremental contribution to its assigned role, it should not be retained simply because of its beautiful theoretical explanation.
6. The real changes AI brings
AI does not automatically solve the most difficult problems in quantitative trading, and it cannot guarantee future returns.
The real change it brings is that it significantly improves research organization capabilities.
In the past, one person would need to go through old code again and again, recall the design background, organize the data, modify the program, and compare the results. Now, CODEX can continuously maintain research files, track the differences between the original code and the derived version, and write new backtest conclusions into the knowledge base in a timely manner.
Multiple AI models can raise questions from different angles, reducing the risk of a single researcher falling into a fixed mindset.
But in order to avoid new chaos caused by AI, we have also established strict discipline:
It is not allowed to use theoretical explanations to cover actual backtest results;
Derived versions are not allowed to impersonate the original strategy;
The use of future data or incomplete higher-timeframe bars is not allowed;
It is not allowed to directly approve live trading because of excellent historical returns;
Consensus of multiple AI opinions is not allowed to be used as proof of validity;
All important conclusions must be traceable back to the code and data.
7. This is an experiment still in progress
At present, we have completed the important work of the first phase: CODEX has initially inherited the legacy of past quantitative strategies and established a quantitative knowledge base containing core ideas, original code, backtest evidence and research resolutions.
On this basis, CODEX, Gemini and DeepSeek began to hold research meetings around important strategy ideas, and distinguished core mechanisms, low-value rules and technical indicators with room for optimization through backtesting.
The focus of the next research will no longer be on searching for new indicators without boundaries, but will continue to focus on core ideas that have been supported by historical evidence:
Multi-timeframe composition;
Market regime identification;
Risk and position management;
Cross-asset validation;
Walk-forward validation;
True out-of-sample observation.
I hope that what will eventually be formed is not just a set of quantitative trading strategies, but a research system that can continue to be inherited, verified, questioned and evolved.
Quantitative strategies can fail and market conditions are constantly changing. But as long as the original code is preserved, the research process can be traced, and the conclusions are always subject to actual evidence, then the ideas accumulated in the past will not disappear.
They will form the basis upon which the next phase of research can truly continue to grow.