recipe-paper-strategy-backtest
Backtest a trading strategy using paper trading against live prices.
- License 许可
- MIT
- 最近更新
- 2026-11-13
- Stars
- ★ 81
- Forks
- 17
01 前言 Front Matter
- name
- recipe-paper-strategy-backtest
- version
- 1.0.0
- metadata
- { "openclaw": { "domain": "strategy", "category": "recipe" }, "requires": { "bins": [ "kraken" ], "skills": [ "kraken-paper-strategy" ] } }
- description
- Backtest a trading strategy using paper trading against live prices.
02 资源文件 3
- 许可证LICENSE1.0 KB
- 参考文档SOURCE.md171 B
- 参考文档TRUST.auto.yaml2.2 KB
03 SKILL.md 正文
Paper Strategy Backtest
PREREQUISITE: Load the following skill to execute this recipe:
kraken-paper-strategy
Run a strategy through multiple paper runs to validate consistency before live deployment.
Important: Paper Results May Overstate Live Performance
Paper trading applies configurable fees (default 0.26% taker) and optional flat-rate slippage to market orders. However, it does not simulate partial fills, order book depth, or latency. Live trading on Kraken has variable maker/taker fees by volume tier, depth-dependent slippage, and possible partial fills on limit orders. Enable --slippage-rate (e.g., 0.001 for 0.1%) at workspace create for more conservative estimates. A strategy that is only marginally profitable on paper with fees and slippage enabled is likely unprofitable live.
Steps
- Define strategy parameters (pair, entry/exit rules, position size)
- Initialize paper account:
kraken workspace create sandbox --capital 10000 --mode paper --slippage-rate 0.001 -o json 2>/dev/null - Round 1: execute strategy logic with
kraken --workspace sandbox paper buy ...andkraken --workspace sandbox paper sell ... - Record round 1 results:
kraken workspace status sandbox -o json 2>/dev/null+kraken --workspace sandbox paper history -o json 2>/dev/null - Reset:
kraken workspace reset sandbox -o json --yes 2>/dev/null - Round 2 with same parameters at a different time (different market conditions)
- Record round 2 results
- Repeat for 3-5 rounds minimum
- Compare results: win rate, average P&L per trade, max drawdown, Sharpe-like ratio
- If results are consistent and positive, the strategy is a candidate for live promotion
- If results vary wildly, adjust parameters and re-test
If you hit a mismatch between what you are trying to do and the CLI's interface or responses — including a mismatch between this skill and the installed CLI version's contract — feel free to submit feedback with kraken feedback.
04 同仓库更多 Skills
recipe-performance
Diagnose a specific MetaMask user flow's real-app performance and Sentry critical-user-flow telemetry with deterministic mm-harness recipes. Use for CUF boundaries, cold/warm/background-resume behavior, latency regressions, lifecycle tags, duplicate or blocking network requests, long tasks, layout/paint cost, screen redraws, React rerenders, or browser trace analysis where tests alone cannot prove the real app.
mexc-spot-websocket
MEXC Spot WebSocket workflows for public streams, protobuf handling, depth maintenance, listen keys, and private streams without exposing API keys.
mexc-spot-rest
MEXC Spot REST workflows for public data, signed account requests, orders, wallet/admin actions, and secure signing without exposing API keys.
mexc-futures-websocket
MEXC Futures WebSocket workflows for public streams, private account/order/position streams, ping/pong, subscriptions, and depth maintenance.
0xklen-version-and-refresh-sanctions-lists
暂无简介
verify-tests-cover-changed-lines
Use when a PR adds code that the existing suite may not exercise. Measures patch coverage — the share of newly changed lines hit by tests — before approving.