Langsung ke konten
Skillpedia
Analisis & spreadsheet81k Β· #1669

trader-explain

Fungsinya

Skill ini menjelaskan sinyal trading dengan memberi peringkat pada fitur yang paling memengaruhi prediksi model. Skill ini untuk orang yang membutuhkan alasan yang jelas di balik sinyal trading otomatis.

Kapan dipakai

  • βœ“Saat sebuah sinyal trading membutuhkan alasan yang jelas dan berperingkat untuk ditinjau.
  • βœ“Saat aturan mewajibkan keluaran model bisa dijelaskan kepada regulator.
  • βœ“Saat Anda ingin memeriksa input mana yang mendorong sebuah prediksi.

Link skill

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

Salin lalu tempelkan ke AI Anda (Claude, ChatGPT, atau Cursor) dan minta AI mengikuti instruksinya.

Cara pakai

Cara paling mudah: salin pesan ini dan tempelkan ke AI Anda. AI akan membaca skill dan mengikuti instruksinya.

Pesan siap tempel

Gunakan skill ini untuk membantu saya: https://github.com/ruvnet/ruflo/blob/main/plugins/ruflo-neural-trader/skills/trader-explain/SKILL.md Baca file SKILL.md di link tersebut dan ikuti instruksinya untuk tugas saya.
Mau AI Anda menemukan skill seperti ini sendiri?Pasang MCP Skillpedia gratis: cukup satu baris, dan AI mencari di antara 15.000+ skill sebelum tiap tugas.Pasang dalam 1 menit β†’

Contoh permintaan ke AI

β€œJelaskan mengapa model menghasilkan sinyal 118 dan tunjukkan fitur teratas di baliknya.”

5 skill baru setiap minggu. 1 menit baca.

Cara kerjanya

Skill mengambil sinyal, mendapatkan skor kontribusi per fitur dari model, dan memeringkat fitur teratas dengan metode berbasis graf. Hasilnya ditampilkan sebagai tabel, dan catatan atribusi yang ditandatangani disimpan.

Konten teknis (SKILL.md asli)

Teks asli dari pembuat, dalam bahasa Inggris, langsung dari GitHub.

Explain a trading signal by building a feature-contribution graph and running single-entry forward-push PageRank from the signal output node. Top-K ranked features are returned as a markdown table AND persisted to trading-analysis as a SignedAttributionArtifact (ADR-126 Phase 6).

Why this skill matters:

  • EU AI Act + SEC Reg-AI guidance require interpretable model output for any algorithmic trading system that touches retail capital. This is the regulator-grade attribution path the rest of the substrate has been waiting for.
  • The same call site picks up the full native-WASM PageRank from mcp__ruflo-sublinear__page-rank-entry once that tool is registered in the runtime β€” until then, the local power-iteration kernel ships in signed-attribution.mjs and produces the same ordering (seeded mulberry32).

Steps:

  1. Retrieve the signal from the canonical trading-signals namespace (ADR-126 Phase 1 + Phase 2 lifecycle):

    mcp__plugin_ruflo-core_ruflo__memory_retrieve({
      key: "SIGNAL_ID",
      namespace: "trading-signals"
    })
    

    The signal entry includes modelId, prediction, and the feature vector at the time of inference.

  2. Extract per-feature contribution scores from the model:

    npx neural-trader --predict --signal "$SIGNAL_ID" --explain --json
    

    The expected output shape:

    {
      features: Array<{ name: string; contribution: number }>;
      // for Transformers, also includes per-head attention co-occurrence:
      attention?: Array<{ head: string; cooccur: Array<[number, number, number]> }>;
    }
    

    Fallback path β€” if --explain is not shipped on the installed neural-trader build (older versions; the flag was scoped for a follow-up upstream PR), the skill degrades to a deterministic feature-importance heuristic over the signal's input vector: contribution_i = |input_i - ΞΌ_i| / Οƒ_i (z-score magnitude). This is a known proxy β€” not as faithful as attention/SHAP β€” and the resulting artifact is tagged attribution_method: "input-zscore-fallback" so downstream consumers can filter it out for regulator filings. Document the fallback path in the resulting markdown summary so the agent surfaces it to the user.

  3. Build the feature-contribution graph:

    • Nodes: one node per feature + one source node __signal_output__ for the prediction.
    • Edges: outgoing edges from __signal_output__ to each feature node, weighted by contribution_i. When attention co-occurrence data is available, also add edges between feature nodes weighted by cooccur β€” this is what makes the PageRank single-entry rather than degenerating to plain top-K.
    • Source: __signal_output__ (index 0 by convention so the smoke can assert reproducibility).
  4. Run single-entry PageRank β€” preferred path when mcp__ruflo-sublinear__page-rank-entry is registered:

    mcp__ruflo-sublinear__page-rank-entry({
      nodes: GRAPH_NODES,
      edges: GRAPH_EDGES,
      sourceIndex: 0,
      damping: 0.85,
      maxIterations: 100,
      tolerance: 1e-8,
      seed: 42
    })
    

    The local fallback (localSingleEntryPageRank in plugins/ruflo-neural-trader/src/signed-attribution.mjs) runs ~30 LOC of seeded power-iteration when the MCP tool is not available β€” same math, same result up to floating-point tolerance, same ordering for the same seed (the Phase 6 smoke asserts this).

  5. Build the top-K AttributionFeature[] via topKFeatures(graph, scores, k=10, excludeIndex=0) β€” excludes the source node from the ranked output. Ties broken by node index (lower index wins) so the ranking is deterministic.

  6. Sign the artifact (reuses the Phase 4 signing primitives β€” same Ed25519 + canonicalization):

    • Build the SignedAttributionArtifact body:
      {
        signalId: SIGNAL_ID,
        modelId: SIGNAL.modelId,
        features: TOP_K_FEATURES,             // from step 5
        graphMetadata: {
          nodeCount: GRAPH.nodes.length,
          edgeCount: COUNT_EDGES,
          pageRankIterations: PR_RESULT.iterations,
          seed: SEED                          // load-bearing for reproducibility
        },
        generatedAt: NEW_DATE_ISO
      }
      
    • Resolve the witness signing key β€” same lookup order as Phase 4:
      1. RUFLO_WITNESS_KEY_PATH env var β€” JSON file with { "privateKey": "<hex>" }.
      2. verification/witness-key.json (the ADR-103 default path).
    • If a key resolves: `signAttributionArtifact(
Pertanyaan umum

Mengapa disebut setara regulator?

Catatan skill menyebut ini dimaksudkan untuk memberi keluaran yang bisa diinterpretasi, yang diminta sebagian aturan untuk sistem trading.

Apakah perlu pustaka khusus?

Skill memakai perhitungan lokal yang disertakan, jadi tetap bisa berjalan tanpa alat native.

Di mana hasilnya disimpan?

Hasilnya disimpan di memori analisis trading sebagai catatan atribusi yang ditandatangani.

Detail

Deskripsi asli dari pembuat

Regulator-grade feature attribution for any LSTM/Transformer signal β€” single-entry PageRank ranks the top-K features that drove the prediction (ADR-126 Phase 6, ADR-123 single-entry PR)

repo: ruvnet/ruflo

Popularitas

Bintang GitHub
81k
Peringkat
#1669
Lisensi
MIT
Diperbarui
2/11/2026

Apakah skill ini berguna?

0

Masuk untuk memberi suara.

Komentar

  • …

Skill lain dari repositori ini

Skill serupa