Now liveThe Skillselion MCP - thousands of ranked skills, loaded into your agent mid-task. No install.Get it →
ruvnet avatar

Trader Cloud Backtest

  • 513 installs
  • 67k repo stars
  • Updated August 4, 2026
  • ruvnet/ruflo

trader-cloud-backtest is an agent skill that runs heavy neural-trader walk-forward backtests, Monte Carlo simulations, parameter sweeps, and LSTM/Transformer/N-BEATS model training on Anthropic Managed Agent cloud runtim

About

trader-cloud-backtest in ruvnet/ruflo (313 installs) dispatches compute-heavy neural-trader workloads—multi-year walk-forward backtests, large Monte Carlo simulations, parameter sweeps, and LSTM/Transformer/N-BEATS model training—to Anthropic Managed Agent cloud containers instead of local machines. The 83-line skill recipe defines 7 steps: cost estimate, container provision with neural-trader initScript, cheap 1-path pre-flight smoke, full job via managed_agent_prompt, artifact retrieval to /tmp/equity.csv and /tmp/trades.csv, Ed25519 SignedBacktestArtifact verification before memory_store, and eager managed_agent_terminate. Nine scoped MCP tools cover managed_agent_create through terminate plus memory_store, memory_search, and agentdb_pattern-store when Sharpe exceeds 1.5. Developers reach for trader-cloud-backtest when local hardware cannot finish walk-forward validation or 1000-path Monte Carlo grids; quick sanity checks stay on the local trader-backtest skill. Prerequisites include ANTHROPIC_API_KEY and Managed Agents beta access per ADR-117 and ADR-115.

  • trader-cloud-backtest

Trader Cloud Backtest by the numbers

  • 513 all-time installs (skills.sh)
  • +10 installs in the week ending Jul 26, 2026 (Skillselion tracking)
  • Ranked #799 of 4,347 Backend & APIs skills by installs in the Skillselion catalog
  • Data as of Aug 5, 2026 (Skillselion catalog sync)
npx skills add https://github.com/ruvnet/ruflo --skill trader-cloud-backtest

Add your badge

Show developers this skill is listed on Skillselion. Paste this into your README.

Listed on Skillselion
Installs513
repo stars67k
Last updatedAugust 4, 2026
Repositoryruvnet/ruflo

How do you run heavy trading backtests in the cloud?

Use trader-cloud-backtest for development tasks

Who is it for?

Quantitative developers using ruflo claude-flow who need cloud-scale walk-forward backtests, Monte Carlo sweeps, or neural-trader model training beyond local compute.

Skip if: Sub-minute single-ticker sanity checks that finish locally via trader-backtest or environments without ANTHROPIC_API_KEY and Managed Agents beta access.

When should I use this skill?

User requests multi-year walk-forward backtests, Monte Carlo with many paths, parameter sweeps, or neural-trader LSTM/Transformer/N-BEATS training that exceeds local compute.

What you get

SignedBacktestArtifact JSON in trading-backtests namespace, equity.csv, trades.csv, Sharpe/Sortino metrics, and managed agent execution logs.

  • SignedBacktestArtifact JSON
  • equity.csv and trades.csv artifacts
  • Managed agent execution metrics

By the numbers

  • 313 catalog installs in Skillselion index
  • 7-step cloud backtest workflow in the 83-line SKILL.md
  • Scopes 9 MCP tools: 5 managed_agent plus 4 memory/pattern tools

Files

SKILL.mdMarkdownGitHub ↗

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)

JobRuntime
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

1. Estimate first. From the job size, print an estimated cost (≈ container-minutes × rate + tokens) — a long sweep is a deliberate choice, not a default.

2. 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.

3. 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).

4. 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 with managed_agent_events({ sessionId }) until idle.

5. Pull artifacts (if needed): managed_agent_prompt({ sessionId, message: "cat /tmp/equity.csv" }) or managed_agent_events and read the tool_result.

6. Ingest locally + Ed25519 verify (ADR-126 Phase 4 fail-closed gate):

  • Build the SignedBacktestArtifact body from the cloud-returned metrics + params hash + runs hash. Sign it locally with signBacktestArtifact(body, privateKeyHex) from plugins/ruflo-neural-trader/src/signed-artifact.mjs (key resolution same as trader-backtest: RUFLO_WITNESS_KEY_PATHverification/witness-key.json → degraded-unsigned warning).
  • Before storing OR promoting the artifact to a live strategy: call await verifyBacktestArtifact(artifact, trustedPublicKey) where trustedPublicKey is the pinned project-config Ed25519 public key (NOT the artifact.witnessPublicKey field — that's attacker-controllable; see CWE-347 / #1922). If verification returns false: 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.
  • On verify success: memory_store({ key: "backtest-<strategy>-<ts>", value: JSON.stringify(signedArtifact), namespace: "trading-backtests" }). The stored value carries witnessSignature + witnessPublicKey.
  • 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-tracking namespace (per ADR-117 — cloud sessions bill until terminated).

7. 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_…" }

Related skills

How it compares

Pick trader-cloud-backtest for multi-year walk-forward or 1000-path Monte Carlo cloud jobs; use local trader-backtest when a single backtest finishes in under one minute.

FAQ

What jobs does trader-cloud-backtest offload?

trader-cloud-backtest offloads multi-year walk-forward backtests, large Monte Carlo simulations, parameter sweeps, and LSTM/Transformer/N-BEATS model training to Anthropic Managed Agent cloud runtime. Quick sub-minute checks should stay on the local trader-backtest skill instead.

Which MCP tools does trader-cloud-backtest use?

trader-cloud-backtest scopes 9 MCP tools: managed_agent_create, managed_agent_prompt, managed_agent_events, managed_agent_status, managed_agent_terminate, memory_store, memory_retrieve, memory_search, and agentdb_pattern-store. Bash and Read permissions support orchestration from

What CLI flags does trader-cloud-backtest accept?

trader-cloud-backtest accepts backtest, train, or sweep modes with --symbol TICKER, optional --period ranges like 2020-2024, and --mc-paths for Monte Carlo counts such as 1000. Cloud prompts run npx neural-trader with walk-forward and model flags inside the managed container.

Backend & APIsbackendintegrations

This week in AI coding

Five minutes, every Monday - the tools, releases and tactics for developers.

unsubscribe anytime.