484 factors · Genetic evolution · Walk-forward validated · No API keys needed
Quick Start · Why FinClaw? · How It Works · MCP Server · Discord
pip install finclaw-ai
finclaw demo # See it in action
finclaw evolve --market crypto # Start evolving strategiesNo API keys. No exchange accounts. No config files.
What does it look like? (click to expand)
$ finclaw demo
=== Strategy Evolution ===
Population: 30 | 484 factors | Walk-forward validated
Gen Return Fitness Sharpe
--- ------ ------- ------
1 3.2% 12.1 0.4
25 18.4% 89.2 1.3
50 31.6% 156.7 1.7
100 48.5% 245.8 2.2
Top factor weights: RSI 0.34, Momentum 0.25, MACD 0.18, Volume 0.12
=== Backtest ===
Strategy: +75.7% (+32.5%/yr) Buy&Hold: +67.7%
Sharpe: 1.85 MaxDD: -8.3%
Most quant tools expect you to write the strategy. FinClaw evolves them instead.
A genetic algorithm breeds a population of strategies across 484 factor dimensions — momentum, volume, volatility, crypto-native signals, sentiment — then walk-forward tests the survivors. You get strategies that work on unseen data, not just historical curves.
| FinClaw | Freqtrade | FinRL / Qlib | |
|---|---|---|---|
| Strategy creation | GA evolves 484-dim DNA | You write rules | DRL trains agent |
| Continuous evolution | ✅ Strategies keep evolving | ❌ Strategy fixed | ❌ Training offline |
| Walk-forward validation | ✅ Built-in + Monte Carlo | ❌ Plugin needed | |
| Zero API keys to start | ✅ | ❌ Needs exchange keys | ❌ Needs data setup |
| Markets | Crypto + A-shares + US | Crypto only | A-shares (Qlib) |
| MCP server for AI agents | ✅ | ❌ | ❌ |
Seed population (random factor weights)
│
▼
┌─────────────┐
│ Backtest │ Walk-forward: 70% train / 30% test
│ each DNA │ Slippage modeled, position caps
└──────┬──────┘
│
▼
Select top performers (Sharpe × Return / MaxDrawdown)
│
▼
Mutate + Crossover → next generation
│
▼
Repeat
Every DNA is a weight vector across 484 factors. The GA explores combinations no human would try. Anti-overfitting is built in: Arena mode runs multiple strategies simultaneously and penalizes crowded signals.
finclaw evolve --market crypto --generations 50
finclaw evolve --pareto --market crypto # Multi-objective (NSGA-III)
finclaw evolve --logic-guided # Semantically guided mutations📊 484 Factors — 284 general + 200 crypto-native (click to expand)
All normalized to [0, 1]:
| Category | Count | Examples |
|---|---|---|
| Crypto-Native | 200 | Funding rate, session effects, whale detection, liquidation cascade |
| Momentum | 14 | ROC, acceleration, trend strength |
| Volume & Flow | 13 | OBV, smart money, Wyckoff VSA |
| Volatility | 13 | ATR, Bollinger squeeze, vol-of-vol |
| Mean Reversion | 12 | Z-score, Keltner channel position |
| Trend Following | 14 | ADX, EMA golden cross, MA fan |
| Qlib Alpha158 | 11 | KMID, KSFT, CNTD (Microsoft Qlib compatible) |
| Risk Warning | 11 | Consecutive losses, death cross, gap-down |
| Quality Filter | 11 | Earnings momentum, relative strength |
| Price Structure | 10 | Candlestick patterns, support/resistance |
| Sentiment | 2 | EN/ZH keyword sentiment + momentum |
| DRL Signal (experimental) | 2 | Q-learning buy probability + state value |
Weights are determined by the evolution engine — no manual tuning.
FinClaw doesn't just backtest. It stress-tests:
- Arena Mode — Multiple strategies compete in the same simulated market. Crowded signals get penalized.
- Monte Carlo — 1,000 iterations, p-value < 0.05
- Walk-Forward — 70/30 train/test split with bootstrap confidence intervals
- Bias Detection — Look-ahead, snooping, survivorship checks
- Factor Orthogonality — Auto-removes redundant factors
- Turnover Penalty — Excessive trading gets penalized in fitness
Expose FinClaw as tools for Claude, Cursor, VS Code, or any MCP client:
{
"mcpServers": {
"finclaw": {
"command": "finclaw",
"args": ["mcp", "serve"]
}
}
}10 tools: get_quote, get_history, list_exchanges, run_backtest, analyze_portfolio, get_indicators, screen_stocks, get_sentiment, compare_strategies, get_funding_rates.
| Command | What it does |
|---|---|
finclaw demo |
See all features in action |
finclaw quote AAPL |
Real-time US stock quote |
finclaw quote BTC/USDT |
Crypto quote via ccxt |
finclaw evolve --market crypto |
Run genetic evolution |
finclaw evolve --pareto |
Multi-objective Pareto evolution |
finclaw backtest -t AAPL |
Backtest a strategy |
finclaw check-backtest |
Verify backtest integrity |
finclaw analyze TSLA |
Technical analysis |
finclaw copilot |
AI financial assistant |
finclaw mcp serve |
Start MCP server |
finclaw paper |
Paper trading mode |
python -m finclaw.viz.evolution_tree <log> |
ASCII evolution timeline |
python -m finclaw.viz.parse_evolution_log <log> |
Parse evolution log → JSON |
70+ commands total — run finclaw --help for the full list.
| Market | Source | API Key? |
|---|---|---|
| Crypto | ccxt (100+ exchanges) | No |
| US Stocks | Yahoo Finance | No |
| A-Shares | AKShare + BaoStock | No |
| Sentiment | CryptoCompare + AKShare | No |

Watch: How FinClaw's Evolution Engine Works (2 min)
- 484-factor evolution engine
- Walk-forward + Monte Carlo + Arena mode
- Bias detection suite
- MCP server for AI agents
- Multi-objective Pareto evolution (NSGA-III)
- Market Logic Layer (semantically guided mutations)
- Paper trading infrastructure
- Evolution visualization (CLI ASCII tree + interactive HTML dashboard)
- DEX execution (Uniswap V3 / Arbitrum)
- Multi-timeframe strategy evolution (1h / 4h / 1d)
- Foundation model for price sequences
- Web dashboard with live P&L tracking
- QuantConnect-style cloud execution (SaaS)
- Mobile alerts via Telegram/Discord
- Community strategy marketplace
This project is for educational and research purposes only. Not financial advice. Past performance does not guarantee future results. Always paper trade first.
Honest disclosure: Previous versions reported inflated backtest returns caused by look-ahead bias. This has been fixed — scoring now uses previous-period data, position sizes are capped, and slippage is modeled. Use
finclaw check-backtestto verify results.
| Project | What it does |
|---|---|
| ClawGuard | AI Agent Immune System — 480+ threat patterns, zero dependencies |
| AgentProbe | Playwright for AI Agents — test, record, replay agent behaviors |
We welcome contributions! Here's how to get started:
- Pick an issue — look for
good first issuelabels - Fork & clone
git clone https://github.com/NeuZhou/finclaw.git cd finclaw && pip install -e ".[dev]" && pytest
- Submit a PR — we review within 48 hours
CONTRIBUTING.md · Discord · Report Bug · Request Feature
