strategy-backtester

strategy-backtester is a skill for Claude Code, Codex from shaoxing-xie/openclaw-data-china-stock. It costs 29 tokens per session (556 once invoked), scanned A, original, MIT.

A light strategy backtester that uses historical market prices and technical indicators to evaluate a described trading strategy. Backtesting means testing how a strategy would have behaved on past data.

In plain words
What is it for?
Defining a strategy and test period, calculating returns and drawdowns, reviewing trade statistics, and examining how results change when parameters vary. It does not provide buy or sell points, position sizes, or leverage advice.
Why use it?
It organizes the test window, results, risks, trading statistics, and parameter checks while clearly noting missing data and limits such as costs, slippage, and survivor bias.

Skill for Claude CodeCodex

Written for no agent in particular: nothing here depends on one.

Good fit Defining a strategy and test period, calculating returns and drawdowns, reviewing trade statistics, and examining how results change when parameters vary. It does not provide buy or sell points, position sizes, or leverage advice.

Compare 6 skills from other repositories ↓
Install with agentmods
npx agentmods add skills/shaoxing-xie/openclaw-data-china-stock/strategy-backtester
Install

Getting it into your agent

One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.

Any agent
npx skills add shaoxing-xie/openclaw-data-china-stock --skill strategy-backtester
Clone the repo
git clone --depth 1 https://github.com/shaoxing-xie/openclaw-data-china-stock

Made for: Claude Code, Codex.

Wrote this? Show the measurements

A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.

agentmods badge for strategy-backtester

README.md
[![agentmods](https://agentmods.dev/badge/skills/shaoxing-xie/openclaw-data-china-stock/strategy-backtester/github.svg)](https://agentmods.dev/skills/shaoxing-xie/openclaw-data-china-stock/strategy-backtester)
Your own site
<a href="https://agentmods.dev/skills/shaoxing-xie/openclaw-data-china-stock/strategy-backtester"><img src="https://agentmods.dev/badge/skills/shaoxing-xie/openclaw-data-china-stock/strategy-backtester/github.svg" alt="Measured on agentmods" height="20"></a>

Or the 80×15 button, for a site that already has a row of RSS and ATOM ones. Only the verdict fits; the numbers stay here.

agentmods 80×15 button for strategy-backtester

Your own site · 80×15
<a href="https://agentmods.dev/skills/shaoxing-xie/openclaw-data-china-stock/strategy-backtester"><img src="https://agentmods.dev/badge/skills/shaoxing-xie/openclaw-data-china-stock/strategy-backtester.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 29 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 556 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. A grade says what 26 rules found in the file — not that it is safe.
Origin original No closer match found in the catalogue.
Token cost

What it costs to keep this loaded

Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.

ModelPer sessionOnce invoked
Fable 5.1 $0.00029 $0.00556
Opus 5 $0.00015 $0.00278
Sonnet 5 $0.00006 $0.00111
Haiku 4.5 $0.00003 $0.00056

Measured 12d ago against content hash a01acb0e4181, method: parsed. Prices are Anthropic first-party input rates as of 2026-09-12, from the pricing page.

Security

Grade A, and why

strategy-backtester scanned grade A with 0 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 12d ago.

A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.

Nothing flagged

None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.

skills/strategy-backtester/SKILL.md · 73 lines

What it actually says

Strategy Backtester

目标

在无专用 tool_backtest_* 的当前能力下,基于行情与指标工具完成轻回测编排与绩效分析输出。

输入

  • 用户策略描述
  • 历史行情数据
  • 技术指标数据

输出(固定结构)

  1. 策略规格与回测窗口
  2. 收益与风险指标
  3. 交易统计与参数敏感性
  4. 限制条件与下一步实验

证据表(必选)

  • 列出 tool_fetch_market_datatool_calculate_technical_indicators 等调用与 quality_status;收益/回撤等须来自工具或明确声明为 MVP 派生计算 并附公式。

反证与局限(必选)

  • 样本外区间、幸存者偏差、未计入成本/滑点时对结论的影响。

强制规则

  • 仅通过 manifest / tool_runner 调用依赖工具,禁止引导直连 plugins.data_collection
  • 若缺少足够历史数据,输出 insufficient_evidence
  • 若无专用回测工具,必须声明 MVP mode 与能力边界。
  • 禁止输出买卖点、仓位比例、杠杆建议。
  • 参数搜索范围从 config/strategy-backtester_config.yaml 读取。

依赖工具

  • tool_resolve_symbol(L2;标的解析)
  • tool_fetch_market_data
  • tool_calculate_technical_indicators
  • tool_l4_valuation_context(L4-data;标的含个股时可选并列估值事实字段)

通用输出字段

  • strategy_spec
  • backtest_window
  • performance
  • risk_metrics
  • trade_stats
  • parameter_sensitivity
  • limitations
  • next_experiments
Files

What ships with it

3 files beside SKILL.md in the same directory: the scripts, references and assets a skill reads on demand. Not counted in the per-session cost; read them before you install if any of them is executable.

Changes

What this file has done since we first saw it

Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.

  1. 12d ago First seen · 73 lines · 29 tokens per session scan A a01acb0e4181

Subscribe to this mod's changes

strategy-backtester is a skill published in the GitHub repository shaoxing-xie/openclaw-data-china-stock (51 stars, last pushed 4mo ago), licensed MIT. It adds 29 tokens to every session and 556 once invoked, about $0.0001 per session on Opus 5. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-30.