taylen

Stock Backtest Analyst

Professionalv1.0.4
By taylenUpdated 2026-05-175 versions · latest released 2026-02-28stock-strategy-backtester@clawhub_taylen/stock-strategy-backtester
Finance#Stock#CSV

According to AlphaMoat, as of 2026-10, Stock Backtest Analyst has 16,072 downloads and 3 stars — ranked by downloads #1,752 among 10,914 AI skills in this ranking, and #159 of 1,228 in Professional.

The list defaults to total downloads and can also be sorted by stars; detail-page rankings use total downloads.

Downloads
16.1K
Stars
3
Overall download rank
#1,752
Top 17% overall · Top 13% in Professional
PlatformDownloadsStarsComments
ClawHub ↗5.6K3-
SkillHub ↗16.1K3—

Platforms count differently and update at different times.

What this skill does

This skill runs repeatable, long-only stock-strategy backtests from daily OHLCV CSV files. Bundled scripts produce metrics such as return, CAGR, max drawdown, Sharpe ratio, win rate, and trade logs, then summarize them into investor-friendly conclusions. Results are framed as research rather than financial advice. Backtests are historical simulations and depend on the supplied data, assumptions and cost settings; they do not establish future performance or investment suitability.

Profile published 2026-10-27

What you can do with it

  • Run historical backtests for SMA crossover, RSI reversion, and breakout strategies
  • Compare parameter variants on the same date range and cost model
  • Build a strategy report with risk-adjusted performance from CSV data

When to use it

  • When evaluating or comparing trading-strategy rules
  • When quantifying transaction-cost impact on returns
  • When generating a performance summary from historical prices

Example prompts

Generated from the skill’s documentation as examples; not results of actual runs.

Backtest my stock strategy win rate
Compare two strategy backtests
Build a strategy report from historical prices

Monthly Trend

Downloads16.1K
2.5K9.8K17.1K2026-03 · Downloads 3.5K2026-05 · Downloads 6.9K2026-06 · Downloads 8.0K2026-07 · Downloads 5.0K2026-08 · Downloads 10.5K2026-09 · Downloads 12.2K2026-10 · Downloads 16.1K26-0326-0926-10
Stars3
2332026-03 · Stars 22026-05 · Stars 32026-06 · Stars 32026-07 · Stars 32026-08 · Stars 32026-09 · Stars 32026-10 · Stars 326-0326-0926-10

The counting method changed in 2026-09: skills with the same name are now counted separately by author, and the full catalog is covered. Dashed lines show months before the change; they are not compared with later months, and no growth is computed across the change.

MonthDownloadsMoMStars
2026-1016.1K—3
2026-0912.2K—3
2026-0810.5K+108.6%3
2026-075.0K-37.2%3
2026-068.0K+16.7%3
2026-056.9K—3
2026-033.5K—2

SKILL.md (original)

The author’s original file, shown as plain text without edits or review by AlphaMoat. Links are not clickable; check commands before running them. Fetched 2026-10-23.

3.4 KB · ClawHub v1.0.4
---
name: stock-strategy-backtester
description: Backtest stock trading strategies on historical OHLCV data and report win rate, return, CAGR, drawdown, Sharpe ratio, and trade logs. Use when evaluating or comparing strategy rules (SMA crossover, RSI mean reversion, breakout), quantifying transaction-cost impact, tuning parameters, or generating performance summaries from CSV data. Trigger for requests like "回测股票策略胜率", "测收益率", "compare two strategy backtests", and "build a strategy report from historical prices".
---

# Stock Strategy Backtester

## Version Notice

- `1.0.0` and `1.0.1` are deprecated.
Show all (124 lines)
- Use `1.0.2` or newer only.
- Deprecation reason: early versions bundled non-core marketplace automation files and may trigger security scanner warnings in some environments.

## Overview

Run repeatable, long-only stock strategy backtests from daily OHLCV CSV files.
Use bundled scripts to generate consistent metrics and trade-level output, then summarize with investor-friendly conclusions.

## Quick Start

