echolon
Echolon
๐ English ยท ็ฎไฝไธญๆ
An LLM-agent-native backtest framework for futures research. Ships an MCP server, 22 in-package skills, 32 catalogued error codes, and typed Pydantic configs โ agents call structured tools instead of guessing API shapes from prose docs. End-to-end on SHFE daily futures.
Production engine inside Qorka, DolphinQuant's AI-native strategy generation product. Exercised by real money on SHFE every trading day.
Quickstart
Three commands cover the natural newcomer arc:
Command | Purpose | Time |
| Quick demo. Downloads SHFE aluminum (last 2y) via akshare, scaffolds a strategy, runs a backtest. Network required. | ~30s |
| Start a real project. Downloads market data via akshare (free, no signup), scaffolds a strategy from a template, writes a workspace marker. | ~1โ5 min |
| Iterate after editing. Walks up to recover ctx from the workspace marker, recomputes indicators, runs the backtest. No flags needed. | ~5โ10s |
pip install echolon
mkdir -p ~/echolon-playground && cd ~/echolon-playground
echolon hello # 30-second demoecholon hello downloads ~2y of aluminum data, scaffolds the momentum_breakout template, writes .echolon-workspace.json, and runs the backtest. Open ./echolon-hello/strategy/baseline/entry.py, tweak a parameter, then re-run with echolon backtest single ./echolon-hello/strategy/baseline/ to see how the Sharpe shifts.
Three templates ship in-package โ minimal, momentum_breakout, rsi_mean_reversion. echolon examples --list shows them; pass --template <name> to echolon init / echolon hello to start from one.
If
pip installfails on Linux ARM64 / Alpine / FreeBSD, runecholon doctorโ it diagnoses ta-lib's C library, the only dependency that may need source-building outside the standard prebuilt-wheel platforms (Linux x86_64, macOS x86_64+arm64, Windows x86_64; Python 3.11โ3.12).
Drive it from your agent
pip install echolon # 1. install
claude mcp add -s user echolon -- echolon-mcp # 2. register MCP server (user-wide)
# 3. restart Claude Code to load mcp__echolon__* toolsThen ask:
"Build a trend-following strategy on copper, backtest 2018โ2024."
Behind the scenes the agent calls list_skills โ picks patterns and quick_start โ load_template("momentum_breakout") โ list_indicators(has_lookback=True) โ edits entry.py and exit.py โ loops validate_strategy_full(strategy_dir) until everything passes โ runs the backtest. If anything breaks, it parses [CODE-NNN] from the traceback and calls get_error_doc(code). There's no point where it has to guess.
Runtime | Setup |
Claude Code |
|
Cursor | In |
OpenAI Codex CLI |
|
OpenAI Agents SDK (Python) |
|
LangChain / LangGraph |
|
Any other MCP-compatible client (CrewAI, AutoGen, โฆ) | Configure it as a stdio server with |
For Claude Code: -s user makes the registration apply across all your projects (drop it for current-project-only); -- separates the registration name from the launch command. After running once, claude mcp list should show echolon as a connected stdio server. The agent's orientation guide is llms.txt โ also dropped at the workspace root by echolon init / hello so an agent walking into the project finds it without needing the package.
What's in scope today
Done end-to-end (production-grade, exercised daily):
SHFE daily futures research โ data ingestion, 214-indicator catalog, Backtrader execution, Optuna TPE optimization (single + multi-objective), walk-forward analysis with deployment-readiness scoring, KMeans-based robust trial selection.
Agent surface โ 23 MCP tools, 22 skills, 32 error codes, 3 working templates.
Not yet (open an issue if you want to drive a slice forward):
SHFE intraday backtesting โ data pipeline ready, engine plumbing being firmed up.
Live trading via MiniQMT โ clean public release in progress.
Crypto perpetuals (CCXT adapter scaffolded), CME futures, equities.
Optuna alternatives (no grid, no random, no Bayesian-budget search), distributed orchestration, Python โค 3.10.
Pre-1.0 โ public API may change between minor versions. Breaking changes documented in CHANGELOG.md.
Bring your own data
If you already have raw SHFE XLS files (downloaded from shfe.com.cn), run SHFEFileDayExtractor directly instead of using akshare. For other formats (broker CSV, tushare, custom DB), three files must end up under {workspace}/workspace/data/market_data/SHFE/{instrument}/:
File | Schema |
|
|
| Same columns, all rows concatenated and sorted by date. |
|
|
Plus under {workspace}/data/SHFE/{instrument_code}/ (note the SHORT code, e.g. al not aluminum):
File | Schema |
|
|
Echolon does not auto-derive main_contract.csv from raw OHLCV โ it's a USER input that encodes your roll convention (rules based on volume, open interest, or days to expiry). For SHFE via akshare, echolon init derives it for you; otherwise produce it yourself and drop it in place.
Project info
Apache 2.0 โ see LICENSE. Use freely, commercially or otherwise. Active development, v0.1.2 beta. Built and maintained by DolphinQuant โ the same team running Qorka on SHFE. Issues and pull requests welcome at github.com/dolphinquant/echolon.
@software{echolon,
title = {Echolon: AI-native quantitative trading engine},
author = {DolphinQuant},
year = {2026},
url = {https://github.com/dolphinquant/echolon},
}Maintenance
Latest Blog Posts
MCP directory API
We provide all the information about MCP servers via our MCP API.
curl -X GET 'https://glama.ai/api/mcp/v1/servers/DolphinQuant/echolon'
If you have feedback or need assistance with the MCP directory API, please join our Discord server