Token导航 LogoToken导航

Agent Skill · 研究检索

akquant-backtest(akquant 回测)

用于辅助测试设计、自动化测试、用例整理和回归验证。它适合让 Agent 编写单元测试、端到端测试、测试计划或根据失败日志定位问题。使用时需要确认项目测试框架、运行命令和夹具数据,避免为了通过测试而改坏真实逻辑;涉及浏览器或外部服务时,应区分本地模拟、测试环境和生产环境。

akquant-backtest 是研究检索类 Agent Skill,可用宿主为 OpenClaw,通过ClawHub获取,权限为需要联网;许可证为 MIT-0,第三方扫描已通过,按安装量在研究检索类的 73,675 个 Skill 里排第 16,643。

总安装 7,064周安装 283GitHub Stars 公开资料未说明下载 2,287核验 2026-05-01

安装说明

本站只整理中文说明,不托管安装包,也不代用户安装。
GitHub
许可证
MIT-0
版本
1.0.1

安装方式

通过对话安装

复制提示词发给支持本地命令或 Skills 的 AI 助手,先确认命令和权限,再让它执行。

请帮我安装这个 Agent Skill:akquant-backtest(akquant 回测)
来源仓库:https://github.com/lamtest556-blip/akquant-backtest
安装命令:
openclaw skills install akquant-backtest
安装前请先检查当前环境是否支持对应 CLI,并向我确认将要执行的命令、安装目录、联网范围和文件读写权限;确认后再执行。

命令行安装

复制命令到本机终端执行。该命令会通过 OpenClaw 从第三方来源获取 Skill;本站只展示命令,不托管安装包,也不自动执行。

ClawHubOpenClaw
openclaw skills install akquant-backtest

这个 Skill 是做什么的

研究检索类 Skill 主要解决「找资料、核对事实、把来源整理清楚」的问题,通常会让助手先检索再总结。

用于辅助测试设计、自动化测试和回归验证,适合编写单元测试或根据失败日志定位问题。适用于需要确认项目测试框架、运行命令和夹具数据的场景,避免误改真实逻辑。使用时需区分本地模拟、测试环境和生产环境,尤其涉及浏览器或外部服务时。

安装命令:openclaw skills install akquant-backtest,基于 AKQuant Rust 引擎和 AKShare 数据。注意权限范围和维护状态,防止触发不必要的联网或文件操作。

上手步骤

4 步
  1. 1

    确认自己的宿主工具

    公开资料标注支持 OpenClaw;先确认自己用的是其中之一,再按对应工具的 Skills 目录放置。

  2. 2

    拿到安装命令

    可以直接复制的命令是 openclaw skills install akquant-backtest;命令里的占位符换成自己的路径或密钥再执行。

  3. 3

    安装后重启宿主

    命令执行完要完全退出宿主工具再打开,让新装的 Skill 被重新扫描到,否则列表里可能看不到。

  4. 4

    按最小权限试用

    它需要需要联网,先在测试目录或测试账号里跑,确认没问题再放到正式项目。

常见问题

6 条

akquant-backtest 怎么安装?

在终端执行 openclaw skills install akquant-backtest。装完完全退出宿主工具再打开,让它重新扫描本地 Skill。

akquant-backtest 支持哪些 AI 工具?

公开资料标注支持 OpenClaw。其他工具只要能读取本地 Skill 目录,一般也能手动放进去,但要自己确认触发方式是否一致。

akquant-backtest 需要什么权限?

权限级别是需要联网。该 Skill 可能需要联网访问来源站点、仓库或外部 API;具体网络访问范围需要结合源码和 README 复核。

akquant-backtest 是免费的吗?

来源标注的许可证是 MIT-0。本站不代收任何费用,也不托管安装包;能否商用、要不要署名,以许可证原文为准。

akquant-backtest 用的人多吗?

公开数据是累计安装 7,064 次,近一周安装 283 次,下载 2,287 次。这些数字来自第三方目录统计,只能当作热度参考,不代表质量或安全性。

akquant-backtest 安全吗?

第三方扫描结果为通过,但这只覆盖已知的静态检查项,不能替代自己读一遍源码和安装命令。

值得选的地方和要先想清楚的地方

值得选的地方

  • 专注 OpenClaw 一种宿主,触发方式和使用习惯不用来回切换。
  • 许可证明确为 MIT-0,商用和分发边界好判断。
  • 第三方扫描已通过,常见的高风险行为没有命中。

先想清楚的地方

  • 第三方目录整理,版本更新和行为细节以来源仓库为准。

适不适合你

