Claude Code is now my stock broker

How I manage my investments through conversation using AI agents and custom skills.

I manage my investments in my terminal, with Claude Code.

Not through some fancy fintech app. Not through a chatbot on a brokerage website. I open my terminal, type what I want, and it happens.

  • “What was my profit on TSLA?”
  • “Evaluate this breakout setup on NVDA.”
  • “Buy 50 shares of VOO at $520.”

This isn’t a concept or a demo. It’s how I actually operate. And it’s changed how I think about what AI assistants can do.

What This Is (And Isn’t)

Let me be clear upfront: this is not financial advice. I’m not suggesting you should do this. I’m not running an algorithmic trading bot or letting AI make decisions for me.

What I’ve built is a conversational interface to my brokerage account and market data. I’m still making every decision—the AI just removes friction between intention and execution.

For context: my portfolio has averaged 56% annual returns over the past five years. That’s not something to hang my hat on, but it’s a multiple of the S&P 500. The system I’ve built supports a specific trading style that’s worked for me: swing trading pattern breakouts from extended consolidation.

  • Long only
  • No options, no leverage
  • Swing trading pattern breakouts from extended consolidation

The AI doesn’t make me a better trader. But it makes being a trader easier.

The Setup

Claude Code has a skill system that lets you extend what it can do. Skills are like plugins—they give Claude new capabilities beyond just answering questions.

I built a Trader skill with multiple integrations. Under the hood, the Schwab integration uses the excellent schwab-py library, which handles authentication and API communication with Schwab’s trading platform.

Here’s what the folder structure looks like:

~/.claude/skills/Trader/
├── SKILL.md              # Master routing + methodology
├── PLAYBOOK.md           # Pattern definitions
├── Schwab/               # Brokerage integration
│   ├── SKILL.md          # API documentation
│   ├── schwab_client.py  # Python wrapper
│   └── auth.py           # OAuth flow
├── Massive/              # Market data API (formerly Polygon)
│   ├── SKILL.md
│   ├── massive_client.py # REST API wrapper
│   └── flat_files.py     # Bulk data downloader
├── Data/
│   ├── WATCHLIST.md      # Tickers I'm monitoring
│   ├── POSITIONS.md      # Open positions
│   └── JOURNAL.md        # Trade log with lessons
└── Research/
    └── [TICKER].md       # Per-ticker research notes

Authentication and Security

The authentication is handled securely through OAuth—I’m not passing credentials to the AI. The skill has access to make authenticated requests on my behalf, same as any other trading app would.

How It Works: A Dedicated Trading Agent

I created a dedicated sub-agent specifically for trading.

This agent—I call it “The Trader”—has a defined philosophy baked in. It knows my trading style (swing trading, long only), my preferred indicators (Ichimoku, pivot points, moving averages, Williams fractals), and my setup scoring system. It has access to my WATCHLIST.md, POSITIONS.md, and JOURNAL.md.

Think of it like having a trading assistant on staff who knows exactly how you like to work. When I need to evaluate a setup or check my P&L on a position, I hand off to this agent. It handles the task using my methodology and reports back.

What I Actually Use It For

Here’s what real interactions look like:

Reviewing closed positions

> What was my profit on TSLA?

TSLA Trading History
────────────────────────────────────────────────────
Realized P&L: +$4,847.32

Transactions:
├─ 2024-03-15  BUY   100 @ $171.32    ($17,132.00)
├─ 2024-04-22  SELL   50 @ $184.91     $9,245.50
├─ 2024-06-03  SELL   50 @ $219.67    $10,983.50
└─ 2024-08-14  BUY    25 @ $214.42    ($5,360.50)

Current Position: 25 shares @ $214.42
Unrealized P&L: +$892.75 (+16.6%)
────────────────────────────────────────────────────

Evaluating a setup

> Evaluate the CRWD setup

## CRWD Setup Analysis

**Pattern**: Cup & Handle
**Timeframe**: Daily
**Consolidation**: 11 weeks

