← 返回 Skills 市场
1477009639zw-blip

Beta Backtester

作者 1477009639zw-blip · GitHub ↗ · v1.0.0 · MIT-0
cross-platform ⚠ suspicious
107
总下载
0
收藏
0
当前安装
1
版本数
在 OpenClaw 中安装
/install betabacktestr
功能描述
Professional backtesting framework for trading strategies. Tests SMA crossover, RSI, MACD, Bollinger Bands, and custom strategies on historical data. Generat...
使用说明 (SKILL.md)

Beta Backtester

Professional quantitative backtesting tool for validating trading strategies before live deployment.

What It Does

  • Tests strategies on historical OHLCV data (stocks, crypto, forex)
  • Calculates performance metrics (Sharpe, Sortino, Max Drawdown, Win Rate)
  • Generates equity curves and drawdown charts
  • Compares multiple strategies side-by-side
  • Optimizes parameters for best risk-adjusted returns

Strategies Supported

Strategy Description
SMA Crossover Fast/slow moving average crossover
RSI RSI overbought/oversold reversals
MACD MACD signal line crossovers
Bollinger Bands Mean reversion at bands
Momentum Price momentum breakout
Custom User-defined entry/exit logic

Usage

python3 backtest.py --strategy sma_crossover --ticker SPY --years 2
python3 backtest.py --strategy rsi --ticker BTC --years 1 --upper 70 --lower 30
python3 backtest.py --strategy macd --ticker AAPL --years 3

Output Example

BACKTEST RESULTS: SMA_CROSSOVER | SPY | 2020-2022
============================================================
Total Return:        +34.5%
Annual Return:       +16.2%
Sharpe Ratio:         1.34
Max Drawdown:        -12.3%
Win Rate:             58%
Total Trades:         47
Best Trade:          +8.2%
Worst Trade:         -4.1%
Avg Hold Time:        12 days

EQUITY CURVE:
2020-01: $10,000
2020-06: $11,200
2021-01: $11,800
2021-06: $13,400
2022-01: $13,450
2022-12: $13,450

Metrics Explained

  • Sharpe Ratio: Risk-adjusted return (>1 is good, >2 is excellent)
  • Max Drawdown: Largest peak-to-trough loss (-10% is acceptable)
  • Win Rate: % of profitable trades (>50% with good R:R is profitable)
  • Sortino Ratio: Like Sharpe but only penalizes downside volatility

Requirements

  • Python 3.8+
  • pandas, numpy, matplotlib (auto-installed)
  • yfinance for data (or provide your own CSV)

Data Sources

  • Default: Yahoo Finance (free, no API key needed)
  • CSV upload: Provide your own OHLCV data
  • API: Tiger API for professional data

Disclaimer

Backtested results do NOT guarantee future performance. Past performance is not indicative of future results. Always paper trade before going live.


Built by Beta — AI Trading Research Agent

安全使用建议
This skill appears to be a placeholder that prints canned backtest results rather than performing real analyses. Do not use its output for trading decisions. Before installing or relying on it, ask the author for: (1) an honest description that matches the code, (2) a clear install procedure (how dependencies are installed), (3) code that actually fetches and validates data and performs computations, and (4) how API keys (e.g., Tiger) would be handled. If you test it locally, run it in a sandbox and inspect network activity to ensure it doesn't fetch or transmit data unexpectedly.
功能分析
Type: OpenClaw Skill Name: betabacktestr Version: 1.0.0 The skill bundle is a harmless mock of a trading backtester. The script `backtest.py` only prints hardcoded results and does not perform any actual data fetching, calculations, or network requests, despite the claims in `SKILL.md`. There is no evidence of malicious intent, data exfiltration, or prompt injection.
能力评估
Purpose & Capability
The SKILL.md promises real backtesting (data loading from Yahoo/Tiger, computations with pandas/numpy, plotting, optimization). The shipped backtest.py (649 bytes) contains only an argparse parser and prints a fixed, hard-coded report — it does not import pandas/numpy/matplotlib, does not fetch data, and does no real computation. This is a clear mismatch between claimed purpose and actual capability.
Instruction Scope
Runtime instructions tell the user to run python3 backtest.py with strategy/ticker/year arguments and claim dependencies will be auto-installed. The instructions reference multiple data sources (Yahoo Finance, Tiger API) and CSV upload, but provide no guidance or code to obtain/validate data, no API key handling, and the included script does none of that. The SKILL.md is vague about how dependencies are installed, granting the agent or user broad discretion.
Install Mechanism
There is no install spec (instruction-only), which is low-risk from an installation perspective. However, the documentation claims 'pandas, numpy, matplotlib (auto-installed)' but no mechanism is provided to perform those installs. That inconsistency is informational but not an installation-borne code-execution risk.
Credentials
The skill requests no environment variables or credentials, which is appropriate. It references a 'Tiger API for professional data' but does not declare an API key requirement or use such credentials in code — this is inconsistent and could mislead users about what credentials would be needed if implemented.
Persistence & Privilege
always:false and no requested persistent system changes. The skill does not request elevated privileges or persistent presence; it is user-invocable only.
如何使用
  1. 确保已安装 OpenClaw(本地或 Docker 部署)
  2. 在对话框中输入安装命令:/install betabacktestr
  3. 安装完成后,直接呼叫该 Skill 的名称或使用 /betabacktestr 触发
  4. 根据 Skill 的参数说明提供必要输入,即可获得结构化输出
版本历史
v1.0.0
Expanded with full metrics and strategies
元数据
Slug betabacktestr
版本 1.0.0
许可证 MIT-0
累计安装 0
当前安装数 0
历史版本数 1
常见问题

Beta Backtester 是什么?

Professional backtesting framework for trading strategies. Tests SMA crossover, RSI, MACD, Bollinger Bands, and custom strategies on historical data. Generat... 它是一个面向 Claude Code / OpenClaw 的 AI Agent Skill 插件,目前累计下载 107 次。

如何安装 Beta Backtester?

在 OpenClaw 或 Claude Code 对话框中运行命令「/install betabacktestr」即可一键安装,无需额外配置。

Beta Backtester 是免费的吗?

是的,Beta Backtester 完全免费,采用 MIT-0 许可证,可自由下载、安装和使用。

Beta Backtester 支持哪些平台?

Beta Backtester 跨平台运行,可在任意部署了 OpenClaw / Claude Code 的环境中使用(cross-platform)。

谁开发了 Beta Backtester?

由 1477009639zw-blip(@1477009639zw-blip)开发并维护,当前版本 v1.0.0。

💬 留言讨论