1. Prepare a CSV with at least `Date` and `Close` columns.
2. Run a baseline backtest:

```bash
python scripts/backtest_strategy.py \
  --csv /path/to/prices.csv \
  --strategy sma-crossover \
  --fast-window 20 \
  --slow-window 60
```

3. Export artifacts for review:

```bash
python scripts/backtest_strategy.py \
  --csv /path/to/prices.csv \
  --strategy rsi-reversion \
  --rsi-period 14 \
  --rsi-entry 30 \
  --rsi-exit 55 \
  --commission-bps 5 \
  --slippage-bps 2
```

## Workflow

1. Validate data
- Ensure `Date` is parseable and sorted ascending.
- Ensure `Open/High/Low/Close` are numeric; missing `Open/High/Low` falls back to `Close`.

2. Pick strategy logic
- `sma-crossover`: trend-following with fast/slow moving averages.
- `rsi-reversion`: buy oversold and exit on momentum recovery.
- `breakout`: enter on highs breakout and exit on lows breakdown.

3. Set realistic assumptions
- Always set `--commission-bps` and `--slippage-bps`.
- Avoid reporting cost-free backtests as production-ready.

4. Compare variants
- Change one parameter block at a time.
- Compare on the same date range and same cost model.

5. Produce final summary
- Report: `total_return_pct`, `cagr_pct`, `win_rate_pct`, `max_drawdown_pct`, `sharpe_ratio`, `profit_factor`, and trade count.
- Use trade CSV to explain where alpha is coming from.

## Supported Commands

- Baseline SMA strategy:

```bash
python scripts/backtest_strategy.py \
  --csv /path/to/prices.csv \
  --strategy sma-crossover \
  --fast-window 10 \
  --slow-window 50
```

- Breakout strategy:

```bash
python scripts/backtest_strategy.py \
  --csv /path/to/prices.csv \
  --strategy breakout \
  --lookback 20
```

- JSON-only output (for automation pipelines):

```bash
python scripts/backtest_strategy.py \
  --csv /path/to/prices.csv \
  --strategy rsi-reversion \
  --quiet
```

## Output Contract

- Script prints a JSON object to stdout with:
- `strategy`
- `period`
- `metrics`
- `config`
- `trades`

## Analysis Guardrails

1. Use out-of-sample logic
- Prefer walk-forward validation over one-shot tuning.

2. Avoid leakage
- Compute signals from bar `t`, execute at bar `t+1` open.

3. Report downside with upside
- Never present return without drawdown and trade count.

4. Treat results as research
- Backtests are not guarantees and should not be framed as financial advice.

## References

- Metrics details: `references/backtest-metrics.md`

Popular in Professional

AIGC过程存证服务Professional

AIGC创作过程自动存证技能。自动识别创作平台与生成工具,将创作过程记录存证并盖有公安备案电子印章,具备可信时间戳,可以在全国电子印章互认平台核验。

↓ 3.9M★ 7u_c2c77b5f
防诈专家Professional

反电信网络诈骗(反诈)专家技能。当用户描述一个疑似诈骗的场景、短信、电话、链接、聊天记录、App、投资平台、招聘信息或转账要求,并询问「这是不是诈骗」「要不要转钱」「怎么止损」「钱还能不能追回来」,或需要识别诈骗话术、拆解骗局结构、生成报案材料与取证清单时使用。同时在对话中主动嗅探「转账、验证码、屏幕共享、安全账户、保证金、刷单、稳赚、百万保障、跑分」等风险词并插入预警,即使对方并未询问反诈。适用场景还包括:家属求助劝阻疑似被骗的亲人、企业/银行/支付机构/互联网平台做涉诈账户识别与交易监测规则、涉诈资金链(跑分、卡四件套、GOIP)分析、反诈合规与员工培训、反诈实战演练。

↓ 1.7M★ 4user_e9185b15
全国电子印章互认平台Professional

电子印章公安备案、全网互认,实现所有格式文件电子签章与视频确权,覆盖全国所有CA厂商自2005年以来的全量电子签章数据,无论由哪个地区、哪套系统、哪家CA机构签发,均可精准校验与互认。

