Agent skill · AI & Agents

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.

alpacahqgithub.com/alpacahqGitHub ↗
claude-codecodexcursorApache-2.0
Install
npx skills add alpacahq/alpaca-skills --skill backtest --agent claude-code

Same command for any agent — swap --agent for codex, cursor, copilot.

Facts
Files in the skill folder: 2
SKILL.md size: 15 KB
Bundled scripts: none
Path: skills/trading-api/backtest/SKILL.md
Open the folder on GitHub →
Where it comes from
Stars: 106
Language: Python

Weekly change comes from our own snapshots, not the repository page — it measures attention, not adoption.

From the SKILL.md

# 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

What's inside
Steps it walks through
  1. Required disclosures
  2. CLI prerequisites
  3. Alpaca CLI
  4. Local execution permissions
  5. Connectivity and authentication check
  6. Machine-readable output
  7. Required workflow
  8. Workspace awareness
  9. Data reuse
  10. Run lineage
  11. Existing code
  12. Run folder and artifact contract
  13. notes.md
  14. Other artifacts
Ships with 1 file
  • reference.md
Commands it runs
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
More from alpaca-skills
All skills →
About this skill
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.

Keep going