Trading Agent — Development skill for Claude Code
Python trading agent that uses Claude to propose day and swing trades, executed in Alpaca paper trading.
How to install Trading Agent
This entry records only its repository, not the path inside it, so there is no
exact command to give. Open jmobrien2018/trading-agent and copy the folder into
~/.claude/skills/, or the file into ~/.claude/agents/.
What Trading Agent does
Python trading agent that uses Claude to propose day and swing trades, executed in Alpaca paper trading. Built with real-money safeguards: a code-enforced risk engine, kill switch, keychain-stored API keys, and full audit logging. Includes backtesting, strategy research, and a go-live gate. Explorational only. Day trading is a terrible idea.
Alternatives in Development
- Validate Plan — You are tasked with validating that an implementation plan was correctly executed, verifying all success crite 10k ★
- Candidates — Fetch and analyse top pool candidates with OKX smart money signals 722 ★
- Crypto Market Rank — Query crypto market rankings including trending tokens, smart money inflows, meme rankings, and top trader PnL 483 ★
README
Trading Agent
A Claude-powered agent that paper trades US stocks to test day- and swing-trading strategies. It is built to real-money standards, but runs on paper only until the go-live gate is passed.
The project plan, decisions log and go-live gate live in the "Trading Agent — Project Plan" doc.
Status
- Phase 0 (foundations): done. Settings, secrets handling, local storage, logging and a CLI.
- Phase 1 (broker and data): built. Read-only Alpaca client, bar storage, data-quality report.
- Phase 2 (data pipeline): built. Backfill, incremental refresh, live quotes, quality warnings, and a script to run the refresh on a schedule.
No orders can be placed; that waits for the risk engine (Phase 4).
Setup (Windows, PowerShell)
python -m venv .venv
.\.venv\Scripts\Activate.ps1
python -m pip install -r requirements.lock # exact pinned versions
python -m pip install -e ".[dev]"
pytest
trading-agent check
Secrets
API keys never go in code, Git, config files or chat. They live in the OS keychain (Windows Credential Manager), under the service name `trading-agent`:
trading-agent secrets set ALPACA_PAPER_API_KEY # prompts with hidden input
trading-agent secrets set ALPACA_PAPER_SECRET_KEY
trading-agent secrets status # shows set / MISSING, never values
Environment variables override the keychain. A git-ignored `.env` file (copy `.env.example`) also works as a fallback, but the keychain is preferred.
Broker keys should be paper-only, with 2FA on the Alpaca account.
Keeping data up to date (Phase 2)
trading-agent data refresh # backfill new symbols, fetch new bars, save quotes, check quality
trading-agent data status # what is stored per symbol and how fresh (no API calls)
trading-agent data latest # latest quote and trade per symbol
`data refresh` is safe to run any time:
- The first time it sees a symbol it backfills
[history]: 90 days of 1-minute
Related Skills
Okx Smart Money Tracker
Smart Money Tracker — Track profitable on-chain wallets and execute follow trades via Agentic Wallet. Built fo
Claude Broker API Skills
Free Claude Code skills for trading bots on Interactive Brokers (TWS and Web API), Alpaca and Schwab, current
Rotate Hex Token
Help the user rotate an API token stored in macOS Keychain.
Xg Trading System Public
Claude Skill for Taiwan index futures swing trading: SMC, Fibonacci, ATR trailing stop, multi-timeframe analys
Polymarket Trading
Evaluate and trade prediction markets on Polymarket. Use when analyzing prediction market opportunities, calcu
Paper Status
PAPER TRADING status - show the simulated account without creating decisions or trades (read-only)
Related Agents
Trading Orchestrator
Head of the HIGH-RISK trading team (aggressive swing trades held 1-30 days, long or short, stocks or options).
Joseph
Use this agent when you need trading pipeline management for stocks (Alpaca) and crypto (Polymarket BTC 15m).
App Release Engineer
Get mobile builds to users predictably, with staged rollout and a kill switch that works. Invoke for mobile-te