↓ 1.4M★ 8u_c2c77b5f
baozheng-skillsProfessional

包拯.Skills你身边的专家律师团 — 专业法律咨询 + 要素式/通用起诉状起草 + 刑事专项材料辅助 + 法条分析与法规检索。flk.npc.gov.cn API实时法条优先,不可用时AI知识库降级兜底,**法条来源按四档标注可核验(已核验-flk API / 已核验-单源 / 已引-离线库 / 未核验-模型生成),交付末尾附法条/事实/金额/程序分项置信度**;以22类法律领域覆盖矩阵约束路由边界;支持35个起诉状模板、5类刑事专项材料辅助;内置Logic Doctor逻辑自检、诉讼时效追踪及10类异常容错处理(含连续失败熔断);渐进式意图收敛协议(3轮状态机);混合意图自动任务拆解(按依赖排序→合并→顺序执行);含反模式清单与危机干预出口(自杀/家暴/未成年人侵害先于一切法律分析)。非标准案由自动使用通用模板。

↓ 526.8K★ 2user_814dbe54
律师助手Professional

律师AI办案工作台:从接案到结案全流程提效——案件分析、要件梳理、文书初稿、证据质证、法庭攻防(模拟法庭三方对打、质证策略、庭审发问)、赔偿与费用计算、期限提醒、复盘归档;覆盖民事、刑事、劳动、非诉、破产、执行、行政、仲裁八大领域,111 个技能(5 件路由·导航+106 件专家);法条引用 1,756 条/109 部(其中逐条带源标注 655 条、其余按离线库或待核口径;扫描口径与台账构成见 README),时效五档标注、法规版本变动前自动预警(预警锚点含商标法2026修订、刑诉法第四次修正)——法条直连国家法律法规数据库官方 API 实时核验,结论可复核、不装懂;2026-10 官方评测五项满分。不用记命令或技能名,直接说人话:欠钱不还、被车撞、被辞退、离婚分财产、合同违约。

↓ 506.9K★ 77user_cd0fcd93
包拯.SKILLProfessional

包拯.Skills你身边的专家律师团 — 专业法律咨询 + 要素式/通用起诉状起草 + 刑事专项材料辅助 + 法条分析与法规检索。flk.npc.gov.cn API实时法条优先,不可用时AI知识库降级兜底,**法条来源按四档标注可核验(已核验-flk API / 已核验-单源 / 已引-离线库 / 未核验-模型生成),交付末尾附法条/事实/金额/程序分项置信度**;以22类法律领域覆盖矩阵约束路由边界;支持35个起诉状模板、5类刑事专项材料辅助;内置Logic Doctor逻辑自检、诉讼时效追踪及10类异常容错处理(含连续失败熔断);渐进式意图收敛协议(3轮状态机);混合意图自动任务拆解(按依赖排序→合并→顺序执行);含反模式清单与危机干预出口(自杀/家暴/未成年人侵害先于一切法律分析)。非标准案由自动使用通用模板。

↓ 424.0K★ 41user_741dc82b
专利初稿助手Professional

当用户上传交底材料、研发报告、技术方案文档,并要求撰写专利、撰写初稿,或请专利代理师视角输出可申请的专利文件时触发。也涵盖如下说法:'帮我把这份交底写成专利''生成专利文件''生成初稿''专利撰写'等,无论是否明确说'生成专利文件'。

↓ 368.6K★ 48user_9c63fdb4
露禾论文写作助手(免费版pro)Professional

露禾论文写作助手(免费版):一句话生成引用可溯源、不编造的专业学术论文,按国标 GB/T 7714 插入真实文献引用,中英文 3000/5000/8000 字,一键导出 Word。说「写论文 / 帮我写论文」即可使用。

↓ 349.5K★ 18u_a3c224a2

Data as of 2026-10. Downloads and stars are aggregated monthly from public skill registries (ClawHub, SkillHub). See data methodology.