Inspiration
Traditional quantitative trading heavily relies on rigid technical indicators (e.g., $ \text{MACD} = \text{EMA}{12} - \text{EMA}{26} $). However, classical technical analysis—specifically Chan Theory (缠论)—involves complex geometric pattern recognition, such as center hubs (中枢) and multi-timeframe resonance, which strict rule-based systems struggle to evaluate dynamically. We integrated OpenAI's reasoning capabilities to interpret these complex structural patterns, bridging the gap between abstract financial geometry and automated algorithmic execution.
What it does
CHANLUN is an automated, AI-augmented quantitative trading system.
- Data Ingestion: Captures Level 2 real-time market data.
- Analysis: Uses OpenAI models alongside custom machine learning filters to evaluate market structure and identify trend-following or mean-reversion signals based on Chan Theory.
- Execution: Routes automated trading commands directly through financial APIs.
How we built it
- AI/Logic Layer: OpenAI API utilized for dynamic pattern evaluation, complex state reasoning, and structured output generation.
- Algorithmic Core: Python-based strategy engine implementing Chan Theory structural parsing and custom indicators.
- Data & Execution: Integrated with Futu OpenD API for real-time data feeds and trade execution.
- Infrastructure: Deployed on optimized local compute nodes configured for 24/7 server stability, with hybrid compute offloading (CPU/GPU) for predictive filtering.
Challenges we ran into
- Abstract Pattern Translation: Translating visual and geometric Chan Theory structures into textual or mathematical prompts that the LLM could reliably process without hallucination. We solved this by strictly formatting market states into deterministic JSON payloads before querying the API.
- Execution Latency: LLM inference introduces latency. We mitigated this by offloading high-frequency predictive filtering to local PyTorch/XGBoost models, using OpenAI asynchronously for higher-level strategic confirmation and regime detection.
- Infrastructure Stability: Maintaining stable connection protocols and port configurations for data feeds while managing the compute overhead of concurrent ML models.
What we learned
- Techniques for prompt-engineering LLMs to process time-series and structural financial data accurately.
- Architectural trade-offs between zero-shot generative reasoning and local deterministic model latency.
- The synergy between classical predictive algorithms and generative AI reasoning in live financial markets.
What's next for CHANLUN
- Agentic Workflows: Implement a multi-agent system where distinct LLM agents handle risk management, portfolio allocation, and execution separately.
- Model Fine-Tuning: Fine-tune OpenAI models specifically on historical Chan Theory chart annotations and backtesting logs to reduce inference time and increase signal accuracy.
Log in or sign up for Devpost to join the conversation.