更适合

  • 已经在用 OpenClaw,想直接扩展它能力的人。
  • 需要处理研究检索类任务、又不想每次都手写提示词的人。
  • 需要许可证清楚、并且有第三方扫描结果的团队项目。

不太适合

  • 需要厂商级技术支持和 SLA 的生产系统。

研究检索类 Skill 对比

6 个同类
Skill总安装GitHub 星权限许可证扫描
find-skills

寻找技能 · Codex、Claude

31,199,81316,486操作浏览器MIT有提醒
self-improving-agent

自我改进 Agent · OpenClaw

16,464,0023,396接触敏感数据MIT-0通过
soultrace

灵魂追踪 · Codex、Claude

7,588,94412需要联网未明确有提醒
self-improving

自我完善 · OpenClaw

6,829,2841,046需要联网MIT-0通过
microsoft-foundry

微软代工厂 · Codex、Claude

6,614,144764调用外部服务未明确有提醒
akquant-backtest

akquant 回测 · 本页

7,064—需要联网MIT-0通过

按安装量取同分类前几名;数字来自第三方目录统计,只作热度参考,不代表质量结论。

SKILL.md 原文

name
akquant-backtest
description
A-share quantitative trading backtesting using AKQuant (Rust engine) and AKShare data. Use when user asks to "backtest a stock strategy", "test trading algorithm on Chinese stocks", "analyze stock performance", "run double MA strategy", or "optimize trading parameters". Supports double MA, RSI, and custom strategies for A-shares.

AKQuant A-Share Backtesting

High-performance quantitative backtesting for Chinese stocks using Rust-powered AKQuant framework.

When to Use This Skill

Use this skill when you need to:

  • Backtest trading strategies - "Backtest double MA strategy on 平安银行"
  • Analyze stock performance - "How would a momentum strategy perform on 茅台?"
  • Optimize trading parameters - "Find best MA periods for 宁德时代"
  • Validate trading ideas - "Test if RSI works on Chinese tech stocks"
  • Compare strategies - "Which performs better: MA crossover or RSI?"

Quick Examples

Example 1: Quick Backtest

User says: "Backtest double MA strategy on 贵州茅台"

Actions:

python3 scripts/run_backtest.py 600519 10 30

Result: Returns total return, trade count, equity curve

Example 2: Strategy Comparison

User says: "Compare 5-day vs 20-day MA on 平安银行"

Actions:

# Fast MA = 5, Slow MA = 20
python3 scripts/run_backtest.py 000001 5 20

# Compare with default 10/30
python3 scripts/run_backtest.py 000001 10 30

Result: Compare returns to find optimal parameters

Example 3: Research Workflow

User says: "Analyze which tech stocks performed best with momentum strategy in 2024"

Actions:

  1. Test on multiple stocks: python3 scripts/run_backtest.py 300750 10 30 (宁德时代)
  2. Test: python3 scripts/run_backtest.py 002594 10 30 (比亚迪)
  3. Compare results and identify patterns

Step-by-Step Instructions

Step 1: Choose Stock Symbol

Common A-Share Symbols:

SymbolCompanySector
600519贵州茅台消费
000001平安银行金融
300750宁德时代新能源
002594比亚迪汽车
000858五粮液消费

Find symbol: Use AKShare or search "股票代码 + 公司名称"

Step 2: Select Strategy Parameters

Double MA Strategy (金叉买入,死叉卖出):

python3 scripts/run_backtest.py <symbol> <fast_period> <slow_period>

Recommended combinations:

  • Conservative: 20 / 60 (fewer trades, longer trends)
  • Balanced: 10 / 30 (moderate frequency)
  • Aggressive: 5 / 20 (more trades, shorter trends)

Step 3: Analyze Results

Key metrics to review:

  • 总收益率 - Overall strategy performance
  • 交易次数 - Frequency (lower = less commission)
  • 最大回撤 - Risk measure (if implemented)
  • 胜率 - % of profitable trades

Interpretation:

Return > 0%    → Strategy beats buy-and-hold
Return < 0%    → Strategy underperforms
Trade count > 20 → Consider commission impact

Available Strategies

Built-in Strategy: Double MA

Logic: Fast MA crosses above slow MA → Buy; Crosses below → Sell

Code example:

from double_ma_strategy import run_double_ma_backtest

result = run_double_ma_backtest(
    symbol="000001",
    fast_period=10,
    slow_period=30,
    initial_capital=100000,
    start_date="20240101",
    end_date="20241231"
)

print(f"Return: {result['return_pct']:.2f}%")
print(f"Trades: {len(result['trades'])}")

Custom Strategy Development

RSI Strategy Template:

import akquant as aq

