trader-cloud-backtest
できること
このスキルは、複数年にわたるウォークフォワードのテストやモデルの訓練などの大きな取引ジョブを、クラウドのエージェント実行環境に送ります。取引テストが大きすぎて自分のコンピューターでは終わらない人向けです。
使う場面
- ✓取引のバックテストが大きすぎて、自分のコンピューターでは終わらないとき。
- ✓パラメーターのスイープやモデルの訓練を、クラウドで行いたいとき。
- ✓手早いローカルの確認で十分な場合は、ローカルのバックテストスキルのほうが適しているとき。
スキルのリンク
https://github.com/ruvnet/ruflo/blob/main/plugins/ruflo-neural-trader/skills/trader-cloud-backtest/SKILL.mdコピーしてAI(Claude、ChatGPT、Cursor)に貼り付け、指示に従うよう頼んでください。
使い方
いちばん簡単な方法:メッセージをコピーしてAIに貼り付けるだけ。AIがスキルを読んで指示に従います。
貼り付け用メッセージ
Claude Code、Codex、Cursorの場合:プロジェクトのフォルダで実行するとスキルがインストールされます。
SKILL.mdをダウンロードして、エージェントのスキル用フォルダに入れてください。
AIへの頼み方の例
“私の戦略について、長い複数年のウォークフォワードのバックテストをクラウドで実行して、結果を送ってください。”
毎週5つの新しいスキル。1分で読めます。
仕組み
スキルは最初に大まかな費用の見積もりを表示し、その後、取引パッケージがインストールされたクラウドのコンテナーを設定または再利用して、そこでジョブを実行し、結果を返します。APIキーと、Managed Agents のベータへのアクセスが必要です。
技術的な内容(元のSKILL.md)
作者による元のテキスト(英語)をGitHubからそのまま表示しています。
Cloud backtest / train (neural-trader on a Managed Agent)
Dispatch a heavy neural-trader job to an Anthropic Claude Managed Agent (cloud container) instead of running it locally. See project ADR-117 (recipe + cost rules) and ADR-115 (the managed_agent_* runtime).
When to use this vs trader-backtest (local)
| Job | Runtime |
|---|---|
| Quick sanity check; one short backtest (< ~1 min) | local — use the trader-backtest skill |
| Multi-year walk-forward, big Monte-Carlo count, parameter sweep over a grid, or model training (LSTM/Transformer/N-BEATS) | cloud — this skill |
Prereq: ANTHROPIC_API_KEY (or CLAUDE_API_KEY) + Managed Agents beta access. If managed_agent_* returns "needs ANTHROPIC_API_KEY", fall back to the local trader-backtest skill.
Steps
Estimate first. From the job size, print an estimated cost (≈ container-minutes × rate + tokens) — a long sweep is a deliberate choice, not a default.
Provision (or reuse) the container — install neural-trader at container start so the agent doesn't reinstall mid-run:
managed_agent_create({ name: "nt-cloud", model: "claude-haiku-4-5-20251001", // orchestration only — the compute is the Rust engine, not the LM (ADR-026) system: "You operate the `neural-trader` CLI in this container. Run exactly the commands asked, report the metrics, write requested artifacts, then stop.", networking: "unrestricted", // or "restricted" pinned to your data host packages: { npm: ["neural-trader"] }, // add apt:["build-essential"] ONLY if there's no prebuilt NAPI binary for the arch (neural-trader ships prebuilds → usually omit) initScript: "npm install -g --ignore-scripts neural-trader >/dev/null 2>&1 || npx -y neural-trader --version >/dev/null 2>&1 || true" }) → { sessionId, agentId, environmentId }For a sweep: create the environment once, run all configs in one
managed_agent_prompt(one container), not N sessions.Pre-flight cheap. Before a 1000-path / multi-year run, do a tiny smoke first (1 MC path, ~3 months) — catches a bad strategy name / symbol in seconds:
managed_agent_prompt({ sessionId, message: "Run `npx neural-trader --backtest --strategy <name> --symbol <TICKER> --period <last 3 months> --mc-paths 1`. Just confirm it ran and report the Sharpe. Then stop.", maxWaitMs: 60000 })If that fails, fix the args before the real run (and
managed_agent_terminate).Run the real job:
managed_agent_prompt({ sessionId, message: "Run `npx neural-trader --backtest --strategy <name> --symbol <TICKER> --period <range> --walk-forward --mc-paths <N>` (for training: `npx neural-trader --train --model <lstm|transformer|nbeats> --symbol <TICKER> --period <range>`; for a sweep: loop the configs and run each). Report: total return, annualized return, Sharpe, Sortino, max drawdown, win rate, profit factor, # trades, 95% CVaR. Write the equity curve to /tmp/equity.csv and the trade log to /tmp/trades.csv. Then stop.", maxWaitMs: <generous — minutes> }) → { finished, status, stopReason, assistantText (the metrics), toolUses }If
finished:false, follow up withmanaged_agent_events({ sessionId })until idle.Pull artifacts (if needed):
managed_agent_prompt({ sessionId, message: "cat /tmp/equity.csv" })ormanaged_agent_eventsand read the tool_result.Ingest locally + Ed25519 verify (ADR-126 Phase 4 fail-closed gate):
- Build the
SignedBacktestArtifactbody from the cloud-returned metrics + params hash + runs hash. Sign it locally withsignBacktestArtifact(body, privateKeyHex)fromplugins/ruflo-neural-trader/src/signed-artifact.mjs(key resolution same astrader-backtest:RUFLO_WITNESS_KEY_PATH→verification/witness-key.json→ degraded-unsigned warning). - Before storing OR promoting the artifact to a live strategy: call
await verifyBacktestArtifact(artifact, trustedPublicKey)wheretrustedPublicKeyis the pinned project-config Ed25519 public key (NOT theartifact.witnessPublicKeyfield — that's attacker-controllable; see CWE-347 / #1922). If verification returnsfalse: REFUSE to promote — emit a loud error"[ERROR] ruflo-neural-trader: SignedBacktestArtifact signature INVALID against trusted key — refusing to promote to live strategy"and return early. This is the fail-closed gate per ADR-126.
- Build the
よくある質問
費用はどれくらいかかりますか?
スキルは、ジョブの規模に基づく推定費用を開始前に表示するため、選択は慎重に行われます。
設定に何が必要ですか?
Anthropic の APIキーと、Managed Agents のベータへのアクセスが必要です。
クラウドサービスが利用できない場合はどうなりますか?
スキルは、ローカルのバックテストスキルに切り替えることを提案します。
詳細
作者による元の説明
Run a heavy neural-trader job (long walk-forward, big Monte-Carlo, parameter sweep, model training) on the Anthropic Managed Agent cloud runtime instead of locally
repo: ruvnet/ruflo
人気
- GitHubのスター
- 81k
- ランキング
- #1668
- ライセンス
- MIT
- 更新日
- 2026/11/2
コメント
- …
このリポジトリの他のスキル
agent-adaptive-coordinator
81k作業量の変化に合わせて、エージェントのグループを分割し、再配分する手助けをします。作業に合った配置を選びます。
agent-agent
81k大きな目標を順番に並んだ行動計画にし、状況が変わったときに計画を立て直す方法をエージェントに教えます。
agent-agentic-payments
81kAIの買い物のために、支出の上限、期間、販売店のルール、署名付きの承認を含む支出の委任を管理する手助けをします。
agent-analyze-code-quality
81kコードの品質を確認し、コードの臭い、技術的負債、リファクタリングの案を見つける手助けをします。ファイルは変更しません。
似ているスキル
gitcrawl
394k保存されたGitHubのイシューとプルリクエストのアーカイブを検索し、重複をまとめ、GitHub上の現在の状態を確認するようエージェントを支援します。
slacrawl
394kローカルのSlackアーカイブ内のメッセージを検索して件数を数え、アーカイブの新しさを確認し、必要に応じて更新するようエージェントを支援します。
goplaces
394kGoogle Placesを使って、場所を検索し、詳細や口コミを取得し、場所の名前を解決するようエージェントを支援します。スクリプト用にJSON出力もできます。