strategy-backtest skillA
strategy-backtest is agent-read markdown (skill) from weaxs/stock-analysis-plugin: 策略回测:定义或读取 AlphaEvo YAML 策略,回测收益、回撤和交易统计。仅在用户明确要求时进行参数优化。.
Indexed from public GitHub and served as immutable, content-addressed versions. Install it pinned to an exact SHA-256 with the mdr CLI, and every file is verified against the hash recorded here before it reaches your agent. The deterministic audit below grades the latest version, and the same file always earns the same grade.
What the file says
# 策略回测与优化
开始前读取[短线交易决策框架](../stock-analysis/references/short-term-trading.md)的风险单位和回测约束。回测用于反证策略,不把样本内收益包装成预测。
## 工作流程
### 第一步:策略定义
帮助用户将交易思路转化为 YAML 策略文件。策略 DSL 格式:
```yaml
name: "策略名称"
version: "1.0"
description: "策略描述"
parameters:
param1: value1
entry:
conditions:
- indicator: "rsi" # 指标名
period: 14 # 指标周期
operator: "<" # 比较运算符
value: 30 # 阈值
logic: "all" # all=AND, any=OR
exit:
conditions:
- indicator: "rsi"
period: 14
operator: ">"
value: 70
logic: "any"
stop_loss: -0.05 # 止损比例
take_profit: 0.15 # 止盈比例
simulation:
slippage: 0.001 # 滑点(买卖双边),默认 0.001
commission: 0.00025 # 佣金(买卖双边,券商自定;A股常见万2.5),默认 0.0015
stamp_tax: 0.0005 # 印花税(仅卖出收;A股 0.05%,其他市场按当下实际费率,无则省略),默认 0
position:
size: 1.0 # 仓位比例
max_positions: 1 # 最大持仓数
```
**可用指标**:rsi, ma, ema, macd_dif, macd_dea, macd, volume_ratio, price_change, bollinger_position, close, volume
**可用运算符**:`>`, `<`, `>=`, `<=`, `==`, `cross_above`, `cross_below`
### 第二步:运行回测
运行回测脚本:
```bash
…Read the whole file at its exact version.
How to install
mdr add weaxs/stock-analysis-plugin/strategy-backtest@git:20260923.f5cc4c4mdr add weaxs/stock-analysis-plugin/strategy-backtest@sha256:4792e2dfcd6f64edPin to a label to follow the author's releases, or to a sha256 to freeze the exact bytes forever. Either way the resolved hash is written to mdr.lock, and mdr install reproduces it on any machine.
[](https://markdownregistry.com/a/art_t3e4qvhfjh2nav4i)
1 badge views in 30 days
Versions
| version | committed | commit | size | audit | |
|---|---|---|---|---|---|
| git:20260923.f5cc4c4 latest | 2026-09-23 | f5cc4c4 | 4,537 B | A | view · diff |
| git:20260922.a679af1 | 2026-09-22 | a679af1 | 4,145 B | A | view · diff |
| git:20260916.70e8228 | 2026-09-16 | 70e8228 | 4,122 B | A | view · diff |
| git:20260916.a1ca926 | 2026-09-16 | a1ca926 | 3,318 B | A | view · diff |
| git:20260521.076544a | 2026-05-21 | 076544a | 3,145 B | A | view · diff |
| git:20260514.9bdbe4d | 2026-05-14 | 9bdbe4d | 2,906 B | A | view |
Audit of the latest version
- pass: Frontmatter block present
- pass: Frontmatter declares a name
- pass: Frontmatter declares a description
- pass: Size between 200 bytes and 200 KB (4537 bytes)
- pass: No zero-width or bidi control characters
- pass: No instruction hidden inside an HTML comment
- pass: No link to an exfiltration or paste host
- pass: No credential-shaped string
- pass: No instruction to send local credentials anywhere
- pass: No text hidden with inline styles
- pass: No prompt-injection phrasing
- pass: No curl or wget piped into a shell
- pass: No recursive delete of root, home or parent
- pass: No instruction to read or print local credentials
- pass: No base64 blob over 200 characters
- pass: No link to a raw IP address
- pass: No script tag
Source
weaxs/stock-analysis-plugin · 24 stars · license none · pushed 2026-09-23 · branch main
API
GET https://markdownregistry.com/api/v1/artifacts/art_t3e4qvhfjh2nav4i GET https://markdownregistry.com/api/v1/resolve?ref=weaxs/stock-analysis-plugin/strategy-backtest GET https://markdownregistry.com/api/v1/blob/4792e2dfcd6f64ed900675ecb8ab83b8570ec526301bc1430066449c7f9e6522
Your agent does the legwork. You hear about the deals worth your word. Hand yours the standing instructions at modelranch.com and it joins the network that reads files like this one.