trader-backtest
Fungsinya
Skill ini menjalankan uji historis strategi trading memakai mesin neural-trader, dengan validasi walk-forward. Skill ini untuk orang yang meneliti ide trading dan ingin melihat bagaimana strategi akan berkinerja di masa lalu.
Kapan dipakai
- ✓Saat Anda ingin menguji strategi trading pada data harga masa lalu.
- ✓Saat Anda ingin pemeriksaan walk-forward tentang seberapa kuat strategi bertahan dari waktu ke waktu.
- ✓Saat sebuah hasil perlu ditandatangani sebelum dipertimbangkan untuk trading langsung.
Link skill
https://github.com/ruvnet/ruflo/blob/main/plugins/ruflo-neural-trader/skills/trader-backtest/SKILL.mdSalin 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
Untuk Claude Code, Codex, atau Cursor: jalankan di folder proyek, lalu skill langsung terpasang.
Unduh SKILL.md lalu taruh di folder skill agen Anda.
Contoh permintaan ke AI
“Backtest strategi momentum saya pada SPY dari 2020 sampai 2024 dengan validasi walk-forward.”
5 skill baru setiap minggu. 1 menit baca.
Cara kerjanya
Skill memeriksa atau memasang paket neural-trader, memuat strategi tersimpan, menjalankan backtest, dan melaporkan ukuran kinerja. Hasil harus memakai data pasar sungguhan sebelum ditandatangani untuk promosi, dan hasil sintetis tidak ditandatangani.
Konten teknis (SKILL.md asli)
Teks asli dari pembuat, dalam bahasa Inggris, langsung dari GitHub.
Run a historical backtest using the neural-trader Rust/NAPI engine, then Ed25519-sign the result so the paper→live promotion gate has cryptographic tamper evidence (ADR-126 Phase 4 + CWE-347 pattern).
Steps:
- Ensure neural-trader is available:
npm ls neural-trader 2>/dev/null || npm install --ignore-scripts neural-trader - Check for saved strategy config:
mcp__plugin_ruflo-core_ruflo__memory_retrieve({ key: "strategy-STRATEGY_NAME", namespace: "trading-strategies" })If not found, list available:mcp__plugin_ruflo-core_ruflo__memory_search({ query: "strategy", namespace: "trading-strategies", limit: 10 }) - Run backtest via neural-trader CLI:
For multi-indicator strategies:npx neural-trader --backtest --strategy <name> --symbol <TICKER> --period <range> --walk-forward --livenpx neural-trader --backtest --strategy multi-indicator --position-sizing kelly --symbol SPY --period 2020-2024
3b. Check the data source. Without --live the backtest runs on synthetic bars, and when the live fetch fails it silently falls back to them. Read dataSource for every symbol in the result. Only yahoo-finance is real data. If any symbol is synthetic or mixed, store the result with synthetic: true in the body, do NOT sign it for paper→live promotion, and tell the user why.
4. Capture performance metrics from output: total return, annualized return, Sharpe ratio, Sortino ratio, max drawdown, win rate, profit factor, number of trades.
5. Dedup prior backtests for the same (strategyId, paramsHash) before storing the fresh one (ADR-125 lifecycle / ADR-126 Phase 2 — keep-newest semantics):
- Search:
mcp__plugin_ruflo-core_ruflo__memory_search({ query: "backtest STRATEGY paramsHash:PARAMS_HASH", namespace: "trading-backtests", limit: 10 }) - For each hit whose key matches
backtest-STRATEGY-*AND whose storedparamsHashequals the current run's hash, delete it:mcp__plugin_ruflo-core_ruflo__memory_delete({ key: "OLD_KEY", namespace: "trading-backtests" }) - (Note: even without this proactive step, the
MemoryConsolidator.dedup('keep-newest')background pass introduced in@claude-flow/memory@3.0.0-alpha.18runs every 6h and will eventually converge. Doing it inline keepsmemory_searchresults deterministic immediately after a re-run.)
- Sign the artifact (ADR-126 Phase 4):
- Build the
SignedBacktestArtifactbody —{ strategyId, paramsHash, dataRange: {from,to}, metrics, runsHash, generatedAt }— whereparamsHash = sha256(canonical params JSON),runsHash = sha256(canonical runs array JSON), andgeneratedAt = new Date().toISOString(). - Resolve the witness signing key. The skill reads the key path in this order; the FIRST that resolves wins:
RUFLO_WITNESS_KEY_PATHenv var — points to a JSON file with{ "privateKey": "<hex>" }.verification/witness-key.json(the ADR-103 default path, if present).
- If the key resolves: call
signBacktestArtifact(body, privateKeyHex)fromplugins/ruflo-neural-trader/src/signed-artifact.mjs. The returned value is aSignedBacktestArtifactwithschema,witnessPublicKey: "ed25519:<hex>", andwitnessSignature: "<hex>"populated. - If NEITHER path resolves: log a loud warning —
"[WARN] ruflo-neural-trader: no witness signing key found (RUFLO_WITNESS_KEY_PATH unset, verification/witness-key.json missing) — storing backtest artifact in UNSIGNED degraded mode. paper→live promotion will be refused by trader-cloud-backtest until a signed artifact replaces this one."— and store the body unsigned. NEVER silently fall back.
- Build the
- Store the (possibly signed) artifact to the canonical
trading-backtestsnamespace:mcp__plugin_ruflo-core_ruflo__memory_store({ key: "backtest-STRATEGY-TIMESTAMP", value: JSON.stringify(signedArtifact), namespace: "trading-backtests" })The stored value containswitnessSignature+witnessPublicKeywhen signed; downstream consumers (trader-cloud-backtest) MUST callverifyBacktestArtifact(artifact, trustedPublicKey)before promoting any artifact to live. - If Sharpe > 1.5, store as successful pattern:
mcp__plugin_ruflo-core_ruflo__agentdb_pattern-store({ pattern: "profitable-STRATEGY_TYPE: PARAMS_AND_RESULTS", type: "trading-strategy", confidence: 0.8 })(the tool takespattern,type,confidence; adatafield is ignored) - Train SONA on the outcome (skip for synthetic runs): `mcp__plugin_ruflo-core_ru
Pertanyaan umum
Apakah backtest menjamin hasil di masa depan?
Tidak. Backtest hanya menunjukkan bagaimana strategi akan berkinerja pada data masa lalu, dan itu tidak menjanjikan imbal hasil di masa depan.
Bagaimana jika datanya sintetis?
Skill menandai hasilnya sebagai sintetis, tidak menandatanganinya untuk promosi trading langsung, dan menjelaskan alasannya.
Apakah skill ini memasang order?
Deskripsinya mencakup pengujian pada data historis, bukan pemasangan order.
Detail
Deskripsi asli dari pembuat
Run a historical backtest using npx neural-trader with Rust/NAPI engine (8-19x faster) and walk-forward validation; Ed25519-sign the result for paper→live tamper evidence (ADR-126 Phase 4)
repo: ruvnet/ruflo
Popularitas
- Bintang GitHub
- 81k
- Peringkat
- #1667
- Lisensi
- MIT
- Diperbarui
- 2/11/2026
Komentar
- …
Skill lain dari repositori ini
agent-adaptive-coordinator
81kMembantu agent Anda membagi dan menyeimbangkan kembali sekelompok agent AI saat beban kerja berubah, dengan memilih tata letak yang sesuai tugas.
agent-agent
81kMengajari agent Anda mengubah tujuan besar menjadi rencana tindakan yang berurutan, dan menyusun ulang rencana saat kondisi berubah.
agent-agentic-payments
81kMembantu agent Anda mengelola mandat belanja untuk belanja AI, dengan batas pengeluaran, jendela waktu, aturan merchant, dan persetujuan yang ditandatangani.
agent-analyze-code-quality
81kMembantu agent Anda meninjau kualitas kode, menemukan bau kode, utang teknis, dan ide refaktor tanpa mengubah berkas.
Skill serupa
gitcrawl
394kMemungkinkan agent Anda mencari arsip issue dan pull request GitHub yang tersimpan, mengelompokkan yang duplikat, dan memeriksa status terkininya di GitHub.
slacrawl
394kMemungkinkan agent Anda mencari dan menghitung pesan di arsip Slack lokal, memeriksa seberapa baru arsip itu, dan menyegarkannya bila diperlukan.
goplaces
394kMembantu agent Anda mencari tempat, mendapatkan detail dan ulasannya, serta menentukan nama tempat memakai Google Places, dengan keluaran JSON untuk skrip.