{
  "schemaVersion": "1.0",
  "item": {
    "slug": "stock-strategy-backtester",
    "name": "Stock Strategy Backtester",
    "source": "tencent",
    "type": "skill",
    "category": "数据分析",
    "sourceUrl": "https://clawhub.ai/taylen/stock-strategy-backtester",
    "canonicalUrl": "https://clawhub.ai/taylen/stock-strategy-backtester",
    "targetPlatform": "OpenClaw"
  },
  "install": {
    "downloadMode": "redirect",
    "downloadUrl": "/downloads/stock-strategy-backtester",
    "sourceDownloadUrl": "https://wry-manatee-359.convex.site/api/v1/download?slug=stock-strategy-backtester",
    "sourcePlatform": "tencent",
    "targetPlatform": "OpenClaw",
    "installMethod": "Manual import",
    "extraction": "Extract archive",
    "prerequisites": [
      "OpenClaw"
    ],
    "packageFormat": "ZIP package",
    "includedAssets": [
      "SKILL.md",
      "agents/openai.yaml",
      "references/backtest-metrics.md",
      "scripts/backtest_strategy.py"
    ],
    "primaryDoc": "SKILL.md",
    "quickSetup": [
      "Download the package from Yavira.",
      "Extract the archive and review SKILL.md first.",
      "Import or place the package into your OpenClaw setup."
    ],
    "agentAssist": {
      "summary": "Hand the extracted package to your coding agent with a concrete install brief instead of figuring it out manually.",
      "steps": [
        "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."
      ],
      "prompts": [
        {
          "label": "New install",
          "body": "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."
        },
        {
          "label": "Upgrade existing",
          "body": "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."
        }
      ]
    },
    "sourceHealth": {
      "source": "tencent",
      "status": "healthy",
      "reason": "direct_download_ok",
      "recommendedAction": "download",
      "checkedAt": "2026-04-23T16:43:11.935Z",
      "expiresAt": "2026-04-30T16:43:11.935Z",
      "httpStatus": 200,
      "finalUrl": "https://wry-manatee-359.convex.site/api/v1/download?slug=4claw-imageboard",
      "contentType": "application/zip",
      "probeMethod": "head",
      "details": {
        "probeUrl": "https://wry-manatee-359.convex.site/api/v1/download?slug=4claw-imageboard",
        "contentDisposition": "attachment; filename=\"4claw-imageboard-1.0.1.zip\"",
        "redirectLocation": null,
        "bodySnippet": null
      },
      "scope": "source",
      "summary": "Source download looks usable.",
      "detail": "Yavira can redirect you to the upstream package for this source.",
      "primaryActionLabel": "Download for OpenClaw",
      "primaryActionHref": "/downloads/stock-strategy-backtester"
    },
    "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."
      ]
    },
    "downloadPageUrl": "https://openagent3.xyz/downloads/stock-strategy-backtester",
    "agentPageUrl": "https://openagent3.xyz/skills/stock-strategy-backtester/agent",
    "manifestUrl": "https://openagent3.xyz/skills/stock-strategy-backtester/agent.json",
    "briefUrl": "https://openagent3.xyz/skills/stock-strategy-backtester/agent.md"
  },
  "agentAssist": {
    "summary": "Hand the extracted package to your coding agent with a concrete install brief instead of figuring it out manually.",
    "steps": [
      "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."
    ],
    "prompts": [
      {
        "label": "New install",
        "body": "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."
      },
      {
        "label": "Upgrade existing",
        "body": "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."
      }
    ]
  },
  "documentation": {
    "source": "clawhub",
    "primaryDoc": "SKILL.md",
    "sections": [
      {
        "title": "Version Notice",
        "body": "1.0.0 and 1.0.1 are deprecated.\nUse 1.0.2 or newer only.\nDeprecation reason: early versions bundled non-core marketplace automation files and may trigger security scanner warnings in some environments."
      },
      {
        "title": "Overview",
        "body": "Run repeatable, long-only stock strategy backtests from daily OHLCV CSV files.\nUse bundled scripts to generate consistent metrics and trade-level output, then summarize with investor-friendly conclusions."
      },
      {
        "title": "Quick Start",
        "body": "Prepare a CSV with at least Date and Close columns.\nRun a baseline backtest:\n\npython scripts/backtest_strategy.py \\\n  --csv /path/to/prices.csv \\\n  --strategy sma-crossover \\\n  --fast-window 20 \\\n  --slow-window 60\n\nExport artifacts for review:\n\npython scripts/backtest_strategy.py \\\n  --csv /path/to/prices.csv \\\n  --strategy rsi-reversion \\\n  --rsi-period 14 \\\n  --rsi-entry 30 \\\n  --rsi-exit 55 \\\n  --commission-bps 5 \\\n  --slippage-bps 2"
      },
      {
        "title": "Workflow",
        "body": "Validate data\n\nEnsure Date is parseable and sorted ascending.\nEnsure Open/High/Low/Close are numeric; missing Open/High/Low falls back to Close.\n\nPick strategy logic\n\nsma-crossover: trend-following with fast/slow moving averages.\nrsi-reversion: buy oversold and exit on momentum recovery.\nbreakout: enter on highs breakout and exit on lows breakdown.\n\nSet realistic assumptions\n\nAlways set --commission-bps and --slippage-bps.\nAvoid reporting cost-free backtests as production-ready.\n\nCompare variants\n\nChange one parameter block at a time.\nCompare on the same date range and same cost model.\n\nProduce final summary\n\nReport: total_return_pct, cagr_pct, win_rate_pct, max_drawdown_pct, sharpe_ratio, profit_factor, and trade count.\nUse trade CSV to explain where alpha is coming from."
      },
      {
        "title": "Supported Commands",
        "body": "Baseline SMA strategy:\n\npython scripts/backtest_strategy.py \\\n  --csv /path/to/prices.csv \\\n  --strategy sma-crossover \\\n  --fast-window 10 \\\n  --slow-window 50\n\nBreakout strategy:\n\npython scripts/backtest_strategy.py \\\n  --csv /path/to/prices.csv \\\n  --strategy breakout \\\n  --lookback 20\n\nJSON-only output (for automation pipelines):\n\npython scripts/backtest_strategy.py \\\n  --csv /path/to/prices.csv \\\n  --strategy rsi-reversion \\\n  --quiet"
      },
      {
        "title": "Output Contract",
        "body": "Script prints a JSON object to stdout with:\nstrategy\nperiod\nmetrics\nconfig\ntrades"
      },
      {
        "title": "Analysis Guardrails",
        "body": "Use out-of-sample logic\n\nPrefer walk-forward validation over one-shot tuning.\n\nAvoid leakage\n\nCompute signals from bar t, execute at bar t+1 open.\n\nReport downside with upside\n\nNever present return without drawdown and trade count.\n\nTreat results as research\n\nBacktests are not guarantees and should not be framed as financial advice."
      },
      {
        "title": "References",
        "body": "Metrics details: references/backtest-metrics.md"
      }
    ],
    "body": "Stock Strategy Backtester\nVersion Notice\n1.0.0 and 1.0.1 are deprecated.\nUse 1.0.2 or newer only.\nDeprecation reason: early versions bundled non-core marketplace automation files and may trigger security scanner warnings in some environments.\nOverview\n\nRun 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.\n\nQuick Start\nPrepare a CSV with at least Date and Close columns.\nRun a baseline backtest:\npython scripts/backtest_strategy.py \\\n  --csv /path/to/prices.csv \\\n  --strategy sma-crossover \\\n  --fast-window 20 \\\n  --slow-window 60\n\nExport artifacts for review:\npython scripts/backtest_strategy.py \\\n  --csv /path/to/prices.csv \\\n  --strategy rsi-reversion \\\n  --rsi-period 14 \\\n  --rsi-entry 30 \\\n  --rsi-exit 55 \\\n  --commission-bps 5 \\\n  --slippage-bps 2\n\nWorkflow\nValidate data\nEnsure Date is parseable and sorted ascending.\nEnsure Open/High/Low/Close are numeric; missing Open/High/Low falls back to Close.\nPick strategy logic\nsma-crossover: trend-following with fast/slow moving averages.\nrsi-reversion: buy oversold and exit on momentum recovery.\nbreakout: enter on highs breakout and exit on lows breakdown.\nSet realistic assumptions\nAlways set --commission-bps and --slippage-bps.\nAvoid reporting cost-free backtests as production-ready.\nCompare variants\nChange one parameter block at a time.\nCompare on the same date range and same cost model.\nProduce final summary\nReport: total_return_pct, cagr_pct, win_rate_pct, max_drawdown_pct, sharpe_ratio, profit_factor, and trade count.\nUse trade CSV to explain where alpha is coming from.\nSupported Commands\nBaseline SMA strategy:\npython scripts/backtest_strategy.py \\\n  --csv /path/to/prices.csv \\\n  --strategy sma-crossover \\\n  --fast-window 10 \\\n  --slow-window 50\n\nBreakout strategy:\npython scripts/backtest_strategy.py \\\n  --csv /path/to/prices.csv \\\n  --strategy breakout \\\n  --lookback 20\n\nJSON-only output (for automation pipelines):\npython scripts/backtest_strategy.py \\\n  --csv /path/to/prices.csv \\\n  --strategy rsi-reversion \\\n  --quiet\n\nOutput Contract\nScript prints a JSON object to stdout with:\nstrategy\nperiod\nmetrics\nconfig\ntrades\nAnalysis Guardrails\nUse out-of-sample logic\nPrefer walk-forward validation over one-shot tuning.\nAvoid leakage\nCompute signals from bar t, execute at bar t+1 open.\nReport downside with upside\nNever present return without drawdown and trade count.\nTreat results as research\nBacktests are not guarantees and should not be framed as financial advice.\nReferences\nMetrics details: references/backtest-metrics.md"
  },
  "trust": {
    "sourceLabel": "tencent",
    "provenanceUrl": "https://clawhub.ai/taylen/stock-strategy-backtester",
    "publisherUrl": "https://clawhub.ai/taylen/stock-strategy-backtester",
    "owner": "taylen",
    "version": "1.0.4",
    "license": null,
    "verificationStatus": "Indexed source record"
  },
  "links": {
    "detailUrl": "https://openagent3.xyz/skills/stock-strategy-backtester",
    "downloadUrl": "https://openagent3.xyz/downloads/stock-strategy-backtester",
    "agentUrl": "https://openagent3.xyz/skills/stock-strategy-backtester/agent",
    "manifestUrl": "https://openagent3.xyz/skills/stock-strategy-backtester/agent.json",
    "briefUrl": "https://openagent3.xyz/skills/stock-strategy-backtester/agent.md"
  }
}