alpaca-trading-backtest
Execute deterministic, reproducible historical backtests from a start date, end date, and strategy concept using the Alpaca CLI plus agent-written workspace code. Use when the user wants to backtest a strategy, simulate historical trades, or return trades, diagnostics, and reproducibility artifacts.
npx skills add alpacahq/alpaca-skills --skill backtest --agent claude-code
Same command for any agent — swap --agent for codex, cursor, copilot.
Weekly change comes from our own snapshots, not the repository page — it measures attention, not adoption.
# Trading API Backtesting Use this skill when you want your AI agent to run a specific historical backtest with the Alpaca CLI and local workspace code. This version is optimized for run-specific execution: your agent writes the minimum readable code needed for the confirmed strategy, stores the exact artifacts, and reports the results back to you. This skill is written for you, the person invoking it through your AI agent. **You** means the trader, developer, researcher, or operator asking your agent to run the backtest. Your agent should address you directly, restate assumptions clearly, and make every interpretation choice visible. ```text strategy idea -> formalized rules -> confirmed assumptions -> CLI data fetch -> local script -> artifacts -> report ``` It is not a promise that a strategy will work in live markets. It is a reproducible research workflow. ## Required disclosures Every report, `notes.md`, `report.md`, notebook, dashboard, or exported result should include: > **Important disclosure** > This backtest is a hypothetical historical simulation and does not represent actual trading performance. Backtested results do not guarantee future results. Results depend on mar
- Required disclosures
- CLI prerequisites
- Alpaca CLI
- Local execution permissions
- Connectivity and authentication check
- Machine-readable output
- Required workflow
- Workspace awareness
- Data reuse
- Run lineage
- Existing code
- Run folder and artifact contract
- notes.md
- Other artifacts
alpaca version go install github.com/alpacahq/cli/cmd/alpaca@latest brew install alpacahq/tap/cli alpaca doctor alpaca profile login --help alpaca profile login alpaca profile login --api-key export ALPACA_API_KEY=PK... export ALPACA_SECRET_KEY=... export ALPACA_QUIET=1
What does the alpaca-trading-backtest skill do?
Execute deterministic, reproducible historical backtests from a start date, end date, and strategy concept using the Alpaca CLI plus agent-written workspace code. Use when the user wants to backtest a strategy, simulate historical trades, or return trades, diagnostics, and reproducibility artifacts.
How do I install it?
Run `npx skills add alpacahq/alpaca-skills --skill backtest --agent claude-code` — it drops the skill into your project so the agent can pick it up. Swap the --agent value for codex, cursor or copilot if you use one of those.
Where does this skill come from?
From alpacahq/alpaca-skills, a repository with 106 stars. We read it straight from the repository tree rather than a submitted listing, so what you see here is what is actually published.
Is a popular skill a good skill?
Not necessarily. Stars measure attention, not adoption — a repository can trend for a week and be abandoned. That is why we show the weekly change from our own snapshots next to the total, instead of a single flattering number.
