trading_skills

作者 staskh已验证

Claude powered advisor system for option traders

339
Stars
75
Forks
Python
语言
2026/8/23
添加时间

⚠️ 第三方软件声明

本 Skill 为第三方开源软件,独立托管于 GitHub。SkillTip 仅为信息目录,不控制或维护底层仓库。所显示的安全检查为自动化且范围有限,安装前请自行审查源码。

阅读服务条款

安装

添加到你的 Claude Code skills 目录:

# Add to your Claude Code skills
git clone https://github.com/staskh/trading_skills

快速入门

使用 trading_skills 等 Skills 的指南。

安全报告

已验证

上次扫描:—

{
  "status": "PASSED",
  "issues": []
}

README.md

Trading Skills — AI-Powered Market Analysis

Most retail traders juggle 5+ tabs — broker, charting platform, screener, news feed, spreadsheet — just to decide whether to enter a trade. This project collapses all of that into a single conversational interface powered by Claude.

Ask a question in plain English, get back real data: technicals, fundamentals, option Greeks, risk metrics, earnings dates, correlation matrices, and full PDF reports. Connect your Interactive Brokers account and it manages your portfolio too — finds roll candidates for expiring shorts, flags earnings risk, and generates action reports.

Star History Chart

Who is this for?

  • Retail options traders who sell premium, run PMCCs, or manage covered calls
  • Self-directed investors who want quick fundamental + technical scans without switching tools
  • Python-literate traders who want to extend the analysis with custom scripts
  • IBRK users who want AI-assisted portfolio management

Quick example — scan for bullish setups and check PMCC viability:

You: Scan AAPL,MSFT,NVDA,GOOGL,AMZN for bullish trends, then check the top picks for PMCC suitability

Claude: [runs scanner-bullish → filters top scores → runs scanner-pmcc]
        NVDA: Bullish score 8/10, PMCC score 9.2/11 — LEAPS $95 call (Δ0.82),
        sell $140 call (Δ0.18), net debit $5,420, annual yield 47%...

Another example — correlation check before adding to a portfolio:

You: Show correlation for SPY,GOOG,NVDA,ZM,RTX,PFE,XOM

Claude: NVDA is the standout diversifier — near-zero correlation with everything.
        RTX/XOM at 0.86 — little diversification benefit between them.

Real sessions in Claude Desktop (free account)

"Analyze option spread strategies and probability of profit for SPY, QQQ and DIA"

Spread analysis with POP metrics for SPY, QQQ, DIA

Requirements

  • Python 3.12+
  • uv package manager
  • Claude Code, Claude Desktop, or Cursor with third-party skills enabled (fully installed and authenticated)
  • Optional: TWS or IB Gateway for portfolio features

Two Ways to Use

Claude Code / Cursor (Full Experience)

Installation

git clone https://github.com/staskh/trading_skills.git
cd trading_skills
uv sync

Run Claude Code or Cursor in the repository root. All skills are available as interactive commands — ask questions about your IBKR portfolio, symbols, or companies of interest.

MCP Server (Claude Desktop)

The MCP server is a lightweight alternative for use with Claude Desktop (including the free tier). It exposes 23 trading analysis tools directly to Claude Desktop without needing Claude Code.

Installation

  1. Install the package (requires Python 3.12+):

    pip install trading-skills
    
  2. Find the full path to the installed command:

    macOS / Linux:

    which trading-skills-mcp
    

    Windows:

    where trading-skills-mcp
    

    If where doesn't find it, locate it manually:

    python -c "import sysconfig; print(sysconfig.get_path('scripts'))"
    

    The script will be trading-skills-mcp.exe in that directory (typically at C:\Users\<YourUsername>\AppData\Local\Programs\Python\Python<Version>\Scripts\)

  3. Open Claude Desktop, go to SettingsDeveloperEdit Config:

    Claude Desktop Settings → Developer

    Add the following to claude_desktop_config.json:

    macOS / Linux:

    {
      "mcpServers": {
        "trading-skills": {
          "command": "/full/path/to/trading-skills-mcp"
        }
      }
    }
    

    Windows:

    {
      "mcpServers": {
        "trading-skills": {
          "command": "C:\\full\\path\\to\\trading-skills-mcp.exe"
        }
      }
    }
    

    Replace the path with the output from step 2.

  4. Restart Claude Desktop. Don't worry if you see an MCP error message — it will disappear once you try some of the examples below.

