Skill flagged — suspicious patterns detected

ClawHub Security flagged this skill as suspicious. Review the scan results before using.

Stock Strategy Backtester

Backtest stock trading strategies on historical OHLCV data and report win rate, return, CAGR, drawdown, Sharpe ratio, and trade logs. Use when evaluating or...

MIT-0 · Free to use, modify, and redistribute. No attribution required.
2 · 2.1k · 29 current installs · 30 all-time installs
MIT-0
Security Scan
VirusTotalVirusTotal
Suspicious
View report →
OpenClawOpenClaw
Benign
medium confidence
Purpose & Capability
Name/description match the artifacts: a Python backtest script plus documentation for running it on OHLCV CSVs. No unrelated env variables, binaries, or external services are requested.
Instruction Scope
SKILL.md instructs the agent/user to run the bundled Python script against local CSV files and to interpret outputs; the instructions reference only CSV paths and backtest parameters. There are no instructions to read unrelated system files, environment variables, or to transmit data externally.
Install Mechanism
No install spec is provided (instruction-only with bundled script), so nothing is automatically downloaded or written by an installer. The runtime requires a local Python interpreter, which is consistent with the skill's purpose.
Credentials
The skill declares no required environment variables or credentials. The script reads only the CSV path supplied by the user and produces JSON output — no external credentials or unrelated environment access is requested.
Persistence & Privilege
Flags show always:false and no special privileges. The skill does not request persistent system presence or modification of other skills or global agent settings.
Assessment
This skill is coherent with its purpose and runs a local Python script on CSV price data, but the source is unknown — review the full scripts/backtest_strategy.py before running. Notable points: the pasted script is truncated and contains a likely typo ('proceeds = gros') that will cause a runtime error; verify the file is complete and test on non-sensitive sample data inside a sandbox or virtualenv. Confirm there are no hidden network calls or credential access in the remainder of the file, and validate outputs against small known examples (and include realistic commission/slippage assumptions). If you lack confidence in the code, run it in an isolated environment or ask the author for source provenance and an integrity checksum.

Like a lobster shell, security has layers — review code before you run it.

Current versionv1.0.4
Download zip
backtestvk970sa1t8yfpxn5gt20xqcw9p5820dx6latestvk970sa1t8yfpxn5gt20xqcw9p5820dx6quantvk970sa1t8yfpxn5gt20xqcw9p5820dx6stocksvk970sa1t8yfpxn5gt20xqcw9p5820dx6

License

MIT-0
Free to use, modify, and redistribute. No attribution required.

SKILL.md

Stock Strategy Backtester

Version Notice

  • 1.0.0 and 1.0.1 are deprecated.
  • Use 1.0.2 or newer only.
  • Deprecation reason: early versions bundled non-core marketplace automation files and may trigger security scanner warnings in some environments.

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

  1. Prepare a CSV with at least Date and Close columns.
  2. Run a baseline backtest:
python scripts/backtest_strategy.py \
  --csv /path/to/prices.csv \
  --strategy sma-crossover \
  --fast-window 20 \
  --slow-window 60
  1. 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

  1. Validate data
  • Ensure Date is parseable and sorted ascending.
  • Ensure Open/High/Low/Close are numeric; missing Open/High/Low falls back to Close.
  1. 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.
  1. Set realistic assumptions
  • Always set --commission-bps and --slippage-bps.
  • Avoid reporting cost-free backtests as production-ready.
  1. Compare variants
  • Change one parameter block at a time.
  • Compare on the same date range and same cost model.
  1. 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

  1. Use out-of-sample logic
  • Prefer walk-forward validation over one-shot tuning.
  1. Avoid leakage
  • Compute signals from bar t, execute at bar t+1 open.
  1. Report downside with upside
  • Never present return without drawdown and trade count.
  1. Treat results as research
  • Backtests are not guarantees and should not be framed as financial advice.

References

  • Metrics details: references/backtest-metrics.md

Files

4 total
Select a file
Select a file to preview.

Comments

Loading comments…