{"id":47787969,"url":"https://github.com/NeuZhou/finclaw","last_synced_at":"2026-04-08T21:01:07.902Z","repository":{"id":344561931,"uuid":"1182201953","full_name":"NeuZhou/finclaw","owner":"NeuZhou","description":"Genetic algorithms evolve trading strategies from 484 factors. A-shares, US stocks, Crypto. 5500+ tests.","archived":false,"fork":false,"pushed_at":"2026-04-07T06:42:58.000Z","size":20367,"stargazers_count":37,"open_issues_count":5,"forks_count":7,"subscribers_count":2,"default_branch":"master","last_synced_at":"2026-04-07T07:23:40.343Z","etag":null,"topics":["a-shares","ai-agent","backtesting","ccxt","crypto","genetic-algorithm","mcp","python","quantitative-finance","strategy-evolution","trading"],"latest_commit_sha":null,"homepage":"https://pypi.org/project/finclaw-ai/","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"agpl-3.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/NeuZhou.png","metadata":{"files":{"readme":"README.ja.md","changelog":"CHANGELOG.md","contributing":"CONTRIBUTING.md","funding":".github/FUNDING.yml","license":"LICENSE","code_of_conduct":"CODE_OF_CONDUCT.md","threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":"SECURITY.md","support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null},"funding":{"github":"NeuZhou"}},"created_at":"2026-03-15T07:16:57.000Z","updated_at":"2026-04-07T06:43:02.000Z","dependencies_parsed_at":null,"dependency_job_id":null,"html_url":"https://github.com/NeuZhou/finclaw","commit_stats":null,"previous_names":["neuzhou/finclaw"],"tags_count":16,"template":false,"template_full_name":null,"purl":"pkg:github/NeuZhou/finclaw","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/NeuZhou%2Ffinclaw","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/NeuZhou%2Ffinclaw/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/NeuZhou%2Ffinclaw/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/NeuZhou%2Ffinclaw/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/NeuZhou","download_url":"https://codeload.github.com/NeuZhou/finclaw/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/NeuZhou%2Ffinclaw/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":31573788,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-04-08T14:31:17.711Z","status":"ssl_error","status_checked_at":"2026-04-08T14:31:17.202Z","response_time":54,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.5:443 state=error: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["a-shares","ai-agent","backtesting","ccxt","crypto","genetic-algorithm","mcp","python","quantitative-finance","strategy-evolution","trading"],"created_at":"2026-04-03T15:05:03.627Z","updated_at":"2026-04-08T21:01:07.889Z","avatar_url":"https://github.com/NeuZhou.png","language":"Python","readme":"﻿[English](README.md) | [中文](README.zh-CN.md) | [한국어](README.ko.md) | [日本語](README.ja.md)\n\n# FinClaw 🦀\n\n**自己進化する投資インテリジェンス — 遺伝的アルゴリズムがあなたの想像を超える戦略を発見します。**\n\n\u003cp align=\"center\"\u003e\n  \u003ca href=\"https://pypi.org/project/finclaw-ai/\"\u003e\u003cimg src=\"https://img.shields.io/pypi/v/finclaw-ai?color=blue\" alt=\"PyPI\"\u003e\u003c/a\u003e\n  \u003ca href=\"https://github.com/NeuZhou/finclaw/actions/workflows/ci.yml\"\u003e\u003cimg src=\"https://github.com/NeuZhou/finclaw/actions/workflows/ci.yml/badge.svg\" alt=\"CI\"\u003e\u003c/a\u003e\n  \u003ca href=\"https://codecov.io/gh/NeuZhou/finclaw\"\u003e\u003cimg src=\"https://codecov.io/gh/NeuZhou/finclaw/graph/badge.svg\" alt=\"codecov\"\u003e\u003c/a\u003e\n  \u003ca href=\"https://opensource.org/licenses/AGPL-3.0\"\u003e\u003cimg src=\"https://img.shields.io/badge/License-AGPL--3.0-blue.svg\" alt=\"License\"\u003e\u003c/a\u003e\n  \u003ca href=\"https://www.python.org/\"\u003e\u003cimg src=\"https://img.shields.io/badge/python-3.10%2B-blue\" alt=\"Python 3.10+\"\u003e\u003c/a\u003e\n  \u003cimg src=\"https://img.shields.io/badge/factors-484-orange\" alt=\"484 Factors\"\u003e\n  \u003cimg src=\"https://img.shields.io/badge/tests-6000%2B-brightgreen\" alt=\"6000+ Tests\"\u003e\n  \u003cimg src=\"https://img.shields.io/badge/markets-crypto%20%7C%20A--shares%20%7C%20US-ff69b4\" alt=\"Crypto + A-shares + US\"\u003e\n  \u003ca href=\"https://github.com/NeuZhou/finclaw/stargazers\"\u003e\u003cimg src=\"https://img.shields.io/github/stars/NeuZhou/finclaw?style=social\" alt=\"GitHub Stars\"\u003e\u003c/a\u003e\n\u003c/p\u003e\n\n\u003cp align=\"center\"\u003e\n  \u003cimg src=\"assets/hero-finclaw.png\" alt=\"FinClaw — Self-Evolving Trading Intelligence\" width=\"800\"\u003e\n\u003c/p\u003e\n\n\u003cp align=\"center\"\u003e\n  \u003ca href=\"https://www.youtube.com/watch?v=Y3wY9rj0PmE\"\u003e\n    \u003cimg src=\"https://img.youtube.com/vi/Y3wY9rj0PmE/maxresdefault.jpg\" alt=\"FinClaw Demo Video\" width=\"600\"\u003e\n  \u003c/a\u003e\n  \u003cbr\u003e\n  \u003cem\u003e▶️ Watch: How FinClaw's Self-Evolving Engine Works (2 min)\u003c/em\u003e\n\u003c/p\u003e\n\n\u003e FinClawは戦略の手動設計を必要としません。遺伝的アルゴリズムが484次元のファクター空間で**戦略を自律的に発見・進化**させ、Walk-Forward検証とモンテカルロ・シミュレーションで有効性を確認します。\n\n## 免責事項\n\n本プロジェクトは**教育・研究目的のみ**です。投資助言ではありません。過去のパフォーマンスは将来の結果を保証しません。必ず最初にペーパートレードで検証してください。\n\n---\n\n## 🚀 クイックスタート\n\n```bash\npip install finclaw-ai\nfinclaw demo          # すべての機能を体験\nfinclaw quote AAPL    # リアルタイム相場\nfinclaw quote BTC/USDT # 暗号資産も対応\n```\n\nAPIキーも取引所アカウントも設定ファイルも不要です。\n\n---\n\n\u003cdetails\u003e\n\u003csummary\u003e📺 実行例を見る（クリックで展開）\u003c/summary\u003e\n\n```\n$ finclaw demo\n\n███████╗██╗███╗   ██╗ ██████╗██╗      █████╗ ██╗    ██╗\n██╔════╝██║████╗  ██║██╔════╝██║     ██╔══██╗██║    ██║\n█████╗  ██║██╔██╗ ██║██║     ██║     ███████║██║ █╗ ██║\n██╔══╝  ██║██║╚██╗██║██║     ██║     ██╔══██║██║███╗██║\n██║     ██║██║ ╚████║╚██████╗███████╗██║  ██║╚███╔███╔╝\n╚═╝     ╚═╝╚═╝  ╚═══╝ ╚═════╝╚══════╝╚═╝  ╚═╝ ╚══╝╚══╝\nAI-Powered Financial Intelligence Engine\n\n🎬 FinClaw Demo — All features, zero config\n\n━━━ 📊 Real-Time Quotes ━━━\n\nSymbol        Price     Change        %                 Trend\n────────────────────────────────────────────────────────────\nAAPL                 189.84    +2.31  +1.23%  ▃▃▂ ▂▂▂▃▂ ▄▅▅▇█▇▃▄▄▃\nNVDA                 875.28   +15.67  +1.82%    ▃▅▄▁▅▆▇█▄▅▆▇▄▄▄▄▅▄\nTSLA                 175.21    -3.45  -1.93%  ▅▃▃▃▃▃▄▆▄▄▆▅▆▅▇█▅▃▂ \nMSFT                 415.50    +1.02  +0.25%  ▁▁▂▅▅▄▄▂▃▅▆▆▆▆▇▇▆▃  \n\n━━━ 🚀 Backtest: Momentum Strategy on AAPL ━━━\n\nStrategy:  +75.7%  (+32.5%/yr)    Buy\u0026Hold:  +67.7%\nAlpha:     +8.0%                  Sharpe:    1.85\nMaxDD:     -8.3%                  Win Rate:  63%\n```\n\n\u003c/details\u003e\n\n---\n\n## なぜ FinClaw なのか？\n\n多くのクオンツツールは**あなた自身が**戦略を書く必要があります。FinClawは戦略を**あなたのために**進化させます。\n\n| | FinClaw | Freqtrade | Jesse | FinRL / Qlib |\n|---|---|---|---|---|\n| 戦略設計 | GAが484次元DNAを進化 | ユーザーがルール記述 | ユーザーがルール記述 | DRLでエージェント訓練 |\n| 継続的進化 | **戦略自体が進化し続ける** | ボット稼働、戦略固定 | ボット稼働、戦略固定 | 学習はオフライン |\n| Walk-Forward検証 | ✅ 内蔵 (70/30 + モンテカルロ) | ❌ プラグイン必要 | ❌ プラグイン必要 | ⚠️ 部分的 |\n| 過学習対策 | Arena競争 + バイアス検出 | 基本的なクロスバリデーション | 基本的 | ツールによる |\n| APIキー不要 | ✅ `pip install \u0026\u0026 finclaw demo` | ❌ 取引所キー必要 | ❌ キー必要 | ❌ データセットアップ必要 |\n| 対応市場 | 暗号資産 + A株 + 米国株 | 暗号資産のみ | 暗号資産のみ | A株 (Qlib) |\n| MCPサーバー (AIエージェント) | ✅ Claude / Cursor / VS Code | ❌ | ❌ | ❌ |\n| ファクターライブラリ | 484ファクター、自動重み付け | ~50個の手動指標 | 手動指標 | Alpha158 (Qlib) |\n\n---\n\n## 📊 484ファクター次元\n\n284の汎用ファクター + 200の暗号資産固有ファクター、カテゴリ別に整理：\n\n| カテゴリ | 数 | 例 |\n|----------|-------|---------|\n| 暗号資産固有 | 200 | ファンディングレートプロキシ、セッション効果、クジラ検出、連鎖清算 |\n| モメンタム | 14 | ROC、加速度、トレンド強度、クオリティ・モメンタム |\n| 出来高＆フロー | 13 | OBV、スマートマネー、出来高-価格乖離、Wyckoff VSA |\n| ボラティリティ | 13 | ATR、ボリンジャー・スクイーズ、レジーム検出、ボラティリティのボラティリティ |\n| 平均回帰 | 12 | Zスコア、ラバーバンド、ケルトナーポジション |\n| トレンドフォロー | 14 | ADX、EMAゴールデンクロス、高値切り上げ・安値切り上げ、MAファン |\n| Qlib Alpha158 | 11 | KMID、KSFT、CNTD、CORD、SUMP（Microsoft Qlib互換） |\n| クオリティフィルター | 11 | 収益モメンタムプロキシ、相対力、レジリエンス |\n| リスク警告 | 11 | 連続損失、デッドクロス、ギャップダウン、ストップ安 |\n| 天井脱出 | 10 | ディストリビューション検出、クライマックス出来高、スマートマネー退出 |\n| 価格構造 | 10 | ローソク足パターン、サポート/レジスタンス、ピボットポイント |\n| Davis Double Play | 8 | 売上加速、テクノロジー・モート、供給枯渇 |\n| ギャップ分析 | 8 | ギャップフィル、ギャップモメンタム、ギャップリバーサル |\n| 市場幅 | 5 | 騰落指標、セクターローテーション、新高値/新安値 |\n| ニュースセンチメント | 2 | EN/ZHキーワードセンチメントスコア + モメンタム |\n| DRLシグナル *(experimental)* | 2 | Q-learning買い確率 + 状態値推定 |\n\n\u003e **設計思想**: テクニカル、センチメント、DRL、ファンダメンタル — すべてのシグナルは`[0, 1]`を返すファクターとして統一表現されます。重み付けは進化エンジンが決定し、シグナル合成に人間のバイアスを持ち込みません。\n\n---\n\n## 🧬 自己進化エンジン\n\n遺伝的アルゴリズムが最適な戦略を継続的に発見します：\n\n1. **シード** — 多様なファクター重み構成で初期集団を生成\n2. **評価** — Walk-Forward検証で各DNAをバックテスト\n3. **選択** — 適応度（Sharpe × Return / MaxDrawdown）上位を保持\n4. **変異** — ランダムな重み摂動、交配、ファクター追加/削除\n5. **反復** — マシン上で7×24稼働\n\n```bash\nfinclaw evolve --market crypto --generations 50   # 暗号資産（主要ユースケース）\nfinclaw evolve --market cn --generations 50       # A株\nfinclaw evolve --market crypto --population 50 --mutation-rate 0.2 --elite 10\n```\n\n### 進化結果\n\n| 市場 | 世代 | 年間収益率 | シャープレシオ | 最大ドローダウン |\n|--------|-----------|---------------|--------|-------------|\n| A株 | 第89世代 | *再進化中* | — | — |\n| 暗号資産 | 第19世代 | *再進化中* | — | — |\n\n\u003e **誠実な開示：** 旧バージョンで報告されたバックテストリターン（2,756% / 16,066%）にはルックアヘッドバイアス（look-ahead bias）がありました。この問題は**修正済み**です。進化エンジンを修正後のバックテスターで再実行する必要があります。`finclaw check-backtest`で検証し、`finclaw paper`でペーパートレードしてから実資金を投入してください。\n\n---\n\n## 🏟️ Arenaモード（過学習対策）\n\n従来のバックテストは各戦略を個別に評価するため、過学習した戦略がヒストリカルデータでは好成績でもライブでは失敗します。FinClawの**Arenaモード**がこの問題を解決します：\n\n- 複数のDNA戦略が同一のシミュレーション市場で同時に取引\n- **混雑ペナルティ**: 50%以上のDNA戦略が同じシグナルで買いに入ると、プライスインパクトが発動\n- 孤立環境でしか機能しない過学習戦略はArenaランキングでペナルティを受ける\n\n---\n\n## ✅ 品質保証\n\n- Walk-Forward検証（70/30 学習/テスト分割）\n- モンテカルロ・シミュレーション（1,000回反復、p値 \u003c 0.05）\n- ブートストラップ95%信頼区間\n- Arena競争（マルチDNA市場シミュレーション）\n- バイアス検出（先読み、スヌーピング、生存者）\n- ファクターIC/IR分析と減衰曲線\n- ファクター直交行列（冗長ファクターの自動除去）\n- 適合度関数における売買回転率ペナルティ\n- 4,900以上の自動テスト\n\n---\n\n## 💻 CLIリファレンス\n\nFinClawは70以上のサブコマンドを搭載しています。主要なものを紹介します：\n\n| コマンド | 説明 |\n|---------|-------------|\n| `finclaw demo` | 全機能をデモ |\n| `finclaw quote AAPL` | リアルタイム米国株相場 |\n| `finclaw quote BTC/USDT` | 暗号資産相場（ccxt経由） |\n| `finclaw evolve --market crypto` | 遺伝的アルゴリズム進化を実行 |\n| `finclaw backtest -t AAPL` | 株式で戦略バックテスト |\n| `finclaw check-backtest` | バックテスト結果を検証 |\n| `finclaw analyze TSLA` | テクニカル分析 |\n| `finclaw screen` | 銘柄スクリーニング |\n| `finclaw risk-report` | ポートフォリオリスクレポート |\n| `finclaw sentiment` | 市場センチメント |\n| `finclaw copilot` | AI金融アシスタント |\n| `finclaw generate-strategy` | 自然言語 → 戦略コード |\n| `finclaw mcp serve` | AIエージェント向けMCPサーバー |\n| `finclaw paper` | ペーパートレードモード |\n| `finclaw doctor` | 環境チェック |\n\n全コマンド一覧は `finclaw --help` で確認できます。\n\n---\n\n## 🤖 MCPサーバー（AIエージェント向け）\n\nFinClawをClaude、Cursor、VS Code、その他MCP対応クライアント向けのツールとして公開：\n\n```json\n{\n  \"mcpServers\": {\n    \"finclaw\": {\n      \"command\": \"finclaw\",\n      \"args\": [\"mcp\", \"serve\"]\n    }\n  }\n}\n```\n\n10種類のツールを提供: `get_quote`、`get_history`、`list_exchanges`、`run_backtest`、`analyze_portfolio`、`get_indicators`、`screen_stocks`、`get_sentiment`、`compare_strategies`、`get_funding_rates`。\n\n---\n\n## 📡 データソース\n\n| 市場 | ソース | APIキーは必要？ |\n|--------|--------|-----------------|\n| 暗号資産 | ccxt（100以上の取引所） | 不要（公開データ） |\n| 米国株 | Yahoo Finance | 不要 |\n| A株 | AKShare + BaoStock | 不要 |\n| ニュースセンチメント | CryptoCompare + AKShare | 不要 |\n\n---\n\n## アーキテクチャ\n\n```\n┌──────────────────────────────────────────────────────┐\n│             Evolution Engine (Core)                   │\n│      Genetic Algorithm → Mutate → Backtest → Select   │\n│                                                       │\n│      Input: 484 factors × weights = DNA               │\n│      Output: Walk-forward validated strategy           │\n├──────────────────────────────────────────────────────┤\n│   Technical(284) │ Sentiment │ DRL │ Davis │ Crypto(200)│\n│       All → compute() → [0, 1]                        │\n├──────────────────────────────────────────────────────┤\n│   Arena Competition │ Bias Detection │ Monte Carlo     │\n├──────────────────────────────────────────────────────┤\n│   Paper Trading → Live Trading → 100+ Exchanges       │\n└──────────────────────────────────────────────────────┘\n```\n\n---\n\n## ロードマップ\n\n- [x] 484ファクター進化エンジン\n- [x] Walk-Forward検証 + モンテカルロ\n- [x] Arena競争モード\n- [x] バイアス検出スイート\n- [x] ニュースセンチメント + DRLファクター\n- [x] Davis Double Playファクター\n- [x] ペーパートレード基盤\n- [x] AIエージェント向けMCPサーバー\n- [ ] DEX執行（Uniswap V3 / Arbitrum）\n- [ ] マルチタイムフレーム対応（1h/4h/1d）\n- [ ] 価格系列向けファウンデーションモデル\n\n---\n\n## 🌐 エコシステム\n\nFinClawはNeuZhou AIエージェントツールキットの一部です：\n\n| プロジェクト | 説明 |\n|---------|-------------|\n| **[FinClaw](https://github.com/NeuZhou/finclaw)** | AI native 量的金融エンジン |\n| **[ClawGuard](https://github.com/NeuZhou/clawguard)** | AIエージェント免疫システム — 285以上の脅威パターン、ゼロ依存 |\n| **[AgentProbe](https://github.com/NeuZhou/agentprobe)** | AIエージェント向けPlaywright — テスト、記録、リプレイ |\n\n---\n\n## コントリビューション\n\n```bash\ngit clone https://github.com/NeuZhou/finclaw.git\ncd finclaw \u0026\u0026 pip install -e \".[dev]\" \u0026\u0026 pytest\n```\n\nガイドラインは[CONTRIBUTING.md](CONTRIBUTING.md)をご覧ください。[バグ報告](https://github.com/NeuZhou/finclaw/issues) · [機能リクエスト](https://github.com/NeuZhou/finclaw/issues)\n\n---\n\n## ライセンス\n\n[AGPL-3.0](LICENSE)\n\n---\n\n## Star History\n\n\u003ca href=\"https://www.star-history.com/#NeuZhou/finclaw\u0026Date\"\u003e\n  \u003cpicture\u003e\n    \u003csource media=\"(prefers-color-scheme: dark)\" srcset=\"https://api.star-history.com/svg?repos=NeuZhou/finclaw\u0026type=Date\u0026theme=dark\" /\u003e\n    \u003cimg alt=\"Star History\" src=\"https://api.star-history.com/svg?repos=NeuZhou/finclaw\u0026type=Date\" /\u003e\n  \u003c/picture\u003e\n\u003c/a\u003e\n","funding_links":["https://github.com/sponsors/NeuZhou"],"categories":["Trading \u0026 Backtesting","回测"],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2FNeuZhou%2Ffinclaw","html_url":"https://awesome.ecosyste.ms/projects/github.com%2FNeuZhou%2Ffinclaw","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2FNeuZhou%2Ffinclaw/lists"}