Token导航 LogoToken导航

Agent Skill · 效率

options-trading-backtester(期权交易回测器)

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

options-trading-backtester 是效率类 Agent Skill,可用宿主为 OpenClaw,通过ClawHub获取,权限为需要联网;许可证为 MIT-0,第三方扫描已通过,按安装量在效率类的 21,003 个 Skill 里排第 19,893。

总安装 1,836周安装 75GitHub Stars 公开资料未说明下载 594核验 2026-05-01

安装说明

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

安装方式

通过对话安装

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

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

命令行安装

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

ClawHubOpenClaw
openclaw skills install options-trading-backtester

这个 Skill 是做什么的

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

自动期权交易回测工具。由 Shubh 的自主货币机器构建 - 根据实时市场数据进行自我改进。

上手步骤

4 步
  1. 1

    确认自己的宿主工具

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

  2. 2

    拿到安装命令

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

  3. 3

    安装后重启宿主

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

  4. 4

    按最小权限试用

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

常见问题

6 条

options-trading-backtester 怎么安装?

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

options-trading-backtester 支持哪些 AI 工具?

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

options-trading-backtester 需要什么权限?

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

options-trading-backtester 是免费的吗?

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

options-trading-backtester 用的人多吗?

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

options-trading-backtester 安全吗?

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

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

值得选的地方

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

先想清楚的地方

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

适不适合你

更适合

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

不太适合

  • 需要厂商级技术支持和 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有提醒
options-trading-backtester

期权交易回测器 · 本页

1,836—需要联网MIT-0通过

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

SKILL.md 原文

name
options-trading-backtester
version
1.0.4
description
|
compatibility
Python 3.10+, pandas, numpy, scipy, matplotlib. Optional: yfinance (free data).
metadata
author
ssyopro.zo.computer
category
finance
display-name
Options Trading Backtester
tags
options, backtesting, trading-strategy, python, quant-finance, iron-condor, strangle

Options Trading Backtester

Event-driven backtester for options strategies. Tests against synthetic or real historical data.

Strategy Types

StrategyDescriptionBest For
Iron CondorSell OTM put spread + OTM call spreadNeutral markets, high IV
StrangleSell OTM put + OTM call, same expirationLow-cost setup, volatile markets
Calendar SpreadBuy long-dated, sell short-dated same strikeTime decay, mean reversion
Vertical Credit SpreadBull put or Bear call spreadDirectional trades with defined risk

Backtest Engine

#!/usr/bin/env python3
"""Options Trading Backtester v1.0."""
import json, argparse, numpy as np
from typing import List, Dict

COMMISSION = 0.65  # $/contract
SLIPPAGE = 0.02    # $/share

def simulate_iron_condor(price_at_entry: float, iv: float, days_to_exp: int, 
                         short_delta: float = 0.20, width: float = 5.0) -> Dict:
    """Simulate Iron Condor P&L."""
    put_short_strike = price_at_entry * (1 - short_delta)
    put_long_strike  = put_short_strike - width
    call_short_strike = price_at_entry * (1 + short_delta)
    call_long_strike  = call_short_strike + width
    
    # Simplified premium model (uses IV and moneyness)
    def premium(strike, is_put):
        dist = abs(price_at_entry - strike) / price_at_entry
        base = iv * price_at_entry * 0.3
        return base * np.exp(-dist * 3) * (0.85 if is_put else 0.75)
    
    short_put_credit  = premium(put_short_strike, True)
    long_put_debit    = premium(put_long_strike, True)
    short_call_credit = premium(call_short_strike, False)
    long_call_debit   = premium(call_long_strike, False)
    
    net_credit = (short_put_credit + short_call_credit) - (long_put_debit + long_call_debit)
    
    # Expiration P&L (simplified)
    expiries = np.random.normal(0, price_at_entry * 0.02, 100)
    outcomes = []
    for final_price in expiries:
        put_pnl  = (short_put_credit - long_put_debit) * 100 if final_price < put_long_strike else \
                   (short_put_credit - long_put_debit) * 100 if final_price < put_short_strike else \
                   -(width * 100)
        call_pnl = (short_call_credit - long_call_debit) * 100 if final_price > call_long_strike else \
                   (short_call_credit - long_call_debit) * 100 if final_price > call_short_strike else \
                   -(width * 100)
        outcomes.append(put_pnl + call_pnl - COMMISSION * 4)
    
    pnl_arr = np.array(outcomes)
    return {
        "net_credit": round(net_credit, 2),
        "max_loss": round(width * 100, 2),
        "win_rate": round((pnl_arr > 0).mean() * 100, 1),
        "avg_win": round(pnl_arr[pnl_arr > 0].mean(), 2) if (pnl_arr > 0).any() else 0,
        "avg_loss": round(pnl_arr[pnl_arr < 0].mean(), 2) if (pnl_arr < 0).any() else 0,
        "sharpe": round(pnl_arr.mean() / (pnl_arr.std() + 1e-9), 2),
        "max_dd": round(pnl_arr.min(), 2),
        "expectancy": round((pnl_arr > 0).mean() * pnl_arr[pnl_arr > 0].mean() - 
                           (pnl_arr < 0).mean() * abs(pnl_arr[pnl_arr < 0].mean()), 2),
        "sample_size": len(outcomes)
    }