class RsiStrategy:
    def __init__(self, period=14, oversold=30, overbought=70):
        self.rsi = aq.RSI(period)
        self.oversold = oversold
        self.overbought = overbought
        
    def on_bar(self, bar):
        self.rsi.update(bar['close'])
        
        if self.rsi.value < self.oversold:
            return 'BUY'  # 超卖买入
        elif self.rsi.value > self.overbought:
            return 'SELL'  # 超买卖出
        return 'HOLD'

Technical Indicators Reference

IndicatorUsageSignal
aq.SMA(n)Trend followingPrice > SMA → uptrend
aq.EMA(n)Faster trendMore responsive than SMA
aq.RSI(n)Momentum<30 oversold, >70 overbought
aq.MACD()Trend + momentumCrossover signals
aq.BollingerBands(n, k)VolatilityPrice touches bands
aq.ATR(n)Risk sizingPosition sizing based on volatility

Example:

import akquant as aq

# Multi-indicator strategy
sma = aq.SMA(20)
rsi = aq.RSI(14)

for price in prices:
    sma.update(price)
    rsi.update(price)
    
    # Buy: Price > SMA AND RSI < 40 (uptrend but not overbought)
    if price > sma.value and rsi.value < 40:
        signal = 'BUY'

Data Access via AKShare

Stock Historical Data

import akshare as ak

# Daily price data (qfq = 前复权)
df = ak.stock_zh_a_hist(
    symbol="000001",
    period="daily",
    start_date="20240101",
    end_date="20241231",
    adjust="qfq"
)

# Columns: 日期, 开盘, 收盘, 最高, 最低, 成交量

Real-time Quote

# Current prices
df = ak.stock_zh_a_spot_em()

Troubleshooting

Error: "ModuleNotFoundError: No module named 'akquant'"

Cause: Dependencies not installed Solution:

source /root/.openclaw/venv/bin/activate
pip install akquant akshare pandas numpy

Error: "Stock symbol not found"

Cause: Wrong symbol format Solution:

  • A-shares use 6-digit codes: 000001 (SZ), 600519 (SH), 300750 (创业板)
  • Don't include exchange prefix (use 000001 not SZ000001)

Error: "No data returned"

Causes:

  1. Invalid date range - Check start_date < end_date
  2. Stock suspended - Some stocks have trading halts
  3. Delisted stock - Verify stock is still trading
  4. Network issue - AKShare requires internet connection

Strategy returns -100% (total loss)

Causes:

  1. Wrong parameter order - fast_period should be < slow_period
   # Wrong: fast > slow
   python3 scripts/run_backtest.py 000001 30 10
   
   # Correct: fast < slow
   python3 scripts/run_backtest.py 000001 10 30
  1. Too many trades - High commission costs
  2. Wrong signal logic - Check buy/sell conditions

Slow performance

Solutions:

  • Reduce date range (test 3 months instead of 1 year)
  • Use fast_period >= 5 to reduce calculation
  • AKQuant is Rust-based and fast; slowness usually comes from data fetching

Results inconsistent between runs

Cause: AKShare data updates (recent days) Solution:

  • Use fixed date ranges for reproducibility
  • Cache data locally if needed

Best Practices

Strategy Development Workflow

  1. Start simple - Test MA crossover before complex strategies
  2. Visualize - Plot equity curve if possible
  3. Walk-forward test - Train on 2023, test on 2024
  4. Transaction costs - Include 0.1% commission + 0.1% slippage
  5. Risk management - Add stop-loss logic

Parameter Optimization

# Test multiple combinations
for fast in 5 10 15; do
  for slow in 20 30 60; do
    echo "Testing $fast/$slow:"
    python3 scripts/run_backtest.py 000001 $fast $slow
  done
done

Avoid Overfitting

  • Don't optimize too many parameters
  • Test on out-of-sample data
  • Simple strategies often outperform complex ones

Limitations & Warnings

  • Data delay: AKShare has 15-minute delay - for backtesting only, not live trading
  • Historical bias: Past performance ≠ future results
  • Execution: Real-world fills may differ from backtest assumptions
  • Survivorship: Delisted stocks not in current data
  • Dividends: Adjusted prices used, but dividend timing affects returns

References

平台分布

OpenClaw

95.49%
按下载量换算2,184

安全审计

VirusTotal

通过

ClawScan

通过

Static analysis

通过

权限和风险

需要联网

该 Skill 可能需要联网访问来源站点、仓库或外部 API;具体网络访问范围需要结合源码和 README 复核。

安装前确认

本站仅展示第三方公开信息,不托管安装包,不提供自动安装或运行环境。安装前应自行审查源码、依赖和命令行为。目前只有一个公开来源,建议同时核对源仓库。

继续浏览同类 Skills