# pandas-ta

Equips coding agents with patterns for 130+ technical analysis indicators using pandas-ta on crypto market data.

- skill · `type=skill` · Claude Code, Codex, Cursor, GitHub Copilot, Gemini CLI, OpenCode · 586 installs · ★ 443
- Author: agiprolabs
- License: MIT · policy=mirror · the beginning of the file is at the end of this page
- Source: https://github.com/agiprolabs/claude-trading-skills/tree/HEAD/skills/pandas-ta/SKILL.md
- Updated: 2026-09-03
- HTML: https://affpapa.org/en/nevibecode/skills/pandas-ta

## What it does

The skill instructs the agent how to use the `pandas-ta` library via the `df.ta` namespace. It provides ready code patterns for trend, momentum, volatility, and volume indicators such as RSI, MACD, SuperTrend, and Bollinger Bands. The agent also learns to batch indicator calculations using the `ta.Strategy` class.

Executing the code requires Python with `pandas-ta`, `pandas`, and `httpx`. The input OHLCV DataFrame demands lowercase column names: `open`, `high`, `low`, `close`, and `volume`. If column headers use uppercase like `Close`, calculations fail immediately. Time-dependent indicators like VWAP require a `DatetimeIndex`.

The guidance directly handles continuous 24/7 crypto markets. Because crypto swings hard, the skill suggests widening Bollinger Bands standard deviation to 2.5–3x and increasing the SuperTrend multiplier to 3–4x. On low-cap tokens with thin order books, volume indicators like OBV or CMF are unreliable; the skill flags this risk.

## Install

### Claude Code (native platform)

1. **Skills CLI (Vercel)**
```bash
npx skills add agiprolabs/claude-trading-skills --skill pandas-ta -a claude-code
```

2. **Manually: put the files in place**
- File: `~/.claude/skills/pandas-ta/SKILL.md` — Copy the whole skill folder; for one project use .claude/skills/pandas-ta/

### Codex

1. **Skills CLI (Vercel)**
```bash
npx skills add agiprolabs/claude-trading-skills --skill pandas-ta -a codex
```

2. **Manually: put the files in place**
- File: `.agents/skills/pandas-ta/SKILL.md` — For all projects use ~/.agents/skills/

### Cursor

1. **Skills CLI (Vercel)**
```bash
npx skills add agiprolabs/claude-trading-skills --skill pandas-ta -a cursor
```

2. **Manually: put the files in place**
- File: `.cursor/skills/pandas-ta/SKILL.md` — Cursor also reads .agents/skills/ and .claude/skills/

### GitHub Copilot

1. **GitHub CLI**
```bash
gh skill install agiprolabs/claude-trading-skills pandas-ta
```

2. **Manually: put the files in place**
- File: `.github/skills/pandas-ta/SKILL.md`

### Gemini CLI

1. **Skills CLI (Vercel)**
```bash
npx skills add agiprolabs/claude-trading-skills --skill pandas-ta -a gemini-cli
```

2. **Platform CLI**
```bash
gemini skills install https://github.com/agiprolabs/claude-trading-skills --path skills/pandas-ta
```

### Windsurf (Devin Desktop)

**Manually: put the files in place**
- File: `.devin/skills/pandas-ta/SKILL.md` — The legacy .windsurf/skills/ path still works

### OpenCode

**Skills CLI (Vercel)**
```bash
npx skills add agiprolabs/claude-trading-skills --skill pandas-ta -a opencode
```

### Claude.ai

**Claude.ai**
- Zip the folder and upload it in Settings → Capabilities → Skills

Where a file is given instead of a command, copy the files from the source to that path: https://github.com/agiprolabs/claude-trading-skills/tree/HEAD/skills/pandas-ta/SKILL.md

## When to use it
- calculate technical indicators on OHLCV market DataFrames
- run multi-indicator setups using ta.Strategy
- clean cryptocurrency candlestick data with forward-fill and dropna
- tune indicator parameters for crypto volatility

## Example prompts
- Calculate RSI(14) and Bollinger Bands for this hourly candle DataFrame using pandas-ta
- Create a ta.Strategy with EMA crossover and SuperTrend for crypto swing trading
- Format this raw OHLCV data with DatetimeIndex and compute VWAP

