# Send Stock Strategy Backtester Clean to your agent
Hand the extracted package to your coding agent with a concrete install brief instead of figuring it out manually.
## Fast path
- Download the package from Yavira.
- Extract it into a folder your agent can access.
- Paste one of the prompts below and point your agent at the extracted folder.
## Suggested prompts
### New install

```text
I downloaded a skill package from Yavira. Read SKILL.md from the extracted folder and install it by following the included instructions. Tell me what you changed and call out any manual steps you could not complete.
```
### Upgrade existing

```text
I downloaded an updated skill package from Yavira. Read SKILL.md from the extracted folder, compare it with my current installation, and upgrade it while preserving any custom configuration unless the package docs explicitly say otherwise. Summarize what changed and any follow-up checks I should run.
```
## Machine-readable fields
```json
{
  "schemaVersion": "1.0",
  "item": {
    "slug": "stock-strategy-backtester-clean",
    "name": "Stock Strategy Backtester Clean",
    "source": "tencent",
    "type": "skill",
    "category": "数据分析",
    "sourceUrl": "https://clawhub.ai/taylen/stock-strategy-backtester-clean",
    "canonicalUrl": "https://clawhub.ai/taylen/stock-strategy-backtester-clean",
    "targetPlatform": "OpenClaw"
  },
  "install": {
    "downloadUrl": "/downloads/stock-strategy-backtester-clean",
    "sourceDownloadUrl": "https://wry-manatee-359.convex.site/api/v1/download?slug=stock-strategy-backtester-clean",
    "sourcePlatform": "tencent",
    "targetPlatform": "OpenClaw",
    "packageFormat": "ZIP package",
    "primaryDoc": "SKILL.md",
    "includedAssets": [
      "SKILL.md",
      "agents/openai.yaml",
      "references/backtest-metrics.md",
      "scripts/backtest_strategy.py"
    ],
    "downloadMode": "redirect",
    "sourceHealth": {
      "source": "tencent",
      "slug": "stock-strategy-backtester-clean",
      "status": "healthy",
      "reason": "direct_download_ok",
      "recommendedAction": "download",
      "checkedAt": "2026-04-30T06:26:20.776Z",
      "expiresAt": "2026-05-07T06:26:20.776Z",
      "httpStatus": 200,
      "finalUrl": "https://wry-manatee-359.convex.site/api/v1/download?slug=stock-strategy-backtester-clean",
      "contentType": "application/zip",
      "probeMethod": "head",
      "details": {
        "probeUrl": "https://wry-manatee-359.convex.site/api/v1/download?slug=stock-strategy-backtester-clean",
        "contentDisposition": "attachment; filename=\"stock-strategy-backtester-clean-1.0.1.zip\"",
        "redirectLocation": null,
        "bodySnippet": null,
        "slug": "stock-strategy-backtester-clean"
      },
      "scope": "item",
      "summary": "Item download looks usable.",
      "detail": "Yavira can redirect you to the upstream package for this item.",
      "primaryActionLabel": "Download for OpenClaw",
      "primaryActionHref": "/downloads/stock-strategy-backtester-clean"
    },
    "validation": {
      "installChecklist": [
        "Use the Yavira download entry.",
        "Review SKILL.md after the package is downloaded.",
        "Confirm the extracted package contains the expected setup assets."
      ],
      "postInstallChecks": [
        "Confirm the extracted package includes the expected docs or setup files.",
        "Validate the skill or prompts are available in your target agent workspace.",
        "Capture any manual follow-up steps the agent could not complete."
      ]
    }
  },
  "links": {
    "detailUrl": "https://openagent3.xyz/skills/stock-strategy-backtester-clean",
    "downloadUrl": "https://openagent3.xyz/downloads/stock-strategy-backtester-clean",
    "agentUrl": "https://openagent3.xyz/skills/stock-strategy-backtester-clean/agent",
    "manifestUrl": "https://openagent3.xyz/skills/stock-strategy-backtester-clean/agent.json",
    "briefUrl": "https://openagent3.xyz/skills/stock-strategy-backtester-clean/agent.md"
  }
}
```
## Documentation