### Indicators
├─ Ichimoku: Price above cloud, bullish Kumo twist forming
├─ MAs: Bullish stack (Price > 20 > 50 > 200)
├─ Pivots: Testing monthly R1 at $398
└─ Fractals: Higher lows confirmed, fractal high at $401.50

### Levels
├─ Entry: $402.00 (breakout above handle)
├─ Stop: $378.50 (below 50 SMA, -5.8%)
├─ Target 1: $445.00 (measured move, +10.7%)
├─ Target 2: $480.00 (extension, +19.4%)
└─ R:R: 1.8:1 (T1), 3.3:1 (T2)

### Score: 7.5/10
├─ Pattern Clarity: 8/10 (clean cup, handle forming)
├─ Consolidation: 7/10 (11 weeks, solid)
├─ Indicator Alignment: 8/10 (all confirming)
├─ Risk/Reward: 7/10 (acceptable, not exceptional)
└─ Volume: 7/10 (declining in handle)

### Recommendation
WATCHLIST - Wait for handle completion and volume
confirmation on breakout. Entry above $402 with stop
at $378.50. Standard position size.

Checking the portfolio

> How are my positions doing?

Portfolio Summary (Brokerage)
────────────────────────────────────────────────────
Total Value: $127,845.32    Day: +$1,247.89 (+0.98%)

Positions:
Symbol   Shares   Avg Cost    Current    P&L
NVDA     40       $118.45     $142.80    +$974.00 (+20.5%)
PLTR     200      $24.32      $78.45     +$10,826.00 (+222.6%)
CRWD     15       $352.10     $395.20    +$646.50 (+12.2%)
VOO      25       $498.00     $534.21    +$905.25 (+7.3%)

Cash Available: $12,432.17
────────────────────────────────────────────────────

Placing an order

> Set a limit buy for 20 GOOGL at $185

Order Preview:
├─ Action: BUY
├─ Symbol: GOOGL (Alphabet Inc.)
├─ Quantity: 20 shares
├─ Type: LIMIT
├─ Price: $185.00
├─ Duration: GTC (Good 'Til Canceled)
└─ Estimated Total: $3,700.00

Current GOOGL: $191.45 (limit is 3.4% below)

Confirm this order? (yes/no)

The beauty is context. I can ask follow-up questions (“What if I set the stop tighter?”), combine requests (“Show me AAPL and MSFT setups”), or get clarification—all in natural language.

What’s Next: Expanding the Stack

The Schwab skill handles brokerage operations. The Massive integration (formerly Polygon) already provides historical data and technical indicators. I’m building out more:

TradingView API — For chart screenshots and additional technical analysis tools.

Motion Integration — To automatically block focus time when I’m in an active trade or monitoring a breakout.

They compound. The goal is a complete trading workflow: research, analysis, execution, journaling—all through conversation.

Why This Matters

This setup removes friction from trading in a way that surprised me.

I used to avoid reviewing my positions because it meant context-switching—opening Schwab, navigating around, pulling up charts elsewhere. Now it’s just a question in my terminal, right where I’m already working.

AI that can actually do things is fundamentally different from AI that can only talk about things.

Most AI interactions are informational. You ask a question, you get an answer. Useful, but limited. When AI can take actions—execute trades, check real P&L, score setups against your methodology—it becomes something else entirely.

The Bigger Picture

This is one example of AI moving from “chat” to “agent.”

A chatbot answers questions. An agent does work.

The skill system in Claude Code is what makes this possible. It’s not just about having a smart AI—it’s about giving that AI the ability to connect to the systems and services that matter to you, with a methodology that matches how you actually work.

What else could work this way? The pattern is the same: take something that currently requires navigating an interface, and make it conversational. Take something that requires remembering a process, and encode it in an agent.

Final Thoughts

For me, this has been a genuine quality-of-life improvement. It’s faster, it’s more natural, and it keeps me more engaged with my trading because the friction is gone.

If nothing else, I hope this sparks some ideas about what’s possible when AI can do more than just talk.