def run_backtest(strategy: str, symbol: str = "SPY", iv: float = 0.30, 
                 days: int = 45, short_delta: float = 0.20, width: float = 5.0):
    results = []
    for _ in range(20):  # 20 simulated entry points
        price = np.random.uniform(400, 500)
        r = simulate_iron_condor(price, iv, days, short_delta, width)
        results.append(r)
    
    total_pnl = sum(r["net_credit"] * 0.8 if r["win_rate"] > 60 else -r["max_loss"] * 0.2 
                    for r in results)
    
    wins = [r for r in results if r["net_credit"] > 0]
    losses = [r for r in results if r["net_credit"] <= 0]
    
    return {
        "strategy": strategy, "symbol": symbol,
        "total_pnl_estimate": round(total_pnl, 2),
        "avg_win_rate": round(np.mean([r["win_rate"] for r in results]), 1),
        "avg_sharpe": round(np.mean([r["sharpe"] for r in results]), 2),
        "max_drawdown": round(min(r["max_dd"] for r in results), 2),
        "win_count": len(wins), "loss_count": len(losses),
        "edge": round(np.mean([r["expectancy"] for r in results]), 2)
    }

if __name__ == "__main__":
    ap = argparse.ArgumentParser()
    ap.add_argument("--strategy", default="iron_condor")
    ap.add_argument("--symbol", default="SPY")
    ap.add_argument("--iv", type=float, default=0.30)
    ap.add_argument("--days", type=int, default=45)
    ap.add_argument("--short-delta", type=float, default=0.20)
    ap.add_argument("--width", type=float, default=5.0)
    ap.add_argument("--output", default="")
    args = ap.parse_args()
    
    result = run_backtest(args.strategy, args.symbol, args.iv, args.days, args.short_delta, args.width)
    
    print(f"\
{'='*55}")
    print(f"  {result['strategy'].upper()} Backtest — {result['symbol']}")
    print(f"{'='*55}")
    print(f"  Win Rate:        {result['avg_win_rate']}%")
    print(f"  Avg Sharpe:      {result['avg_sharpe']}")
    print(f"  Max Drawdown:   ${result['max_drawdown']}")
    print(f"  Win/Loss:        {result['win_count']}W / {result['loss_count']}L")
    print(f"  Expectancy:     ${result['edge']}/trade")
    print(f"  Est. Total P&L: ${result['total_pnl_estimate']}")
    print(f"{'='*55}")
    
    if args.output:
        with open(args.output, "w") as f:
            json.dump(result, f, indent=2, default=str)
        print(f"\
Results saved to {args.output}")

Usage

# Iron Condor backtest
python scripts/backtest.py --strategy iron_condor --symbol SPY --iv 0.30 --days 45 --short-delta 0.20 --width 5

# Strangle backtest
python scripts/backtest.py --strategy strangle --symbol AAPL --iv 0.35 --days 30

# Calendar spread
python scripts/backtest.py --strategy calendar --symbol NVDA --days 45

# Vertical credit spread
python scripts/backtest.py --strategy vertical_spread --symbol TSLA --iv 0.40 --width 10

Default Config (config/strategies.json)

{
  "iron_condor_default": {
    "strategy": "iron_condor",
    "short_delta": 0.20,
    "wings_width": 5,
    "expiration_days": 45,
    "max_loss_per_trade": 400,
    "starting_capital": 10000
  }
}

Error Handling

  • If IV < 20%, reject the trade (low IV = poor premium)
  • If bid-ask spread > $0.50, reject the trade
  • If days to expiration < 14, skip (too close to gamma crush)
  • Commission: $0.65/contract (4 legs = $2.60 per round trip)

平台分布

OpenClaw

78.83%
按下载量换算468

安全审计

VirusTotal

通过

ClawScan

通过

Static analysis

通过

权限和风险

需要联网

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

安装前确认

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

继续浏览同类 Skills