Agent skill

Trading Visualization

by agiprolabs in agiprolabs/claude-trading-skills

Professional trading charts including candlesticks, equity curves, drawdowns, correlation heatmaps, and return distributions

MITAuto-check passedData & Analytics

Install Trading Visualization

skills CLI
$ npx skills add agiprolabs/claude-trading-skills --skill trading-visualization -a claude-code

Project install by default; add -g for ~/.claude/skills/.

GitHub CLI
$ gh skill install agiprolabs/claude-trading-skills trading-visualization --agent claude-code

Project scope by default; add --scope user for a personal install. Needs GitHub CLI 2.90.0 or later (public preview).

Manual copy
$ git clone --depth 1 https://github.com/agiprolabs/claude-trading-skills.git skills-src && mkdir -p .claude/skills && cp -r skills-src/skills/trading-visualization .claude/skills/trading-visualization && rm -rf skills-src

Use ~/.claude/skills/ instead of .claude/skills for a personal install. The folder must contain SKILL.md.

Claude Code skills documentation · loads skills from .claude/skills/

Facts

Skill name
trading-visualization
GitHub stars
410
Token cost
~2.8k tokens
SKILL.md length
499 words
Files
9 (incl. scripts, references)
Skills in repo
68
Repo updated
First seen
Licence
MIT

At a glance

Professional trading charts including candlesticks, equity curves, drawdowns, correlation heatmaps, and return distributions

  • Works in 3 steps: Pattern recognition — Spot structural… → Strategy evaluation — Equity curves,… → Reporting — Communicate performance to…
  • Tasks that involve Trading and backtesting
  • SKILL.md covers Chart Types Covered, Libraries, Styling: Dark Theme Default and Chart Composition: Multi-Panel…, plus 8 more sections
  • Runs Python scripts from its folder; calls uv

What it does

Trading Visualization is an agent skill from agiprolabs/claude-trading-skills. Professional trading charts including candlesticks, equity curves, drawdowns, correlation heatmaps, and return distributions

Its SKILL.md is about 2.8k tokens, which your agent loads only when the skill is triggered. The skill folder holds 10 other files, including scripts and reference files (for example `references/chart_recipes.md`, `references/styling_guide.md` and `scripts/chart_generator.py`).

It sits in Data & Analytics, covering Trading and backtesting and Data visualization. It works with Matplotlib. The repository describes itself as: 68 trading, DeFi, and quantitative finance Agent Skills. Works with Claude Code, Cursor, Codex, Gemini CLI, and 30+ other tools. The licence is MIT.

When your agent uses it

  • Tasks that involve Trading and backtesting
  • Tasks that involve Data visualization

Example prompts

  • “/trading-visualization”

Requirements

  • Python 3

Workflow steps

3 steps, taken from the first numbered list in SKILL.md.

  1. Pattern recognition — Spot structural changes in price, volume, and momentum that quantitative filters miss.
  2. Strategy evaluation — Equity curves, drawdown plots, and return distributions expose whether a strategy is robust or curve-fit.
  3. Reporting — Communicate performance to stakeholders, journals, or your future self with publication-quality visuals.

What it can do on your machine

Read from SKILL.md and the folder at commit 981e1d7. It shows what the files ask for, not the result of running them.

  • Tool permissions

    Pre-approves nothing: there is no allowed-tools line, so your agent's usual permission prompts apply.

    From allowed-tools in the SKILL.md frontmatter.

  • Runs code

    Ships 2 files in scripts/ (Python), which the agent can run.

    Shell commands in SKILL.md call:

    • uv

    From the folder's file list and the shell code blocks in SKILL.md.

  • Network

    No URLs in SKILL.md. Its commands use uv, which can reach the network depending on how they are called.

    From URLs in SKILL.md, links to its own repository left out.

  • Credentials

    Names no API keys, tokens, secrets or passwords.

    From names ending in _API_KEY, _TOKEN, _SECRET, _KEY or _PASSWORD in SKILL.md.

Context cost

Trading Visualization loads about 2.8k tokens when it runs, and up to ~6.8k if it reads all its reference files. Until then it costs about 37 tokens; SKILL.md has 499 words of instructions outside code blocks.

