Token导航 LogoToken导航

Agent Skill · 效率

finskills-backtest-expert(finskills 回测专家)

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

finskills-backtest-expert 是效率类 Agent Skill,可用宿主为 OpenClaw,通过ClawHub获取,权限为接触敏感数据;许可证为 MIT-0,第三方扫描已通过,按安装量在效率类的 21,003 个 Skill 里排第 16,303。

总安装 2,893周安装 123GitHub Stars 公开资料未说明下载 1,014核验 2026-05-01

安装说明

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

安装方式

通过对话安装

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

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

命令行安装

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

ClawHubOpenClaw
openclaw skills install finskills-backtest-expert

这个 Skill 是做什么的

效率类 Skill 把重复的整理、汇总、转换工作交给助手完成,减少手工复制粘贴。

通过 Finskills API 使用历史价格数据和 Fama-French 因子归因来设计、执行和评估量化交易策略。

上手步骤

4 步
  1. 1

    确认自己的宿主工具

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

  2. 2

    拿到安装命令

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

  3. 3

    安装后重启宿主

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

  4. 4

    按最小权限试用

    它需要接触敏感数据,先在测试目录或测试账号里跑,确认没问题再放到正式项目。

常见问题

6 条

finskills-backtest-expert 怎么安装?

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

finskills-backtest-expert 支持哪些 AI 工具?

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

finskills-backtest-expert 需要什么权限?

权限级别是接触敏感数据。该 Skill 可能接触密钥、Token、环境变量或敏感配置,应进入高风险复核队列,默认不自动发布。

finskills-backtest-expert 是免费的吗?

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

finskills-backtest-expert 用的人多吗?

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

finskills-backtest-expert 安全吗?

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

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

值得选的地方

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

先想清楚的地方

  • 需要接触敏感数据,装到常用环境前要先评估影响面。
  • 第三方目录整理,版本更新和行为细节以来源仓库为准。

适不适合你

更适合

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

不太适合

  • 环境里有大量密钥、凭证,不方便给第三方 Skill 读取的人。
  • 需要厂商级技术支持和 SLA 的生产系统。

效率类 Skill 对比

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

GitHub 代码协作 · OpenClaw

7,632,918545需要联网MIT-0通过
nano-pdf

Nano PDF 文档 · OpenClaw

4,249,476231需要联网MIT-0通过
auto-updater

自动更新程序 · OpenClaw

2,964,063386操作浏览器MIT-0通过
video-frames

视频帧 · OpenClaw

2,621,304112需要联网MIT-0通过
gemini

Gemini 助手 · OpenClaw

2,547,39648需要联网MIT-0有提醒
finskills-backtest-expert

finskills 回测专家 · 本页

2,893—接触敏感数据MIT-0通过

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

SKILL.md 原文

name
Backtest Expert
version
1.0.2
description
Design, execute, and evaluate quantitative trading strategies using historical price data and Fama-French factor attribution via the Finskills API.
author
finskills
metadata
openclaw
requires
env
primaryEnv
FINSKILLS_API_KEY
homepage
https://github.com/finskills/backtest-expert

Backtest Expert

Design, execute, and evaluate quantitative trading strategies using historical price data from the Finskills API. Transforms a natural-language strategy hypothesis into a rigorous backtest with performance metrics, drawdown analysis, Fama-French factor attribution, and walk-forward validation.


Setup

API Key required — Register at https://finskills.net to get your free key. Header: X-API-Key: <your_api_key>

Get your API key: Register at https://finskills.net — free tier available, Pro plan unlocks real-time quotes, history, and financials.

When to Activate This Skill

Activate when the user:

  • Describes a trading rule they want to test historically
  • Asks "how would X strategy have performed?"
  • Wants to validate a momentum, mean-reversion, or factor-based strategy
  • Asks about Sharpe ratio, maximum drawdown, or strategy performance metrics
  • Wants to see walk-forward or out-of-sample testing
  • Asks to compare two or more strategies head-to-head

Strategy Hypothesis Formulation

Before fetching data, clarify the strategy with the user:

  1. Universe: Which stocks? (Single stock, S&P 500, sector, custom list)
  2. Signal: What is the entry trigger? (Moving average crossover, RSI level, fundamental metric, etc.)
  3. Entry: Long, Short, or Long/Short?
  4. Exit: Trailing stop, fixed target, time-based, signal reversal?
  5. Holding Period: Daily, weekly, monthly?
  6. Position Sizing: Equal weight, volatility-adjusted, Kelly?
  7. Benchmark: SPY (default) or sector ETF?

State the strategy in a formal grammar:

