Home / weaxs / stock-analysis-plugin · skills/strategy-backtest/SKILL.md · GitHub

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

Latest version
mdr add weaxs/stock-analysis-plugin/strategy-backtest@git:20260923.f5cc4c4
Exact content
mdr add weaxs/stock-analysis-plugin/strategy-backtest@sha256:4792e2dfcd6f64ed

Pin 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.

Badge

mdr badge

[![mdr](https://markdownregistry.com/badge/art_t3e4qvhfjh2nav4i.svg)](https://markdownregistry.com/a/art_t3e4qvhfjh2nav4i)

1 badge views in 30 days

Versions

versioncommittedcommitsizeaudit
git:20260923.f5cc4c4 latest2026-09-23 f5cc4c4 4,537 BA view · diff
git:20260922.a679af12026-09-22 a679af1 4,145 BA view · diff
git:20260916.70e82282026-09-16 70e8228 4,122 BA view · diff
git:20260916.a1ca9262026-09-16 a1ca926 3,318 BA view · diff
git:20260521.076544a2026-05-21 076544a 3,145 BA view · diff
git:20260514.9bdbe4d2026-05-14 9bdbe4d 2,906 BA view

Audit of the latest version

A  17 of 17 checks passed. Deterministic, no model, same answer every run.
  • 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

GitHub

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.

More from weaxs/stock-analysis-plugin

AGENTS.md agents
weaxs/stock-analysis-plugin · AGENTS.md
git:20260922.a679af1 · audit A · 24 stars
CLAUDE.md claude
weaxs/stock-analysis-plugin · CLAUDE.md
git:20260807.a302e05 · audit B · 24 stars
bottom-volume skill
weaxs/stock-analysis-plugin · skills/bottom-volume/SKILL.md · 底部放量分析:判断长期下跌后的异常放量是否构成反转信号。用于低位放量;普通阻力突破用 volume-breakout。
git:20260916.70e8228 · audit A · 24 stars
box-oscillation skill
weaxs/stock-analysis-plugin · skills/box-oscillation/SKILL.md · 箱体震荡分析:识别横盘区间、支撑压力和突破失效条件。用于区间波段或高抛低吸问题。
git:20260916.70e8228 · audit A · 24 stars
bull-trend skill
weaxs/stock-analysis-plugin · skills/bull-trend/SKILL.md · 趋势追踪分析:识别中长期趋势、所处阶段和离场条件。用于多头排列、上升通道或持有趋势股。
git:20260916.70e8228 · audit A · 24 stars
chan-theory skill
weaxs/stock-analysis-plugin · skills/chan-theory/SKILL.md · 缠论分析:按笔、段、中枢和背驰识别缠论买卖点。仅在用户明确要求缠论口径时使用。
git:20260916.70e8228 · audit A · 24 stars
dragon-head skill
weaxs/stock-analysis-plugin · skills/dragon-head/SKILL.md · 龙头股分析:在已知板块中比较启动顺序、涨幅、回调和持续性。题材热度与参与节奏用 hot-theme。
git:20260919.9a70e54 · audit A · 24 stars
emotion-cycle skill
weaxs/stock-analysis-plugin · skills/emotion-cycle/SKILL.md · 市场情绪周期:用市场宽度、涨跌停、成交额和热度判断冰点、回暖、高潮或退潮。完整大盘复盘用 market-review。
git:20260919.9a70e54 · audit A · 24 stars
event-driven skill
weaxs/stock-analysis-plugin · skills/event-driven/SKILL.md · 事件驱动分析:评估公告、业绩、政策、订单或资本运作对个股的影响路径、定价程度和失效条件。
git:20260916.70e8228 · audit A · 24 stars
expectation-repricing skill
weaxs/stock-analysis-plugin · skills/expectation-repricing/SKILL.md · 预期重估分析:比较市场预期与可验证事实,判断正负预期差、定价程度和重估失效条件。
git:20260916.70e8228 · audit A · 24 stars
growth-quality skill
weaxs/stock-analysis-plugin · skills/growth-quality/SKILL.md · 成长质量分析:用多期收入、利润、现金流和盈利能力评估增长的真实性与可持续性。泛风险排查用 stock-analysis。
git:20260916.70e8228 · audit A · 24 stars
hot-theme skill
weaxs/stock-analysis-plugin · skills/hot-theme/SKILL.md · 热点题材分析:评估板块强度、扩散度、个股关联度和参与节奏。已知板块内的龙头比较用 dragon-head。
git:20260922.a679af1 · audit A · 24 stars

Every file in weaxs/stock-analysis-plugin

Browse by kind, by grade A, or by owner.