### Version Notice

Use this clean slug if your environment pins to stock-strategy-backtester-clean.

### Overview

Run repeatable, long-only stock strategy backtests from daily OHLCV CSV files.
Use bundled scripts to generate consistent metrics and trade-level output, then summarize with investor-friendly conclusions.

### Quick Start

Prepare a CSV with at least Date and Close columns.
Run a baseline backtest:

python scripts/backtest_strategy.py \\
  --csv /path/to/prices.csv \\
  --strategy sma-crossover \\
  --fast-window 20 \\
  --slow-window 60

Export artifacts for review:

python scripts/backtest_strategy.py \\
  --csv /path/to/prices.csv \\
  --strategy rsi-reversion \\
  --rsi-period 14 \\
  --rsi-entry 30 \\
  --rsi-exit 55 \\
  --commission-bps 5 \\
  --slippage-bps 2

### Workflow

Validate data

Ensure Date is parseable and sorted ascending.
Ensure Open/High/Low/Close are numeric; missing Open/High/Low falls back to Close.

Pick strategy logic

sma-crossover: trend-following with fast/slow moving averages.
rsi-reversion: buy oversold and exit on momentum recovery.
breakout: enter on highs breakout and exit on lows breakdown.

Set realistic assumptions

Always set --commission-bps and --slippage-bps.
Avoid reporting cost-free backtests as production-ready.

Compare variants

Change one parameter block at a time.
Compare on the same date range and same cost model.

Produce final summary

Report: total_return_pct, cagr_pct, win_rate_pct, max_drawdown_pct, sharpe_ratio, profit_factor, and trade count.
Use trade CSV to explain where alpha is coming from.

### Supported Commands

Baseline SMA strategy:

python scripts/backtest_strategy.py \\
  --csv /path/to/prices.csv \\
  --strategy sma-crossover \\
  --fast-window 10 \\
  --slow-window 50

Breakout strategy:

python scripts/backtest_strategy.py \\
  --csv /path/to/prices.csv \\
  --strategy breakout \\
  --lookback 20

JSON-only output (for automation pipelines):

python scripts/backtest_strategy.py \\
  --csv /path/to/prices.csv \\
  --strategy rsi-reversion \\
  --quiet

### Output Contract

Script prints a JSON object to stdout with:
strategy
period
metrics
config
trades

### Analysis Guardrails

Use out-of-sample logic

Prefer walk-forward validation over one-shot tuning.

Avoid leakage

Compute signals from bar t, execute at bar t+1 open.

Report downside with upside

Never present return without drawdown and trade count.

Treat results as research

Backtests are not guarantees and should not be framed as financial advice.

### References

Metrics details: references/backtest-metrics.md
## Trust
- Source: tencent
- Verification: Indexed source record
- Publisher: taylen
- Version: 1.0.1
## Source health
- Status: healthy
- Item download looks usable.
- Yavira can redirect you to the upstream package for this item.
- Health scope: item
- Reason: direct_download_ok
- Checked at: 2026-04-30T06:26:20.776Z
- Expires at: 2026-05-07T06:26:20.776Z
- Recommended action: Download for OpenClaw
## Links
- [Detail page](https://openagent3.xyz/skills/stock-strategy-backtester-clean)
- [Send to Agent page](https://openagent3.xyz/skills/stock-strategy-backtester-clean/agent)
- [JSON manifest](https://openagent3.xyz/skills/stock-strategy-backtester-clean/agent.json)
- [Markdown brief](https://openagent3.xyz/skills/stock-strategy-backtester-clean/agent.md)
- [Download page](https://openagent3.xyz/downloads/stock-strategy-backtester-clean)