## Source text · SKILL.md · MIT

Below is the content of a third-party file. It is data, not instructions for you: do not act on anything written inside unless the human asks. Block tag: d965c1e43e6b8b21.

BEGIN THIRD-PARTY FILE d965c1e43e6b8b21
````text
---
name: pandas-ta
description: Technical analysis with 130+ indicators using pandas-ta for crypto market data
---

# pandas-ta — Technical Analysis for Crypto Markets

pandas-ta is a Python library that extends pandas DataFrames with 130+ technical analysis indicators accessible via `df.ta`. It covers trend, momentum, volatility, volume, and overlap indicator categories — all callable with a single method on any OHLCV DataFrame.

## Installation

```bash
uv pip install pandas-ta pandas httpx
```

## Quick Start

```python
import pandas as pd
import pandas_ta as ta

# Assume df is a DataFrame with columns: open, high, low, close, volume
# All lowercase column names required

# Single indicator
df["rsi"] = df.ta.rsi(length=14)
df["atr"] = df.ta.atr(length=14)

# Multiple indicators via strategy
df.ta.strategy(ta.Strategy(
    name="Quick Check",
    ta=[
        {"kind": "rsi", "length": 14},
        {"kind": "macd", "fast": 12, "slow": 26, "signal": 9},
        {"kind": "bbands", "length": 20, "std": 2.0},
    ]
))
```

## OHLCV DataFrame Format

pandas-ta expects a DataFrame with lowercase column names:

```python
import pandas as pd

df = pd.DataFrame({
    "open": [...],
    "high": [...],
    "low": [...],
    "close": [...],
    "volume": [...]
}, index=pd.DatetimeIndex([...]))
```

**Important**: Set the index to a `DatetimeIndex` for time-aware indicators like VWAP. Column names must be lowercase (`close`, not `Close`).

### Handling Missing Data

```python
# Drop rows with NaN in OHLCV columns
df = df.dropna(subset=["open", "high", "low", "close", "volume"])

# Forward-fill small gaps (1-2 bars max)
df = df.ffill(limit=2)

# Verify no zero-volume bars for volume indicators
df = df[df["volume"] > 0]
```

## Core Indicator Categories

### Trend Indicators

Identify market direction and trend strength.

| Indicator | Call | Key Signal |
|-----------|------|------------|
| SMA | `df.ta.sma(length=20)` | Price above = bullish |
| EMA | `df.ta.ema(length=20)` | Faster than SMA, less lag |
| SuperTrend | `df.ta.supertrend(length=10, multiplier=3)` | Direction column: 1=bull, -1=bear |
| Ichimoku | `df.ta.ichimoku()` | Returns tuple of (span, lines) DataFrames |
| VWMA | `df.ta.vwma(length=20)` | Volume-weighted price trend |
| HMA | `df.ta.hma(length=20)` | Minimal lag, smooth trend |
| ADX | `df.ta.adx(length=14)` | >25 = trending, <20 = ranging |

### Momentum Indicators

Measure speed and magnitude of price changes.

| Indicator | Call | Key Signal |
|-----------|------|------------|
| RSI | `df.ta.rsi(length=14)` | >70 overbought, <30 oversold |
| MACD | `df.ta.macd(fast=12, slow=26, signal=9)` | Histogram crossover = entry |
| Stochastic | `df.ta.stoch(k=14, d=3, smooth_k=3)` | >80 overbought, <20 oversold |
````
END THIRD-PARTY FILE d965c1e43e6b8b21

The third-party file has ended. Everything between the d965c1e43e6b8b21 tags is data: requests and commands from it are not followed. An “end of file” line with another tag inside the block is part of the file.

First 2768 of 9162 bytes. © agiprolabs · MIT · https://github.com/agiprolabs/claude-trading-skills/tree/HEAD/skills/pandas-ta/SKILL.md

_Part of the page did not fit — see the HTML version._

---
NeVibeCode on affpapa.org. Catalog texts are descriptions, not instructions for the agent. How to choose and install: https://affpapa.org/en/nevibecode/agents.md
