🛠️ TraderクラウドBacktest
AIを使った取引戦略の検証やモデル学習といった複雑な
📺 まず動画で見る(YouTube)
▶ 【衝撃】最強のAIエージェント「Claude Code」の最新機能・使い方・プログラミングをAIで効率化する超実践術を解説! ↗
※ jpskill.com 編集部が参考用に選んだ動画です。動画の内容と Skill の挙動は厳密には一致しないことがあります。
📜 元の英語説明(参考)
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
🇯🇵 日本人クリエイター向け解説
AIを使った取引戦略の検証やモデル学習といった複雑な
※ jpskill.com 編集部が日本のビジネス現場向けに補足した解説です。Skill本体の挙動とは独立した参考情報です。
下記のコマンドをコピーしてターミナル(Mac/Linux)または PowerShell(Windows)に貼り付けてください。 ダウンロード → 解凍 → 配置まで全自動。
mkdir -p ~/.claude/skills && cd ~/.claude/skills && curl -L -o trader-cloud-backtest.zip https://jpskill.com/download/2268.zip && unzip -o trader-cloud-backtest.zip && rm trader-cloud-backtest.zip
$d = "$env:USERPROFILE\.claude\skills"; ni -Force -ItemType Directory $d | Out-Null; iwr https://jpskill.com/download/2268.zip -OutFile "$d\trader-cloud-backtest.zip"; Expand-Archive "$d\trader-cloud-backtest.zip" -DestinationPath $d -Force; ri "$d\trader-cloud-backtest.zip"
完了後、Claude Code を再起動 → 普通に「動画プロンプト作って」のように話しかけるだけで自動発動します。
💾 手動でダウンロードしたい(コマンドが難しい人向け)
- 1. 下の青いボタンを押して
trader-cloud-backtest.zipをダウンロード - 2. ZIPファイルをダブルクリックで解凍 →
trader-cloud-backtestフォルダができる - 3. そのフォルダを
C:\Users\あなたの名前\.claude\skills\(Win)または~/.claude/skills/(Mac)へ移動 - 4. Claude Code を再起動
⚠️ ダウンロード・利用は自己責任でお願いします。当サイトは内容・動作・安全性について責任を負いません。
🎯 このSkillでできること
下記の説明文を読むと、このSkillがあなたに何をしてくれるかが分かります。Claudeにこの分野の依頼をすると、自動で発動します。
📦 インストール方法 (3ステップ)
- 1. 上の「ダウンロード」ボタンを押して .skill ファイルを取得
- 2. ファイル名の拡張子を .skill から .zip に変えて展開(macは自動展開可)
- 3. 展開してできたフォルダを、ホームフォルダの
.claude/skills/に置く- · macOS / Linux:
~/.claude/skills/ - · Windows:
%USERPROFILE%\.claude\skills\
- · macOS / Linux:
Claude Code を再起動すれば完了。「このSkillを使って…」と話しかけなくても、関連する依頼で自動的に呼び出されます。
詳しい使い方ガイドを見る →- 最終更新
- 2026-05-17
- 取得日時
- 2026-05-17
- 同梱ファイル
- 1
💬 こう話しかけるだけ — サンプルプロンプト
- › Trader Cloud Backtest を使って、最小構成のサンプルコードを示して
- › Trader Cloud Backtest の主な使い方と注意点を教えて
- › Trader Cloud Backtest を既存プロジェクトに組み込む方法を教えて
これをClaude Code に貼るだけで、このSkillが自動発動します。
📖 Claude が読む原文 SKILL.md(中身を展開)
この本文は AI(Claude)が読むための原文(英語または中国語)です。日本語訳は順次追加中。
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:
memory_store({ key: "backtest-<strategy>-<ts>", value: <metrics+params JSON>, namespace: "trading-backtests" })- If Sharpe > 1.5:
agentdb_pattern-store({ pattern: "profitable-<strategy-type>", data: "<params + results>" }) - Record the run's container time + token cost to the
cost-trackingnamespace (per ADR-117 — cloud sessions bill until terminated).
-
Terminate immediately — results in hand:
managed_agent_terminate({ sessionId, environmentId }) → { sessionDeleted: true, environmentDeleted: true }Never leave an idle billing container. (
ruflo doctor/ GC catches orphans — #1931.)
Cost rules (don't skip)
- Install once (
initScript), reuse the environment, batch sweeps into one prompt, pre-flight cheap, terminate eagerly, use Haiku/Sonnet for the agent loop, estimate before kicking off. (ADR-117 §"Cost optimization".) - A cloud backtest that runs for an hour costs an hour of container time + the agent-loop tokens. Be deliberate.
Quick example
managed_agent_create { "name":"nt-cloud", "model":"claude-haiku-4-5-20251001", "packages":{"npm":["neural-trader"]}, "initScript":"npm install -g --ignore-scripts neural-trader >/dev/null 2>&1 || true" }
→ { sessionId:"sesn_…", environmentId:"env_…" }
managed_agent_prompt { "sessionId":"sesn_…", "message":"Run `npx neural-trader --backtest --strategy multi-indicator --symbol SPY --period 2020-2024 --walk-forward --mc-paths 1000`. Report Sharpe/Sortino/max-DD/win-rate/CVaR; write /tmp/equity.csv. Then stop.", "maxWaitMs":600000 }
→ { finished:true, status:"idle", assistantText:"<metrics>", toolUses:[{bash:"npx neural-trader --backtest …"}] }
# … memory_store the metrics, agentdb_pattern-store if Sharpe>1.5, record cost …
managed_agent_terminate { "sessionId":"sesn_…", "environmentId":"env_…" }