trader-cloud-backtest
Skill này làm gì
Skill này gửi các tác vụ giao dịch lớn, như kiểm định walk-forward nhiều năm hoặc huấn luyện model, tới một môi trường chạy agent trên cloud. Nó dành cho người có các bài kiểm thử giao dịch quá lớn để chạy trên máy của mình.
Khi nào nên dùng
- ✓Khi một backtest giao dịch quá lớn để hoàn thành trên máy của bạn.
- ✓Khi bạn muốn quét tham số hoặc huấn luyện model chạy trên cloud.
- ✓Khi một kiểm tra cục bộ nhanh là đủ, skill backtest cục bộ là lựa chọn tốt hơn.
Liên kết skill
https://github.com/ruvnet/ruflo/blob/main/plugins/ruflo-neural-trader/skills/trader-cloud-backtest/SKILL.mdSao chép rồi dán vào AI của bạn (Claude, ChatGPT hoặc Cursor) và nhờ nó làm theo hướng dẫn.
Cách dùng
Cách dễ nhất: sao chép tin nhắn và dán vào AI của bạn. AI sẽ đọc skill và làm theo hướng dẫn.
Tin nhắn có sẵn để dán
Dành cho Claude Code, Codex hoặc Cursor: chạy lệnh trong thư mục dự án của bạn và skill sẽ được cài đặt.
Tải tệp SKILL.md về và thả vào thư mục skill của agent.
Ví dụ cách nhờ AI
“Hãy chạy kiểm định walk-forward dài nhiều năm cho chiến lược của tôi trên cloud và gửi kết quả cho tôi.”
5 skill mới mỗi tuần. Đọc chỉ 1 phút.
Cách hoạt động
Skill trước hết đưa ra ước tính chi phí thô, rồi tạo hoặc tái sử dụng một container cloud đã cài gói giao dịch, chạy tác vụ ở đó và trả về kết quả. Nó cần một API key và quyền truy cập beta Managed Agents.
Nội dung kỹ thuật (SKILL.md gốc)
Lấy nguyên văn từ GitHub, do tác giả viết bằng tiếng Anh.
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
Câu hỏi thường gặp
Nó tốn bao nhiêu?
Skill in ước tính chi phí trước khi bắt đầu, dựa trên quy mô tác vụ, để lựa chọn luôn có chủ đích.
Tôi cần chuẩn bị gì để thiết lập?
Một API key của Anthropic và quyền truy cập beta Managed Agents.
Nếu dịch vụ cloud không khả dụng thì sao?
Skill gợi ý chuyển sang skill backtest cục bộ.
Chi tiết
Mô tả gốc của tác giả
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
Độ phổ biến
- Sao GitHub
- 81k
- Vị trí xếp hạng
- #1668
- Giấy phép
- MIT
- Cập nhật
- 2/11/2026
Bình luận
- …
Thêm skill từ kho mã này
agent-adaptive-coordinator
81kGiúp agent của bạn chia và cân bằng lại một nhóm agent AI khi khối lượng công việc thay đổi, chọn bố cục phù hợp với tác vụ.
agent-agent
81kDạy agent của bạn biến một mục tiêu lớn thành kế hoạch hành động có thứ tự, và lập lại kế hoạch khi điều kiện thay đổi.
agent-agentic-payments
81kGiúp agent của bạn quản lý ủy quyền chi tiêu cho mua sắm bằng AI, với hạn mức chi, khung thời gian, quy tắc người bán và phê duyệt có chữ ký.
agent-analyze-code-quality
81kGiúp agent của bạn rà soát chất lượng mã, tìm code smell, nợ kỹ thuật và gợi ý tái cấu trúc mà không thay đổi các file.
Skill tương tự
gitcrawl
394kCho phép agent của bạn tìm trong kho lưu trữ issue và pull request GitHub, gom các mục trùng lặp và kiểm tra trạng thái hiện tại trên GitHub.
slacrawl
394kCho phép agent của bạn tìm và đếm tin nhắn trong kho lưu trữ Slack cục bộ, kiểm tra kho đó mới đến mức nào và làm mới khi cần.
goplaces
394kGiúp agent của bạn tìm địa điểm, lấy chi tiết và đánh giá, và xác định tên địa điểm bằng Google Places, với đầu ra JSON cho script.