Always · name and description, kept in context so the agent knows when to use it
~37
When it runs · the whole SKILL.md, loaded when a task matches
~2.8k
With references · SKILL.md plus every file in references/, read only if the agent opens them
~6.8k

Estimates: characters ÷ 4, the usual rule of thumb; real counts depend on the model's tokenizer. Scripts and assets cost tokens only if the agent reads them.

Safety

Auto-check passed

The automated check found no risky patterns in SKILL.md.

Automated static check — not a guarantee. Review scripts before installing. It scans the text of SKILL.md for risky patterns (piping downloads into a shell, reading credential files, hidden Unicode, destructive commands); the scripts in this folder are not scanned.

SKILL.md

The full file from agiprolabs/claude-trading-skills at commit 981e1d7, republished under its MIT licence (© agiprolabs). 499 words, ~2,830 tokens.

Download SKILL.mdSave it as .claude/skills/trading-visualization/SKILL.md (or your agent's skills folder). This skill also uses 8 other files; get the full folder from GitHub.
name
trading-visualization
description
Professional trading charts including candlesticks, equity curves, drawdowns, correlation heatmaps, and return distributions

Trading Visualization

Visualization is the primary interface between a trader and their data. Charts reveal patterns that tables and numbers cannot: breakdowns in strategy, regime transitions, clustering of losses, and the shape of risk. A well-designed chart communicates more in a glance than a page of statistics.

Three uses of trading charts:

  1. Pattern recognition — Spot structural changes in price, volume, and momentum that quantitative filters miss.
  2. Strategy evaluation — Equity curves, drawdown plots, and return distributions expose whether a strategy is robust or curve-fit.
  3. Reporting — Communicate performance to stakeholders, journals, or your future self with publication-quality visuals.

Chart Types Covered

Chart TypePurposeLibrary
CandlestickOHLCV price action with overlaysmplfinance
Equity curvePortfolio value over timematplotlib
DrawdownUnderwater equity plotmatplotlib
Return distributionHistogram + normal fitmatplotlib
Correlation heatmapCross-asset correlation matrixmatplotlib / seaborn
Trade markersEntry/exit points on price chartmplfinance / matplotlib
Indicator panelsRSI, MACD below price chartmplfinance
Position timelineWhen positions were heldmatplotlib

Libraries

mplfinance

Best for candlestick charts. Built on matplotlib with finance-specific defaults.

bash
uv pip install mplfinance
python
import mplfinance as mpf

# Basic candlestick from a DataFrame with DatetimeIndex
# Columns: Open, High, Low, Close, Volume
mpf.plot(df, type="candle", volume=True, style="charles")

Key features:

  • Native OHLCV support — pass a DataFrame directly
  • Built-in volume bars
  • addplot for overlays (moving averages, Bollinger Bands)
  • Custom styles via mpf.make_mpf_style()
matplotlib

General purpose, most flexible. Use when you need full control over layout.

bash
uv pip install matplotlib
python
import matplotlib.pyplot as plt

fig, axes = plt.subplots(2, 1, figsize=(14, 8), height_ratios=[3, 1],
                         sharex=True)
axes[0].plot(dates, equity, color="#00ff88")
axes[1].fill_between(dates, drawdown, 0, color="#ff4444", alpha=0.5)
plotly

Interactive charts rendered as HTML. Best for exploration and dashboards.

bash
uv pip install plotly
python
import plotly.graph_objects as go

fig = go.Figure(data=[go.Candlestick(
    x=df.index, open=df["Open"], high=df["High"],
    low=df["Low"], close=df["Close"]
)])
fig.update_layout(template="plotly_dark")
fig.write_html("chart.html")

Styling: Dark Theme Default

Trading terminals use dark backgrounds by default. All charts in this skill follow that convention.

Quick dark theme setup
python
import matplotlib.pyplot as plt

plt.style.use("dark_background")
plt.rcParams.update({
    "figure.facecolor": "#1a1a2e",
    "axes.facecolor": "#1a1a2e",
    "axes.edgecolor": "#333333",
    "grid.color": "#333333",
    "grid.alpha": 0.4,
    "text.color": "#e0e0e0",
    "xtick.color": "#aaaaaa",
    "ytick.color": "#aaaaaa",
})
Trading color scheme
ElementColorHex
Bullish / profitGreen#00ff88
Bearish / lossRed#ff4444
Neutral / infoBlue#4488ff
WarningAmber#ffaa00
MA shortOrange#ff6600
MA longBlue#3399ff
MA signalYellow#ffcc00

See references/styling_guide.md for complete typography, layout ratios, and export settings.


Chart Composition: Multi-Panel Layout

Most trading charts need multiple synchronized panels — price on top, volume in the middle, indicators at the bottom.

Show full SKILL.md (190 more words)Show less
Stacked panels with shared x-axis
python
import matplotlib.pyplot as plt
import matplotlib.gridspec as gridspec

fig = plt.figure(figsize=(14, 10))
gs = gridspec.GridSpec(3, 1, height_ratios=[3, 1, 1], hspace=0.05)

ax_price = fig.add_subplot(gs[0])
ax_volume = fig.add_subplot(gs[1], sharex=ax_price)
ax_rsi = fig.add_subplot(gs[2], sharex=ax_price)

# Hide x-tick labels on upper panels
ax_price.tick_params(labelbottom=False)
ax_volume.tick_params(labelbottom=False)
Panel height ratios
LayoutRatiosUse Case
Price + Volume[3, 1]Simple OHLCV chart
Price + Volume + Indicator[3, 1, 1]Standard analysis view
Equity + Drawdown[2, 1]Performance review
Price + RSI + MACD[3, 1, 1]Full indicator stack

Candlestick Charts with Overlays

python
import mplfinance as mpf
import pandas as pd

# df: DataFrame with DatetimeIndex, columns Open/High/Low/Close/Volume
ema20 = df["Close"].ewm(span=20).mean()
ema50 = df["Close"].ewm(span=50).mean()

ap = [
    mpf.make_addplot(ema20, color="#ff6600", width=1.2),
    mpf.make_addplot(ema50, color="#3399ff", width=1.2),
]

style = mpf.make_mpf_style(
    base_mpf_style="nightclouds",
    marketcolors=mpf.make_marketcolors(
        up="#00ff88", down="#ff4444",
        wick={"up": "#00ff88", "down": "#ff4444"},
        edge={"up": "#00ff88", "down": "#ff4444"},
        volume={"up": "#00ff88", "down": "#ff4444"},
    ),
    facecolor="#1a1a2e", figcolor="#1a1a2e",
    gridcolor="#333333", gridstyle="--",
)

mpf.plot(df, type="candle", style=style, addplot=ap,
         volume=True, figsize=(14, 8),
         title="Token / SOL — 15m", savefig="candles.png")

Equity Curve with Drawdown Panel

python
import numpy as np
import matplotlib.pyplot as plt

def plot_equity_drawdown(equity: pd.Series, title: str = "Portfolio") -> plt.Figure:
    """Plot equity curve with drawdown panel below."""
    peak = equity.cummax()
    drawdown = (equity - peak) / peak

    fig, (ax1, ax2) = plt.subplots(2, 1, figsize=(14, 8),
                                    height_ratios=[2, 1], sharex=True)
    ax1.plot(equity.index, equity, color="#00ff88", linewidth=1.5)
    ax1.plot(equity.index, peak, color="#555555", linewidth=0.8,
             linestyle="--", label="Peak")
    ax1.set_title(title, fontsize=14, fontweight="bold", color="white")
    ax1.set_ylabel("Portfolio Value", fontsize=11)
    ax1.legend(loc="upper left")
    ax1.grid(True, alpha=0.3)

    ax2.fill_between(equity.index, drawdown, 0, color="#ff4444", alpha=0.5)
    ax2.set_ylabel("Drawdown", fontsize=11)
    ax2.set_xlabel("Date", fontsize=11)
    ax2.grid(True, alpha=0.3)

    fig.tight_layout()
    return fig

Return Distribution

python
from scipy import stats

def plot_return_distribution(returns: pd.Series) -> plt.Figure:
    """Histogram of returns with normal fit and risk metrics."""
    fig, ax = plt.subplots(figsize=(10, 6))

    ax.hist(returns, bins=50, density=True, alpha=0.7,
            color="#4488ff", edgecolor="#333333")

    # Normal fit overlay
    mu, sigma = returns.mean(), returns.std()
    x = np.linspace(returns.min(), returns.max(), 200)
    ax.plot(x, stats.norm.pdf(x, mu, sigma), color="#ffaa00",
            linewidth=2, label=f"Normal(μ={mu:.4f}, σ={sigma:.4f})")

    # VaR line
    var_95 = returns.quantile(0.05)
    ax.axvline(var_95, color="#ff4444", linestyle="--",
               label=f"VaR 95%: {var_95:.4f}")

    ax.set_title("Return Distribution", fontsize=14, fontweight="bold")
    ax.set_xlabel("Return", fontsize=11)
    ax.legend()
    ax.grid(True, alpha=0.3)
    fig.tight_layout()
    return fig

Correlation Heatmap

python
def plot_correlation_heatmap(returns_df: pd.DataFrame) -> plt.Figure:
    """Correlation matrix heatmap with annotations."""
    corr = returns_df.corr()
    fig, ax = plt.subplots(figsize=(10, 8))
    im = ax.imshow(corr, cmap="RdYlGn", vmin=-1, vmax=1, aspect="auto")

    ax.set_xticks(range(len(corr.columns)))
    ax.set_yticks(range(len(corr.columns)))
    ax.set_xticklabels(corr.columns, rotation=45, ha="right")
    ax.set_yticklabels(corr.columns)

    for i in range(len(corr)):
        for j in range(len(corr)):
            ax.text(j, i, f"{corr.iloc[i, j]:.2f}",
                    ha="center", va="center", fontsize=9,
                    color="black" if abs(corr.iloc[i, j]) < 0.5 else "white")

    fig.colorbar(im, ax=ax, shrink=0.8)
    ax.set_title("Correlation Matrix", fontsize=14, fontweight="bold")
    fig.tight_layout()
    return fig

Trade Markers on Price Chart

python
def plot_trades_on_price(
    price: pd.Series,
    entries: pd.DataFrame,  # columns: date, price, side
    exits: pd.DataFrame,    # columns: date, price, pnl
) -> plt.Figure:
    """Price chart with entry/exit markers."""
    fig, ax = plt.subplots(figsize=(14, 7))
    ax.plot(price.index, price, color="#aaaaaa", linewidth=1)

    # Entry markers
    buy_mask = entries["side"] == "long"
    ax.scatter(entries.loc[buy_mask, "date"], entries.loc[buy_mask, "price"],
               marker="^", color="#00ff88", s=100, zorder=5, label="Buy")
    ax.scatter(entries.loc[~buy_mask, "date"], entries.loc[~buy_mask, "price"],
               marker="v", color="#ff4444", s=100, zorder=5, label="Short")

    # Exit markers
    win_mask = exits["pnl"] > 0
    ax.scatter(exits.loc[win_mask, "date"], exits.loc[win_mask, "price"],
               marker="x", color="#00ff88", s=80, zorder=5)
    ax.scatter(exits.loc[~win_mask, "date"], exits.loc[~win_mask, "price"],
               marker="x", color="#ff4444", s=80, zorder=5)

    ax.set_title("Trades on Price", fontsize=14, fontweight="bold")
    ax.legend()
    ax.grid(True, alpha=0.3)
    fig.tight_layout()
    return fig

Output Formats

FormatMethodUse Case
PNGfig.savefig("chart.png", dpi=150)Sharing, embedding
SVGfig.savefig("chart.svg")Editing, scaling
HTMLfig.write_html("chart.html") (plotly)Interactive exploration
Inlineplt.show()Jupyter notebooks
Saving with dark background
python
fig.savefig("chart.png", dpi=150, facecolor=fig.get_facecolor(),
            edgecolor="none", bbox_inches="tight")

Integration with Other Skills

SkillIntegration
pandas-taCompute indicators, pass to addplot overlays
vectorbtExtract equity curve and trade list for visualization
portfolio-analyticsPlot Sharpe, drawdown, and return metrics
risk-managementVisualize position limits and exposure over time
position-sizingChart position size vs account equity over time
regime-detectionColor background by detected market regime
correlation-analysisGenerate correlation heatmaps from return data

Files

References
  • references/chart_recipes.md — Complete code recipes for six common chart types
  • references/styling_guide.md — Dark theme setup, colors, typography, layout, and export settings
Scripts
  • scripts/chart_generator.py — Generate four chart types from synthetic data (candlestick, equity, returns, trades)
  • scripts/performance_report.py — Multi-chart performance report with summary statistics

© agiprolabs, MIT. Rendered from Markdown: HTML in the file is shown as text, images as links, and headings moved down two levels. Raw file

Files

SKILL.md and 8 other files (scripts, references) in skills/trading-visualization of agiprolabs/claude-trading-skills.

  • SKILL.md
  • candlestick.png
  • equity_drawdown.png
  • references/chart_recipes.md
  • references/styling_guide.md
  • return_distribution.png
  • scripts/chart_generator.py
  • scripts/performance_report.py
  • trade_markers.png

Open the folder on GitHubat commit 981e1d7

Compare with similar skills

Trading Visualization next to the 5 skills that share the most tags, products or categories with it. Stars are the repository's; “used in” counts other GitHub owners with a copy.

Trading Visualization compared with similar skills
SkillStarsUsed inTokensAuto-checkLicenceRepo updated
Trading Visualization this skillagiprolabs/claude-trading-skills410—~2.8kAutomated safety check: PassMIT
MatplotlibzLanqing/codex-claude-academic-skills4.6k18 repos~2.9kAutomated safety check: PassMIT
Scientific Visualizationmims-harvard/OptimusKG14619 repos~6.3kAutomated safety check: PassMIT
SeabornzLanqing/codex-claude-academic-skills4.6k16 repos~4.9kAutomated safety check: PassBSD-3-Clause
Plot From DataTrae1ounG/paper-plot-skills8661 repos~583Automated safety check: PassNone
Scientific Figure MakingChenLiu-1996/figures4papers8.2k—~557Automated safety check: PassCustom licence

Similar skills

  • Matplotlib

    zLanqing/codex-claude-academic-skills

    Low-level plotting library for full customization. An agent skill from zLanqing/codex-claude-academic-skills.

    4.6k GitHub starsUsed in 18 repos~2.9k tokens
    Data & AnalyticsAuto-check passed
  • Scientific Visualization

    mims-harvard/OptimusKG

    Create publication figures with matplotlib/seaborn/plotly. An agent skill from mims-harvard/OptimusKG.

    146 GitHub starsUsed in 19 repos~6.3k tokens
    Data & AnalyticsAuto-check passed
  • Seaborn

    zLanqing/codex-claude-academic-skills

    Statistical visualization with pandas integration. An agent skill from zLanqing/codex-claude-academic-skills.

    4.6k GitHub starsUsed in 16 repos~4.9k tokens
    Data & AnalyticsAuto-check passed
  • Plot From Data

    Trae1ounG/paper-plot-skills

    Generate publication-quality matplotlib figures by selecting a pre-built paper style and substituting user data.

    866 GitHub starsUsed in 1 repo~583 tokens
    Data & AnalyticsAuto-check passed
  • Scientific Figure Making

    ChenLiu-1996/figures4papers

    Covers publication-ready matplotlib figures for academic papers, slides, and reports—bars, trends, scatter, heatmaps, and multi-panel layouts—with this…

    8.2k GitHub stars~557 tokensUpdated 2 days ago
    Data & AnalyticsAuto-check passed
  • Plot From Image

    Trae1ounG/paper-plot-skills

    Reproduce any academic paper figure from an uploaded image using accumulated style experience.

    866 GitHub starsUsed in 1 repo~868 tokens
    Data & AnalyticsAuto-check passed

More from agiprolabs/claude-trading-skills

All 68 skills in this repo
  • Backtrader

    agiprolabs/claude-trading-skills

    Event-driven backtesting with bar-by-bar execution, complex order types, multiple analyzers, and custom indicators

    410 GitHub stars~2.4k tokensUpdated 1 mo ago
    Auto-check passed
  • Birdeye API

    agiprolabs/claude-trading-skills

    Solana token market data via Birdeye — prices, OHLCV, trades, token metadata, security checks, and trader activity

    410 GitHub stars~1.8k tokensUpdated 1 mo ago
    Auto-check passed
  • Coingecko API

    agiprolabs/claude-trading-skills

    Broad crypto market data from CoinGecko covering 13,000+ tokens.

    410 GitHub stars~1.6k tokensUpdated 1 mo ago
    Auto-check passed
  • Cointegration Analysis

    agiprolabs/claude-trading-skills

    Cointegration testing for pairs trading using Engle-Granger, Johansen, and rolling stability analysis

    410 GitHub stars~2.1k tokensUpdated 1 mo ago
    Auto-check passed
  • Copy Trading

    agiprolabs/claude-trading-skills

    Wallet evaluation, monitoring, and copy-trade strategy design for Solana DEX trading

    410 GitHub stars~2.4k tokensUpdated 1 mo ago
    Auto-check passed
  • Correlation Analysis

    agiprolabs/claude-trading-skills

    Cross-asset correlation analysis including rolling correlation, hierarchical clustering, tail dependence, and regime-dependent correlation

    410 GitHub stars~2.4k tokensUpdated 1 mo ago
    Auto-check passed

Works with

Questions about Trading Visualization

What does Trading Visualization do?

Professional trading charts including candlesticks, equity curves, drawdowns, correlation heatmaps, and return distributions. Trading Visualization is an agent skill from agiprolabs/claude-trading-skills.

When should I use Trading Visualization?

Trading Visualization fits situations like: tasks that involve Trading and backtesting; tasks that involve Data visualization.

How do I install Trading Visualization in Claude Code?

Run `npx skills add agiprolabs/claude-trading-skills --skill trading-visualization -a claude-code`. Or copy the skill folder (skills/trading-visualization in agiprolabs/claude-trading-skills) into .claude/skills/trading-visualization in your project. Claude Code loads it when a task matches its description.

How do I install Trading Visualization in Codex?

Run `npx skills add agiprolabs/claude-trading-skills --skill trading-visualization -a codex`. Or copy the skill folder (skills/trading-visualization in agiprolabs/claude-trading-skills) into .agents/skills/trading-visualization in your project. Codex loads it when a task matches its description.

Can I use Trading Visualization in Cursor, Gemini CLI or GitHub Copilot?

Cursor, Gemini CLI, GitHub Copilot and OpenCode also load SKILL.md folders. With the skills CLI, run `npx skills add agiprolabs/claude-trading-skills --skill trading-visualization -a cursor` (or -a gemini-cli, github-copilot or opencode for the others). To copy it by hand, put the folder in .cursor/skills/trading-visualization, .gemini/skills/trading-visualization, .github/skills/trading-visualization and .opencode/skills/trading-visualization in your project.

What does Trading Visualization need to run?

Going by SKILL.md and its folder, Trading Visualization needs Python for the scripts in its folder and the command-line tools its instructions call (uv). Our summary lists: Python 3.

Does Trading Visualization access the network?

SKILL.md contains no URLs. Its commands use uv, which can reach the network depending on how they are called. This is read from the text; nothing was executed.

Is Trading Visualization safe to install?

Our automated static check of SKILL.md found no risky patterns, such as piping downloads into a shell, reading credential files or hidden Unicode. It is not a guarantee. The check reads SKILL.md only: the scripts in the folder are not scanned, so read them before running anything.

What licence does Trading Visualization use?

Trading Visualization is published under the MIT licence (the repository's licence). It allows redistribution, so the full SKILL.md is shown on this page.

How many tokens does Trading Visualization use?

About 2.8k tokens (SKILL.md is roughly 11k characters). Agents keep only the skill's name and description in context until a task matches; then they load SKILL.md in full. Its references folder adds about 4k tokens, read only when the agent opens those files.

What are the alternatives to Trading Visualization?

Skills that share tags, products or a category with Trading Visualization: Matplotlib (zLanqing/codex-claude-academic-skills, 4.6k stars), Scientific Visualization (mims-harvard/OptimusKG, 146 stars), Seaborn (zLanqing/codex-claude-academic-skills, 4.6k stars) and Plot From Data (Trae1ounG/paper-plot-skills, 866 stars). The comparison table on this page puts their stars, adoption, token cost, safety result and licence side by side.

Who maintains Trading Visualization?

agiprolabs (a GitHub user) maintains it in agiprolabs/claude-trading-skills, which has 410 GitHub stars. The repository holds 68 skills in this directory. The repository was last updated on September 3, 2026.

Source: agiprolabs/claude-trading-skills on GitHub. Facts on this page come from the repository at the commit we read; the author's words are quoted as theirs.