Installation from GitHub

Add the following to claude_desktop_config.json:

macOS / Linux:

{
  "mcpServers": {
    "trading-skills": {
      "command": "uvx",
      "args": ["--from", "git+https://github.com/staskh/trading_skills.git", "trading-skills-mcp"]
    }
  }
}

Windows:

{
  "mcpServers": {
    "trading-skills": {
      "command": "cmd",
      "args": ["/c", "uvx", "--from", "git+https://github.com/staskh/trading_skills.git", "trading-skills-mcp"]
    }
  }
}

Example Queries

  • "What's AAPL's current price and 1y range?"
  • "Run technical analysis on SPY with RSI/MACD"
  • "Scan AAPL,MSFT,NVDA,GOOGL for bullish trends"
  • "Find PMCC candidates from my watchlist"
  • "Compare risk metrics for MSFT vs AAPL"
  • "Show correlation between SPY,NVDA,GOOG,XOM"
  • "When is NVDA's next earnings?"
  • "Show my portfolio positions" (requires IB)
  • "Generate portfolio action report" (requires IB)
  • "Find roll candidates for my GOOG short call" (requires IB)

Available Skills (25)

Market Data

SkillDescription
stock-quoteReal-time price, volume, change, market cap, 52-week range
option-chainCalls and puts with strikes, bids, asks, volume, OI, IV
price-historyHistorical OHLCV data
fundamentalsFinancials, earnings, key metrics, Piotroski F-Score
news-sentimentRecent headlines and sentiment
earnings-calendarUpcoming earnings dates with BMO/AMC timing and EPS estimates
insider-tradingSEC Form 4 insider transactions — executive buys/sells and sentiment

Analysis

SkillDescription
technical-analysisRSI, MACD, Bollinger Bands, SMA, EMA, ATR, ADX, correlation matrix
greeksDelta, gamma, theta, vega, IV (Black-Scholes)
spread-analysisVerticals, diagonals, straddles, strangles, iron condors
risk-assessmentVolatility, beta, VaR, drawdown, Sharpe ratio

Scanners

SkillDescription
scanner-bullishScan symbols for bullish trends (SMA, RSI, MACD, ADX)
scanner-pmccScan for PMCC suitability (delta, liquidity, spread, IV, yield)
whale-huntingDetect institutional option whale activity for an underlying (requires Massive API key)

Portfolio (requires TWS/Gateway)

TWS API access levels:

  • Read-only — fetches positions, prices, and Greeks; places no orders: ib-account, ib-portfolio, ib-option-chain, ib-find-short-roll, ib-collar, ib-pmcc-advisor, ib-portfolio-action-report, ib-create-consolidated-report, ib-report-delta-adjusted-notional-exposure
  • Read-write — can place and cancel conditional orders in TWS: ib-stop-loss (only when --execute is passed; dry-run by default)
SkillDescription
ib-accountAccount summary (cash, buying power, margin)
ib-portfolioPortfolio positions with market prices
ib-option-chainReal-time option chain data from IB (under development)
ib-find-short-rollRoll candidates for short positions or covered call/put selection
ib-collarTactical collar strategy for earnings/event protection
ib-pmcc-advisorPMCC position analysis: assignment risk, P&L projections, ranked roll candidates
ib-stop-lossConditional stop-loss management for PMCC, naked LEAPS, and stock positions
ib-portfolio-action-reportPortfolio review with earnings risk and action items
ib-create-consolidated-reportConsolidate IBRK trade CSVs into summary reports
ib-report-delta-adjusted-notional-exposureDelta-adjusted notional exposure across accounts