ENTRY:  Buy {SYMBOL} when {condition}
EXIT:   Sell when {condition} OR stop at {-X%}
HOLD:   Max {N} days / bars
SIZING: {$N fixed / X% of portfolio / equal weight}
BENCH:  {SPY / QQQ / custom}
PERIOD: From {YYYY-MM-DD} to {YYYY-MM-DD}

Data Retrieval — Finskills API Calls

1. Historical OHLCV for Strategy Symbols

GET https://finskills.net/v1/stocks/history/{SYMBOL}?period=5y&interval=1d

Parameters:

  • period: 1y, 2y, 5y, 10y, max
  • interval: 1d (daily), 1wk (weekly), 1mo (monthly)

Extract: date, open, high, low, close, volume, adjustedClose

Repeat for each symbol in the strategy universe AND the benchmark (SPY or QQQ).

2. Fama-French 3-Factor Data

GET https://finskills.net/v1/free/market/fama-french

Extract: Mkt-RF (market excess return), SMB (small-minus-big), HML (high-minus-low), RF (risk-free rate) Use for: Attribution analysis — what % of strategy return is explained by market, size, value factors


Analysis Workflow

Step 1 — Data Preparation

  1. Align all price series to the same trading calendar (drop non-overlapping dates).
  2. Use adjustedClose for all calculations (accounts for splits and dividends).
  3. Compute daily returns: r_t = (adjustedClose_t / adjustedClose_{t-1}) - 1
  4. Handle missing data: forward-fill up to 2 days; drop if missing > 2 consecutive days.

Step 2 — Signal Generation

Based on the strategy rules, generate entry/exit signals for each day in the backtest.

Example Signal Implementations:

Simple Moving Average Crossover:

SMA_fast = rolling_mean(adjustedClose, window=fast_n)
SMA_slow = rolling_mean(adjustedClose, window=slow_n)
Signal = 1 (Long)  when SMA_fast crosses above SMA_slow
Signal = 0 (Flat)  when SMA_fast crosses below SMA_slow

RSI Reversion:

RSI = 100 - 100 / (1 + avg_gain_14 / avg_loss_14)
Signal = 1 (Long)  when RSI < 30 (oversold)
Signal = 0 (Flat)  when RSI > 70 (overbought)

Momentum:

Momentum_N = current_price / price_N_days_ago - 1
Signal = 1 when Momentum_N > threshold
Signal = 0 otherwise

Step 3 — Portfolio Returns Calculation

strategy_return_t = Signal_{t-1} × return_t   (signal from prior day, no lookahead)
benchmark_return_t = SPY daily return

Compute cumulative returns:

cumulative_return = PRODUCT(1 + strategy_return_t) - 1

Apply transaction costs (default: 0.10% per round-trip trade, adjustable):

cost_t = 0.001 × |Signal_t - Signal_{t-1}|  (cost only on signal changes)
net_return_t = strategy_return_t - cost_t

Step 4 — Performance Metrics

Compute the full performance scorecard:

MetricFormula
Total ReturnPRODUCT(1 + r_t) - 1
Annualized Return (CAGR)(1 + total_return)^(252/n_days) - 1
Annualized VolatilitySTD(r_t) × √252
Sharpe Ratio(CAGR - rf_rate) / annualized_vol
Sortino Ratio(CAGR - rf_rate) / downside_vol
Max Drawdownmax(1 - V_t / max(V_s for s ≤ t))
Calmar RatioCAGR / Max Drawdown
Win Rate% of trading days with positive return
Avg Win / Avg Lossmean positive return / mean negative return
Profit Factorsum wins / sum losses
Alpha (vs benchmark)CAGR_strategy - CAGR_benchmark
BetaCOV(r_strategy, r_benchmark) / VAR(r_benchmark)
Information RatioAlpha / tracking error
Number of TradesCount of signal transitions
Avg Holding PeriodAvg days per trade

Step 5 — Fama-French Factor Attribution

Regress strategy excess returns against F-F factors:

r_strategy - RF = α + β₁(Mkt-RF) + β₂(SMB) + β₃(HML) + ε

Interpret:

  • α (Alpha): Risk-adjusted return not explained by factors — the "skill" component
  • β₁ (Market Beta): Sensitivity to market direction
  • β₂ (SMB loading): Small-cap vs. large-cap tilt
  • β₃ (HML loading): Value (high) vs. growth (low) tilt
  • R²: How much of returns are explained by common factors (R² < 0.3 = distinctive strategy)

Step 6 — Walk-Forward Validation

