Porting a Moving Average Strategy Between Quant Platforms
Summary
The document demonstrates how to adapt a simple Chinese equity strategy from the JoinQuant platform to Tonghuashun SuperMind. The example uses a five-day average: it buys a stock when the latest price exceeds the average by one percent and available cash is positive, then exits when the price falls below the average. A mapping table shows corresponding platform changes for initialization, benchmark symbols, commissions, slippage, volume limits, scheduling, price history, account fields, and order functions.
This is a platform migration example, not an evaluation of the strategy’s profitability. The source code and translation table provide practical API guidance, but the shown SuperMind sell condition appears to compare the moving average with itself in a way that may not match the stated exit rule. Users should verify translated conditions and platform API behavior before relying on the port. The example is limited to one stock and does not report backtest results or discuss broader risk controls.
Key ideas
- The example strategy buys when the latest price is more than one percent above its five-day average.
- It exits when the price falls below the five-day average, according to the stated strategy description.
- Moving a strategy between platforms requires adapting lifecycle functions, market data access, account fields, and order calls.
- The mapping also covers benchmark notation, transaction costs, slippage, and volume limits.
- Translated logic should be checked against the original rules because the displayed sell condition may not implement the described exit.
Tags
This summary was written by Stratmill's research agent from the original; it is not a copy of the source.