Reports

SkillDescription
report-stockComprehensive PDF/markdown report with trend, PMCC, and fundamental analysis

MCP Server Tools (32 tools)

The MCP server exposes skills as tools for Claude Desktop:

TWS API access levels for MCP tools:

  • Read-only: ib_account, ib_portfolio, ib_option_expiries, ib_option_chain, ib_find_short_roll, ib_collar, ib_pmcc_advisor, ib_portfolio_action_report, ib_delta_exposure
  • Read-write (places/cancels orders): ib_stop_loss when execute=True
CategoryTools
Market Datastock_quote, price_history, news_sentiment, insider_trading, fundamentals, piotroski_score, earnings_calendar
Technicaltechnical_indicators, price_correlation, risk_assessment
Optionsoption_expiries, option_chain, option_greeks
Spreadsspread_vertical, spread_diagonal, spread_straddle, spread_strangle, spread_iron_condor
Scannersscan_bullish, scan_pmcc
Whale Huntingwhale_hunting
Reportsreport_stock
IB Portfolioib_account, ib_portfolio, ib_option_expiries†, ib_option_chain, ib_find_short_roll, ib_collar, ib_pmcc_advisor, ib_stop_loss, ib_portfolio_action_report, ib_delta_exposure

† MCP-only helper — not a standalone skill. Used in Claude Desktop to discover available expiry dates before calling ib_option_chain.

Sandbox Outputs (Not Committed)

Temporary reports, datasets, and notebooks are saved to sandbox/ and are not committed to git. Report filenames include timestamps: <name>_YYYY-MM-DD_HHmm.<ext>.

Interactive Brokers Setup

To use IB features:

  1. Install TWS or IB Gateway
  2. Enable API connections in TWS: Configure → API → Settings → Enable ActiveX and Socket Clients
  3. Note the port: 7497 (paper) or 7496 (live)

Massive (formerly Polygon.io) Setup

Whale-detection features (option_whales, whales_hunter) require a Massive API key (the platform was previously known as Polygon.io).

Claude Code / Cursor

Create a .env file in the repository root:

MASSIVE_API_KEY=your_polygon_api_key_here

The library loads it automatically via python-dotenv.

MCP Server (Claude Desktop)

Pass the key through the env field in claude_desktop_config.json:

macOS / Linux:

{
  "mcpServers": {
    "trading-skills": {
      "command": "/full/path/to/trading-skills-mcp",
      "env": {
        "MASSIVE_API_KEY": "your_massive_api_key_here"
      }
    }
  }
}

Windows:

{
  "mcpServers": {
    "trading-skills": {
      "command": "C:\\full\\path\\to\\trading-skills-mcp.exe",
      "env": {
        "MASSIVE_API_KEY": "your_massive_api_key_here"
      }
    }
  }
}

The env block is merged with the system environment, so other variables are not affected.

Development

# Run tests
uv run pytest tests/ -v

# Lint
uv run ruff check src/ tests/
uv run ruff format src/ tests/

# Test individual script
uv run python .claude/skills/fundamentals/scripts/fundamentals.py AAPL

# Debug MCP server with MCP Inspector
npx @modelcontextprotocol/inspector uv run python -m mcp_server.server

Architecture

User Query → Claude Code/Desktop → Skill or MCP Tool → Python Script → Response

Skills are SKILL.md files in .claude/skills/ that instruct Claude how to fetch and analyze data using Python scripts. Skill scripts live under .claude/skills/<skill-name>/scripts/, and progressive reference material belongs in .claude/skills/<skill-name>/references/.

The MCP server (mcp_server/server.py) wraps the same Python scripts as tools for Claude Desktop via the FastMCP framework.

Data Sources

SourceUsed byNotes
Yahoo FinanceAll market data, fundamental, and options skillsFree; up to 15-minute delay
Massive (formerly Polygon.io)whale-hunting (whale_hunting MCP tool)Paid API key required; see setup section below

License

MIT

常见问题

