Skip to main content

Overview

This guide walks you through the full Builder workflow: develop a strategy in Jupyter, validate it through backtest → paper → live, and list it on the marketplace.

Why Build on ClyptQ?

Template Format

When you submit a strategy to the marketplace, your .py file is executed inside ClyptQ’s validation sandbox. Your code must follow a specific contract for the platform to validate, backtest, and deploy it correctly.
ML/DL strategies: Currently, only the .py strategy file is submitted — external model files (.pkl, .pt, .onnx) cannot be uploaded. ML/DL workflows that require pre-trained models are supported in the research environment (Jupyter notebooks) but cannot yet be deployed to paper/live or listed on the marketplace. A workspace file explorer for model artifact management is planned.

The main() function

Every strategy must define a main() function that returns a TradingDriver. The platform calls this function to run your strategy. New format (recommended) — receives mode and accounts from the platform:
Old format — no parameters, uses injected global variables:
main() must contain a return driver statement. The platform validates this at submission time — strategies without a return statement will be rejected.

Required metric operators

For marketplace listing, your graph must include three metric operators with exact node names. These operators are computed by ClyptQ’s internal code — the platform extracts final values from these nodes to display verified metrics to traders.
These metric operators are computed by ClyptQ’s internal code, not by user-supplied logic. This is how the platform guarantees that reported metrics are independently verified — builders cannot self-report or manipulate performance numbers.

Required output nodes

Your TradingStrategySpec.output_nodes must include "equity" at minimum:

Configuration parsed from your code

The platform automatically parses the following from your strategy code:
All venues in your SymbolSourceMap must have a matching AccountSpec with initial_cash. Strategies with missing cash configuration will fail validation.

Injected sandbox variables

During validation, the platform injects these variables into your execution environment: During validation, the platform injects the capital level used for testing. Your code should use these values instead of hardcoding initial cash.

Ephemeral operators

Strategies using ephemeral (semantic) operators — LLMScorer, WebSearchOperator, SentimentParser — are handled differently:
  • Backtesting is skipped entirely (these operators hit rate limits and produce non-reproducible results for historical data)
  • Paper trading validation only is performed
  • The strategy listing will display a badge indicating it uses AI/semantic operators

Sandbox security

The platform enforces multiple layers of security during strategy validation to protect the infrastructure and other users. Submitted code is analyzed and executed in an isolated environment with restricted capabilities. Strategies that attempt to access system resources, network endpoints, or execute arbitrary code outside of the ClyptQ operator framework will be automatically rejected. The platform’s validation pipeline is designed to detect and block malicious or abusive patterns at multiple stages — from static analysis through runtime execution.
Focus on writing clean strategy logic using ClyptQ’s operator framework. If your code only uses ClyptQ imports, standard data science libraries (numpy, pandas, scipy, sklearn), and standard Python utilities (datetime, math, json, re, collections), it will pass validation without issues.

Template checklist

Development Workflow

Step 1: Explore

Use the Helper class to discover what’s available:

Step 2: Build the Strategy Graph

Define symbol mapping

Build the graph

Key concepts:
  • FIELD: inputs pull market data from exchanges
  • STATE: inputs pull portfolio state from the executor (cash, positions, entry prices)
  • Each Input declares its lookback — the number of historical ticks it needs
  • The graph handles warmup, buffering, and execution order automatically
See Your First Strategy for a step-by-step walkthrough.

Step 3: Backtest

Configure and run

Compare with zero-cost backtest

If the gap between zero-cost and real-cost returns is > 50% of gross return, your strategy may have excessive trading costs.

Step 4: Submit & Paper Trade

After validating your backtest, submit your strategy to the platform. Paper and live trading cannot be run from notebook cells — they are managed through the dashboard.
  1. Submit your strategy via the marketplace submission flow
  2. From the dashboard, start a Paper Trade run
What happens internally:
  1. Historical warmup loads past data to fill all RollingBuffers
  2. Clock syncs to the next real-time bar boundary
  3. Live data arrives via WebSocket
  4. Orders are executed with simulated fills (same fill model as backtest)

Step 5: Live Trading

From the dashboard, switch to Live mode and connect your exchange API credentials. Safety features built in:
  • Emergency shutdown: Stop from the dashboard to close all positions immediately
  • Balance sync: Detects external changes (manual trades, liquidations, funding)
  • First tick skip: Skips execution on the first real-time tick to avoid stale signals

Step 6: Marketplace Listing

What you submit

Builders submit a TradingSpec — not source code. The spec defines the complete strategy (graph, operators, connections, parameters) in a serializable format.
  • Included: Graph structure, operator types, parameters, input connections, execution configuration
  • Not included: Source code of custom operators (packaged as compiled modules)

Verification process

The platform independently verifies your strategy through automated validation: code validation, backtesting, multi-scale backtesting, and venue sampling (cross-exchange validation).

Marketplace Validation

Full details on each verification stage, consistency scoring, and how validation works

Listing requirements

  • Strategy code passes validation (syntax + security checks)
  • Required metric operators present (sharpe, max_drawdown, total_return)
  • main() function exists and returns TradingDriver
  • "equity" included in output_nodes
  • All venues have matching AccountSpec with initial_cash

Pricing

Set your strategy’s price. Traders pay a one-time purchase fee, and the platform takes a commission based on your seller tier: Tier progression (based on total revenue):
  • Bronze: $10,000+ total revenue
  • Silver: $40,000+ total revenue
  • Gold: $70,000+ total revenue

Best Practices

Strategy development

  • Keep it simple: Fewer parameters reduce the risk of overfitting
  • Use universe filters: Don’t trade every symbol. Filter by volume and liquidity
  • Minimize lookback: Smaller lookback = faster warmup + less memory
  • Test across periods: Use out-of-sample testing. Don’t curve-fit to a single year

Backtesting

  • Compare zero-cost vs real-cost: Check the fee impact on your returns
  • Verify with funding costs: For futures, cumulative funding can erode profits significantly

Common pitfalls

Your First Strategy

Step-by-step SMA crossover tutorial with detailed explanations

Backtest to Live

Full deployment lifecycle from backtest through paper to live

Marketplace

How the strategy marketplace verification works

Operator Reference

Browse all available operators