What We’re Building
A strategy that augments traditional technical indicators with AI-powered operators:- Traditional layer — RSI and SMA crossover for base signal
- AI layer — LLM scores market conditions, web search provides sentiment
- Gate pattern — Only call expensive AI operators when volatility is high (cost control)
- Signal fusion — Combine technical and AI signals into final weights
Step 1: Setup
Step 2: Traditional Indicators
Build the base technical signal (same pattern as First Strategy):Step 3: Volatility Gate
The gate controls when expensive AI operators run. High volatility = uncertain market = AI analysis is most valuable:- ATR > 2% → gate outputs 1.0 (open) → AI operators execute
- ATR ≤ 2% → gate outputs 0.0 (closed) → AI operators skip (return cached or neutral values)
Step 4: LLM Scorer
TheLLMScorer sends indicator values to an LLM and receives a [-1, 1] trading signal:
inputs— The indicator values sent to the LLM as numeric contextinput_names— Human-readable names used in the prompt (e.g., “RSI: 72.3, SMA_Crossover: 0.8”)model— LLM model to use (deepseek-v3, gemini-flash, gpt-4o, etc.)call_interval— Only call the LLM every N ticks. Between calls, the last score is reused
The LLM receives a formatted prompt with the indicator values and returns a numeric score. The default prompt asks for a trading signal based on the technical indicators. You can customize both
system_prompt and user_prompt_template.Step 5: Web Search + Sentiment
Fetch market news and parse sentiment:query_template— Uses{symbol}placeholder (e.g., “cryptocurrency BTC/USDT market news”)gate_input— When gate is closed (0.0), search is skipped entirely (no API cost)cache_results— Caches results to avoid redundant searchescache_ttl— Cache duration in seconds
- Takes text from
WebSearchOperatoroutput - Returns [-1.0, 1.0] sentiment score
model="rule-based"uses keyword matching (no API calls — good for cost-sensitive strategies)
Step 6: Signal Fusion
Combine technical and AI signals with explicit weights:llm_score and sentiment return 0.0 (neutral), so the backtest effectively runs on technical signals only. In paper/live, the AI signals augment the technical base.
Step 7: Portfolio Accounting + Intention
Step 8: Run
Backtest (technical signals only)
Paper & Live Trading
After backtesting, submit your strategy to the platform. Paper and live trading run on the dashboard — semantic operators (LLM scoring, web search) activate automatically in paper and live modes. They are skipped during backtest because they require real-time data and produce non-reproducible results.Paper and live trading are not available in notebook cells. Submit your strategy and manage execution from the dashboard.
The Complete Graph
Cost Control Strategies
Gate conditions
Combine gates
call_interval optimization
call_interval=60 reduces costs by 98% with minimal signal degradation.
Related Pages
Semantic Operators
LLMScorer, WebSearch, and SentimentParser reference
Control Operators
ConditionalGate, GateOr, GateAnd reference
Semantic Operators (Competitive)
Why LLM-in-the-loop is unique to ClyptQ
Backtest to Live
Deploy this strategy from paper to live