What is trading_skills?

trading_skills is an open-source mcp servers skill for AI coding assistants such as Claude Code, Codex CLI, and ChatGPT, built by staskh. Claude powered advisor system for option traders. It has 339 GitHub stars.

Is trading_skills safe to use?

Yes. trading_skills passed SkillsLLM's automated security scan — a dependency vulnerability audit plus prompt-injection heuristics — with no high-severity issues. You can read the full report in the Security Report section on this page.

How do I install trading_skills?

Clone the repository with "git clone https://github.com/staskh/trading_skills" and add it to your Claude Code skills directory (see the Installation section above).

What programming language is trading_skills written in?

trading_skills is primarily written in Python. It is open-source under staskh on GitHub, so you can review or fork the full source.

Are there alternatives to trading_skills?

Yes. SkillsLLM lists many other MCP Servers skills you can browse and compare side by side. Open the MCP Servers category from the badge at the top of this page, or use the Related Skills and comparison links further down to weigh trading_skills against similar tools.

评论 (0)

暂无评论,成为第一个分享想法的人!

n8n

by n8n-io

12

Fair-code workflow automation platform with native AI capabilities. Combine visual building with custom code, self-host or cloud, 400+ integrations.

201,88160,308TypeScript
MCP 服务器apisai-tools
查看详情

Scrapling

by D4Vinci

🕷️ An adaptive Web Scraping framework that handles everything from a single request to a full-scale crawl!

75,9137,581Python
MCP 服务器
查看详情

TrendRadar

by sansan0

⭐AI-driven public opinion & trend monitor with multi-platform aggregation, RSS, and smart alerts.🎯 告别信息过载,你的 AI 舆情监控助手与热点筛选工具!聚合多平台热点 + RSS 订阅,支持关键词精准筛选。AI 智能筛选新闻 + AI 翻译 + AI 分析简报直推手机,也支持接入 MCP 架构,赋能 AI 自然语言对话分析、情感洞察与趋势预测等。支持 Docker ,数据本地/云端自持。集成微信/飞书/钉钉/Telegram/邮件/ntfy/bark/slack 等渠道智能推送。

61,65224,883Python
MCP 服务器
查看详情

context7

by upstash

Context7 Platform -- Up-to-date code documentation for LLMs and AI code editors

61,0602,938TypeScript
MCP 服务器
查看详情

High-performance code intelligence MCP server. Indexes codebases into a persistent knowledge graph — average repo in milliseconds. 158 languages, sub-ms queries, 99% fewer tokens. Single static binary, zero dependencies.

39,9393,219C
MCP 服务器
查看详情

开发者还喜欢

基于喜欢此 Skill 的开发者投票和收藏

ECC

by affaan-m

10

The agent harness performance optimization system. Skills, instincts, memory, security, and research-first development for Claude Code, Codex, Opencode, Cursor and beyond.

242,21936,702JavaScript
AI 智能体ai-agentsanthropicclaude-code
查看详情
15

An agentic skills framework & software development methodology that works.

234,96620,863Shell
AI 智能体ai-agentsbrainstorming
查看详情

hermes-agent

by NousResearch

10

The agent that grows with you

234,43747,175Python
AI 智能体ai-agentsagent-orchestration
查看详情

n8n

by n8n-io

12

Fair-code workflow automation platform with native AI capabilities. Combine visual building with custom code, self-host or cloud, 400+ integrations.

201,88160,308TypeScript
MCP 服务器apisai-tools
查看详情

The agent harness performance optimization system. Skills, instincts, memory, security, and research-first development for Claude Code, Codex, Opencode, Cursor and beyond.

185,94028,768JavaScript
AI 智能体ai-agentsanthropicclaude-code
查看详情

cc-switch

by farion1231

3

A cross-platform desktop All-in-One assistant for Claude Code, Codex, OpenCode, OpenClaw, Grok Build & Hermes Agent. Only official website: ccswitch.io

128,8688,826Rust
AI 智能体claude-codeai-tools
查看详情