strategy-backtest

Quantitative strategy backtesting—implement, run, and tune trading rules on historical data; performance metrics (CAGR, max drawdown, Sharpe, win rate) and simple parameter sweeps. Keywords: backtest, algorithmic trading, Backtrader, moving average, MACD, RSI, walk-forward, risk.

Safety Notice

This listing is from the official public ClawHub registry. Review SKILL.md and referenced scripts before running.

Copy this and send it to your AI assistant to learn

Install skill "strategy-backtest" with this command: npx skills add mikeclaw007/strategy-backtest

Strategy Backtest — Historical Performance & Optimization

Overview

Supports systematic trading strategy workflows: backtest rules on history, optimize parameters (e.g. grid search), and report results. Typical building blocks include moving-average crosses, MACD, RSI, and custom signals—implemented with libraries such as Backtrader or similar.

Trigger keywords: backtest, trading strategy, quant, algorithmic trading, Sharpe, drawdown, optimize parameters, walk-forward

Prerequisites

pip install pandas numpy backtrader matplotlib

Capabilities

  1. Backtest engine — run strategies on historical OHLCV (or vendor-specific) data.
  2. Performance analytics — annualized return, max drawdown, Sharpe-like ratios, win rate (definitions must match your implementation).
  3. Parameter search — grid or bounded search over strategy parameters with out-of-sample caution (see references/strategy_backtest_guide.md).

Commands

CommandDescriptionExample
backtestRun a backtestpython3 scripts/skills/strategy-backtest/scripts/strategy_backtest_tool.py backtest [args]
optimizeParameter optimizationpython3 scripts/skills/strategy-backtest/scripts/strategy_backtest_tool.py optimize [args]
reportEmit a backtest reportpython3 scripts/skills/strategy-backtest/scripts/strategy_backtest_tool.py report [args]

Usage (from repository root)

python3 scripts/skills/strategy-backtest/scripts/strategy_backtest_tool.py backtest --strategy ma_cross --symbol SPY --period 3y
python3 scripts/skills/strategy-backtest/scripts/strategy_backtest_tool.py optimize --strategy ma_cross --fast 5-20 --slow 20-60
python3 scripts/skills/strategy-backtest/scripts/strategy_backtest_tool.py report --format markdown

Use symbols and venues appropriate to your data feed (e.g. SPY, QQQ, or local indices)—the examples above are illustrative.

Output format (for the agent’s report)

# Strategy backtest report

**Generated**: YYYY-MM-DD HH:MM

## Key findings
1. [Finding 1]
2. [Finding 2]
3. [Finding 3]

## Metrics snapshot
| Metric | Value | Notes |
|--------|-------|-------|
| CAGR | X% | … |
| Max drawdown | Y% | … |
| Sharpe (if defined) | Z | window & rf assumption |

## Analysis
[Grounded in actual run outputs—no fabricated fills or equity curves.]

## Risks & limitations
- Past performance ≠ future results; costs, slippage, and survivorship bias matter.

References

Core

Community & critique

Notes

  • Base all numbers on script or notebook output—never invent trades or metrics.
  • Mark missing fields as unavailable instead of guessing.
  • Not investment advice; comply with local regulations for research vs advisory.
  • Prefer stating assumptions (fees, spread, leverage, timezone, corporate actions).

Source Transparency

This detail page is rendered from real SKILL.md content. Trust labels are metadata-based hints, not a safety guarantee.

Related Skills

Related by shared tags or category signals.

General

Shareone

发布本地生成的 HTML 网页、PDF 或 PPTX 到 ShareOne 平台,生成公网分享短链接(Capability URL)。当用户要求“发布”、“分享”、“生成链接”或“上线”某个生成的页面/文档时使用此技能。

Registry SourceRecently Updated
General

魔搭图片生成

魔搭(ModelScope)AI 图片生成。支持多种模型、LoRA 微调。触发词:生成图片、AI绘画、文生图、image generation、generate image。当用户要求生成图片、画图、AI 作画,或提到魔搭、ModelScope时使用。

Registry SourceRecently Updated
General

Google Drive Setup

Configure Google Drive mount on Linux via rclone + gog OAuth. Use when user wants to mount Google Drive as local filesystem, set up auto-mount on boot, or co...

Registry SourceRecently Updated
General

Meeting Notes Generator

智能会议纪要整理专家,保证信息100%不遗漏且字数至少2000字。当用户要求整理会议记录、生成会议纪要、提取会议要点、总结会议内容、将录音转文字文档转换为结构化纪要时使用此技能。特别适用于需要保证信息完整性和详细程度的场景。触发短语包括但不限于:帮我整理会议记录、会议纪要怎么写、生成会议纪要、整理会议要点、会议总...

Registry SourceRecently Updated