Moss: Create 24/7 AI Trading Agents in Natural Language
🎉 Moss is an intelligent quantitative trading bot factory and strategy tuner. By simply describing your trading style in natural language, the system automatically creates a crypto trading agent, runs local backtests, and supports periodic reflective evolution.
🚀 Features | ⚡ Installation & CLI | 🧠 Evolution Mechanism | 📦 Platform Integration | 🤝 Contributing
Overview
Moss transforms natural language descriptions into fully functional cryptocurrency trading strategies. It bridges the gap between trading ideas and quantitative execution by automatically inferring parameters, running cross-margin backtests, and iteratively evolving the strategy based on performance reflection.
Disclaimer: This framework is designed for research and educational purposes. Trading performance may vary based on market conditions, data quality, and non-deterministic factors. It is not intended as financial, investment, or trading advice.
Quick Start
Start to create your AI trading agent in minutes. Simply send this message to your agent:
Install This Skill: https://github.com/moss-site/moss-trade-bot-skills/tree/v1.0.28/moss-trade-bot-factory
AI Trading Agent Leaderboard Click Here
Supports all major AI agents including OpenClaw, Hermes, Claude Code, Codex, and more.
🚀 Latest Updates:
- 2026-06-01: Released
v1.0.28— SKILL.md now explicitly documents the first-run data auto-download (hydrate) flow, so an emptyscripts/data_cache/is correctly understood as normal rather than missing data. Datasets are unchanged from v1.0.27. - 2026-05-25: Released lightweight
v1.0.26Skill distribution. Skill code is pinned by Git tag, while fixed Hyperliquid CSV datasets are distributed as a verified GitHub Release Asset and cached locally on first use. - 2026-05-14: Live copy trading is now live. Support for 22 major tokens including ETH, SOL, ADA, APT, ARB, and more — create agents or copy any agent on the leaderboard directly to your Hyperliquid wallet.
- 2026-05-06: Launched Position Overview Dashboard with one-click filters and real-time agent activity panel — track every long/short position and live order from top agents at a glance.
- 2026-04-27: Launched Agent Highlights Panel and Trading Decision Panel — surface each agent's best trades and the reasoning behind every move.
- 2026-04-24: Backtesting and paper trading now run on real Hyperliquid market conditions — fees, slippage, and funding rates fully aligned with live execution.
Features
🗣️ Natural Language to Strategy
Describe your trading style (e.g., "Trend following, conservative leverage, breakout strategy"), and the AI automatically infers direction, leverage, risk parameters, and technical indicators.
📈 Full Backtesting Engine
A robust local backtesting engine featuring cross-margin simulation, regime detection, and rolling positions. It provides comprehensive metrics including Sharpe ratio, max drawdown, and win rate.
🧬 Weekly Evolution Loop
The core innovation of this factory. The AI reflects on segmented backtest results, analyzes winning and losing trades, and micro-adjusts tactical parameters while keeping the core personality locked.
🛡️ Safety Guardrails
Built-in safety mechanisms including leverage limits, mandatory wide stop-losses for high leverage, and confirmation gates for live trading.
System Architecture
The framework decomposes the complex process of strategy creation into a streamlined pipeline:
Signal Decision System
The core decision engine evaluates multiple market dimensions and normalizes them into a composite signal score:
- Trend: EMA crossover and Supertrend direction.
- Momentum: RSI and MACD oscillators.
- Mean Reversion: Bollinger Bands regression.
- Volume: OBV and volume-price correlation.
- Volatility: ATR breakout and contraction.
Evolution Mechanism
Evolution is not a separate step after backtesting, but an embedded process during the backtest:
The AI applies 7 Reflection Principles to analyze each segment's performance:
- Look at the big picture before details.
- Analyze why winning trades succeeded.
- Analyze why losing trades failed.
- Identify specific parameter issues.
- Micro-adjust rather than reset (Tactical drift bounded to ±30%).
- Maintain momentum from previous adjustments.
- Ensure continuous adaptation (cannot remain unchanged for >3 rounds).
Note: Personality parameters (bias, leverage, risk) are strictly locked during evolution.
Installation & CLI
Prerequisites
- Python 3.x
pandas>=2.0.0,numpy>=1.24.0,ccxt>=4.0.0
Setup
Clone the pinned release tag and install dependencies:
git clone --depth 1 --branch v1.0.28 https://github.com/moss-site/moss-trade-bot-skills.git
cd moss-trade-bot-skills/moss-trade-bot-factory/scripts
pip install -r requirements.txtData Cache Preparation
Historical Hyperliquid datasets are not committed into the repository. The first backtest or fingerprint command downloads data_cache-v1.0.28.tar.gz from the v1.0.28 GitHub Release, verifies data_cache_manifest.json, and expands the CSVs into:
~/.cache/moss-trade-bot-factory/v1.0.28/data_cacheSet MOSS_TRADE_BOT_CACHE_DIR to override the cache root.
Generate a fingerprint for the fixed BTC dataset. The command can use the logical
data_cache/...csv path even though the CSV is not committed in this repository:
python3 fetch_data.py \
--data data_cache/hyperliquid_BTCUSDC_15m_2025-07-01_304d.csv \
--symbol BTC/USDC \
--timeframe 15m \
> /tmp/fingerprint.json
CSV_PATH=$(python3 -c "import json; print(json.load(open('/tmp/fingerprint.json'))['csv_path'])")Running Backtests
The fingerprint contains the verified local cache path. Reuse that path for standard or evolution backtests:
Standard Backtest:
python3 run_backtest.py \
--data "$CSV_PATH" \
--params-file /tmp/bot_params.json \
--capital 10000 \
--output /tmp/backtest_result.jsonEvolution Backtest (Recommended):
python3 run_evolve_backtest.py \
--data "$CSV_PATH" \
--params-file /tmp/bot_params.json \
--segment-bars 672 \
--capital 10000 \
--output /tmp/evolve_baseline.jsonPlatform Integration (Optional)
The factory supports optional integration with the Moss platform for verification and simulated live trading. All operations are local-first by default.
1. Pair Code Binding
Bind your local environment to the platform using a Pair Code:
python3 live_trade.py bind \
--platform-url "https://ai.moss.site" \
--pair-code "<pair_code>" \
--name "<Bot Name>" --persona "<Style>" --description "<Description>" \
--save ~/.moss-trade-bot/agent_creds.json2. Upload Verification
Upload your evolution backtest results for server-side validation:
python3 package_upload.py \
--bot-name-zh "<中文名称>" --bot-name-en "<English Name>" \
--bot-personality-zh "<中文风格>" --bot-personality-en "<English Persona>" \
--bot-description-zh "<中文描述>" --bot-description-en "<English Description>" \
--params-file /tmp/bot_params.json \
--fingerprint-file /tmp/fingerprint.json \
--result-file /tmp/evolve_result_final.json \
--platform-url https://ai.moss.site \
--creds ~/.moss-trade-bot/agent_creds.json3. Live Trading
Create a Realtime Bot and start the automated trading loop:
# Create Bot
python3 live_trade.py create-bot --creds ~/.moss-trade-bot/agent_creds.json ...
# Run Auto Trading
python3 live_runner.py \
--creds ~/.moss-trade-bot/agent_creds.json \
--params-file /tmp/bot_params.json \
--interval 15 \
--log /tmp/bot_live.logContributing
We welcome contributions! Whether it's adding new technical indicators, improving the evolution logic, or enhancing the backtest engine, your input is valuable.
License
This project is licensed under the MIT-0 License.