To detect overfitting, split the full history:

  • In-Sample (IS): First 60% of data — used to identify strategy parameters
  • Out-of-Sample (OOS): Last 40% — held out, tested after IS optimization

Walk-Forward Efficiency Ratio:

WFE = OOS_Sharpe / IS_Sharpe
  • WFE > 0.7: Strategy generalizes well — low overfitting concern
  • WFE 0.4–0.7: Some degradation — monitor live, reduce leverage
  • WFE < 0.4: Likely overfit to historical data — do not trade with confidence

Step 7 — Risk Scenarios

Stress-test the strategy in 3 regimes:

  1. 2020 COVID Crash: Feb 19 – Mar 23, 2020 (S&P -34% in 33 days)
  2. 2022 Bear Market: Jan 1 – Dec 31, 2022 (S&P -19.4%)
  3. 2008 Financial Crisis: Oct 1 – Dec 31, 2008 (S&P -38% in quarter)

For each stress scenario, report the strategy's return vs. SPY return.


Output Format

╔══════════════════════════════════════════════════════════════════╗
║    BACKTEST REPORT  —  {STRATEGY NAME}                          ║
║    Period: {start_date}  to  {end_date}   ({N} trading days)   ║
╚══════════════════════════════════════════════════════════════════╝

📋 STRATEGY SUMMARY
  Universe:       {SYMBOL(s) or index}
  Entry Signal:   {description}
  Exit Signal:    {description}
  Position Type:  {Long / Long-Short}
  Benchmark:      {SPY / QQQ}
  Tx Cost:        0.10% per round-trip

📈 CUMULATIVE RETURNS
  Strategy:   +{X.X}%  ($100K → ${value}K)
  Benchmark:  +{X.X}%  ($100K → ${value}K)
  Alpha:      +{X.X}% annualized

📊 PERFORMANCE SCORECARD
               Strategy     Benchmark    Δ vs. Bench
  CAGR:         {X.X}%       {X.X}%      +{X.X}%
  Volatility:   {X.X}%       {X.X}%      
  Sharpe:        {X.XX}       {X.XX}      +{X.XX}
  Sortino:       {X.XX}       {X.XX}
  Max Drawdown: -{X.X}%      -{X.X}%
  Calmar:        {X.XX}       {X.XX}
  Win Rate:      {X.X}%       —
  Profit Factor: {X.XX}       —
  Avg Hold:      {N} days     —
  N Trades:      {count}      —

📉 DRAWDOWN ANALYSIS
  Worst Drawdown:       -{X}%  (from {date} to {date}, {N} days to recover)
  2nd Worst Drawdown:   -{X}%
  Average Drawdown:     -{X}%

🧬 FACTOR ATTRIBUTION (Fama-French)
  α (Annualized):   {X.XX}%  [{statistically significant yes/no}]
  β Market:         {X.XX}
  β SMB (size):     {X.XX}  [{small-cap / large-cap} tilt]
  β HML (value):    {X.XX}  [{value / growth} tilt]
  R² (explained):   {X}%

🔁 WALK-FORWARD VALIDATION
  In-Sample  ({dates}):  Sharpe {X.XX},  CAGR {X.X}%
  Out-of-Sample ({dates}): Sharpe {X.XX},  CAGR {X.X}%
  WF Efficiency Ratio:   {X.XX}  → {Generalizes well / Some degradation / Likely overfit}

💥 STRESS TEST
  2020 COVID Crash:    Strategy {+/-X}%  vs SPY -{X}%
  2022 Bear Market:    Strategy {+/-X}%  vs SPY -{X}%
  2008 Q4 Crash:       Strategy {+/-X}%  vs SPY -{X}%

🎯 VERDICT
  Signal Quality:   {Strong / Moderate / Weak / Overfit}
  Trade Live?       {Yes / Caution / No — further development needed}
  Suggested Refinement: {1–2 concrete suggestions to improve the strategy}

Limitations

  • Backtests suffer from survivorship bias (S&P 500 historical data excludes delisted companies).
  • Look-ahead bias is explicitly prevented by using prior-day signals; verify signal construction.
  • Slippage is not modeled (real-world execution will have impact beyond transaction cost assumption).
  • Fama-French data may have a 1–2 month lag; factors are smoothed — not for very recent periods.
  • Past performance in backtests does not guarantee future results.

平台分布

OpenClaw

94.18%
按下载量换算955

安全审计

VirusTotal

通过

ClawScan

通过

Static analysis

通过

权限和风险

接触敏感数据

该 Skill 可能接触密钥、Token、环境变量或敏感配置,应进入高风险复核队列,默认不自动发布。

安装前确认

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

继续浏览同类 Skills