trader-backtest

Runs historical trading strategy backtests with walk-forward validation and Ed25519-signed result artifacts.

70.1k|8.4k|Updated Jun 2, 2025
One-click install
npx skills add https://github.com/ruvnet/claude-flow --skill trader-backtest
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: trader-backtest
Source: https://github.com/ruvnet/claude-flow/tree/main/plugins/ruflo-neural-trader/skills/trader-backtest
Command: npx skills add https://github.com/ruvnet/claude-flow --skill trader-backtest

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill requires neural-trader, @noble/ed25519.

What problem does it solve?

Validating a trading strategy against historical data and proving the backtest result was not tampered with before promoting it from paper to live trading is error-prone when done manually. This Skill automates the backtest run, deduplicates prior results, and cryptographically signs the artifact so downstream promotion gates can verify integrity.

Core Features & Use Cases

  • Historical Backtesting: Runs strategies via the neural-trader Rust/NAPI engine with walk-forward validation and captures metrics like Sharpe ratio, max drawdown, and profit factor.
  • Tamper-Evident Artifacts: Ed25519-signs each backtest result (paramsHash, runsHash, metrics) so the paper-to-live promotion gate can verify authenticity per ADR-126.
  • Result Lifecycle Management: Deduplicates prior backtests for the same strategy and parameters, stores artifacts in a memory namespace, and trains SONA on outcomes.
  • Use Case: Run a multi-indicator strategy with Kelly position sizing on SPY from 2020-2024, then store a signed artifact that trader-cloud-backtest can verify before live promotion.

Quick Start

Run a backtest for my multi-indicator strategy on SPY covering 2020-2024 and sign the result for promotion review.

Frequently Asked Questions about trader-backtest

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I run a historical backtest on a trading strategy?

Run the neural-trader CLI with the backtest flag, strategy name, ticker symbol, and period, for example npx neural-trader --backtest --strategy multi-indicator --symbol SPY --period 2020-2024. The skill captures metrics like Sharpe ratio, max drawdown, and win rate from the output.

What is walk-forward validation in backtesting?

Walk-forward validation tests a strategy on rolling out-of-sample windows rather than a single historical period, reducing overfitting. The skill enables it via the --walk-forward flag on the neural-trader CLI.

Why does the backtest result need an Ed25519 signature?

The signature provides tamper evidence so the paper-to-live promotion gate can verify the artifact was not altered, following the CWE-347 pattern. Downstream consumers call verifyBacktestArtifact with a pinned trusted public key before promoting any result to live trading.

What happens if no witness signing key is found?

The skill checks RUFLO_WITNESS_KEY_PATH first, then verification/witness-key.json. If neither resolves, it logs a loud warning and stores the artifact unsigned in degraded mode, and the promotion gate will refuse it until a signed artifact replaces it.

How are duplicate backtest results handled?

Before storing a new result, the skill searches the trading-backtests namespace for entries with the same strategy and paramsHash and deletes them, applying keep-newest semantics. A background MemoryConsolidator dedup pass also runs every six hours as a fallback.