Pular para o conteúdo
Skillpedia
Análise e planilhas81 mil · #1668

trader-cloud-backtest

O que ela faz

Esta skill envia tarefas grandes de trading, como testes walk-forward de vários anos ou treino de modelos, para um ambiente de agente na nuvem. Ela é para quem tem testes de trading grandes demais para rodar no próprio computador.

Quando usar

  • ✓Quando um backtest de trading é grande demais para terminar no seu computador.
  • ✓Quando você quer uma varredura de parâmetros ou um treino de modelo feito na nuvem.
  • ✓Quando uma verificação local rápida basta, a skill de backtest local é a melhor escolha.

Link da skill

https://github.com/ruvnet/ruflo/blob/main/plugins/ruflo-neural-trader/skills/trader-cloud-backtest/SKILL.md

Copie e cole na sua IA (Claude, ChatGPT ou Cursor) pedindo para seguir as instruções.

Como usar

O jeito mais fácil: copie a mensagem e cole na sua IA. Ela lê a skill e segue as instruções.

Mensagem pronta para colar

Use esta skill para me ajudar: https://github.com/ruvnet/ruflo/blob/main/plugins/ruflo-neural-trader/skills/trader-cloud-backtest/SKILL.md Leia o arquivo SKILL.md desse link e siga as instruções dele na minha tarefa.
Quer que a sua IA encontre skills como esta sozinha?Instale o MCP grátis do Skillpedia: uma linha, e ela pesquisa entre 15.000+ skills antes de cada tarefa.Instalar em 1 minuto →

Exemplo do que pedir para a IA

“Rode um backtest walk-forward longo de vários anos para a minha estratégia na nuvem e me envie o resultado.”

5 skills novas por semana. 1 minuto de leitura.

Como funciona

A skill primeiro dá uma estimativa aproximada de custo e depois cria ou reutiliza um contêiner na nuvem com o pacote de trading instalado, roda a tarefa lá e devolve os resultados. Ela precisa de uma chave de API e de acesso ao beta de agentes gerenciados.

Conteúdo técnico (SKILL.md original)

Texto original do autor, em inglês, direto do 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

  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_PATH → verification/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.
Perguntas frequentes

Quanto custa?

A skill mostra um custo estimado antes de você começar, com base no tamanho da tarefa, para que a escolha seja deliberada.

O que preciso para configurar?

Uma chave de API da Anthropic e acesso ao beta do Managed Agents.

E se o serviço na nuvem não estiver disponível?

A skill sugere usar a skill de backtest local no lugar.

Detalhes

Descrição original do autor

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

Popularidade

Estrelas no GitHub
81 mil
Posição no ranking
#1668
Licença
MIT
Atualizada em
02/11/2026

Essa skill é útil?

0

Entre para votar.

Comentários

  • …

Mais skills deste repositório

Skills parecidas