trader-explain

Generates signed feature-attribution rankings for trading signals using single-entry PageRank.

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

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

Algorithmic trading systems that touch retail capital must produce interpretable, auditable explanations of model predictions to satisfy EU AI Act and SEC Reg-AI guidance. This Skill ranks the features that drove an LSTM or Transformer trading signal and persists the result as a cryptographically signed, verifiable artifact.

Core Features & Use Cases

  • Feature Attribution via PageRank: Builds a feature-contribution graph from model output and runs single-entry seeded PageRank to rank the top-K features that drove a prediction.
  • Signed Audit Artifacts: Signs each attribution result with Ed25519 and stores it in the long-lived trading-analysis namespace for regulator-facing verification.
  • Deterministic Fallbacks: Falls back to a local seeded power-iteration kernel when the MCP PageRank tool is unavailable, and to a z-score heuristic when the model lacks an --explain flag, tagging degraded artifacts accordingly.
  • Use Case: A compliance engineer runs trader-explain SIGNAL-42 --top-k 10 --seed 42 to produce a reproducible, signed ranking of the features behind a model's buy signal, then verifies the artifact before including it in a regulatory filing.

Quick Start

Ask the agent to explain trading signal SIGNAL-42 with trader-explain using top-k 10 and seed 42, then review the returned ranked feature table and signed artifact.

Frequently Asked Questions about trader-explain

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

FAQPage Schema
How do I explain a trading signal from an LSTM or Transformer model?

Run trader-explain with the signal ID, for example trader-explain SIGNAL-42 --top-k 10 --seed 42. It retrieves the signal, extracts per-feature contributions, runs single-entry PageRank over a feature-contribution graph, and returns a ranked markdown table.

What is single-entry PageRank feature attribution?

Single-entry PageRank runs a seeded forward-push ranking from the signal output node across a graph of feature nodes weighted by contribution scores. Attention co-occurrence edges between features make the ranking richer than a plain top-K sort.

Does trader-explain work without the MCP PageRank tool?

Yes. When mcp__ruflo-sublinear__page-rank-entry is not registered, a local seeded power-iteration kernel in signed-attribution.mjs produces the same ordering for the same seed. The artifact records which path was used.

What happens if the model does not support the --explain flag?

The skill falls back to a deterministic z-score heuristic over the signal's input vector. The resulting artifact is tagged attribution_method: input-zscore-fallback so downstream consumers can exclude it from regulator filings.

How are attribution artifacts verified for regulatory filings?

Artifacts are signed with Ed25519 using a witness key from RUFLO_WITNESS_KEY_PATH or verification/witness-key.json. Consumers call verifyAttributionArtifact with a trusted public key and must not trust the artifact's embedded witnessPublicKey field.

Are trader-explain results reproducible across runs?

Yes. Two runs with the same signalId and seed produce byte-identical rank ordering, asserted by the smoke script scripts/smoke-neural-trader-feature-attribution.mjs. Ties are broken deterministically by node index.