- Home
- Skills
- Research & Analysis
- python-trading-toolkit
More screenshots
Works with the AI tools you already use
Python Trading Toolkit
You ask your AI agent to "check my portfolio" and it hallucinates stock prices, mixes up ticker formats between US and...
Free
python-trading-toolkit
Example session with this skill installed
Analyze my portfolio — AAPL, 0700.HK, sh600519, with weights 40%, 30%, 30%
- Read your context and instructions
- Compiled the python-trading-toolkit
Portfolio Summary
Total Return: 14.23%
Annualized: 18.67%
Sharpe Ratio: 1.42
Max Drawdown: -8.31%
Volatility: 13.15%
Technical Signals
AAPL: BULLISH — RSI oversold at 28.4, Golden Cross forming
0700.HK: NEUTRAL — Price at Bollinger midline, volume normal
sh600519: BEARISH — Death Cross confirmed, volume spike (Z: 2.7)
Risk Attribution
Alpha: +3.2% | Beta: 0.87 | Tracking Error: 4.1%
Information Ratio: 0.78
Connects securely to your tools. The creator never sees your data.
About this skill
The Problem
You ask your AI agent to "check my portfolio" and it hallucinates stock prices, mixes up ticker formats between US and HK exchanges, or gives you a Sharpe ratio with no context about the underlying calculation. Without a structured toolkit, agents improvise with web searches that return stale data, miss A-share tickers entirely, or produce analysis that looks professional but is mathematically wrong. The result: decisions based on fabricated numbers.
What You Get
- Pull live prices and fundamentals for any US (NYSE/NASDAQ), HK (HKEX), or A-share (SSE/SZSE) ticker using Yahoo Finance and Sina Finance APIs with correct ticker format handling (
sh600519,0700.HK,AAPL) - Calculate portfolio-level risk metrics — Sharpe ratio, Sortino ratio, max drawdown, VaR, beta, and correlation matrices from position-weighted return series
- Run full technical analysis with SMA/EMA crossovers, RSI divergence, MACD histograms, Bollinger Band breakouts, and volume anomaly detection (Z-score based)
- Scan options chains for put/call ratios, unusual activity (volume > 2× open interest), implied volatility surface, and Greeks estimation
- Screen stocks by multi-factor criteria — filter by P/E, revenue growth, volume thresholds, and market cap with automated alert triggers for gap moves
- Generate attribution analysis — decompose portfolio returns into alpha, beta, tracking error, and information ratio versus any benchmark
Why This Beats Prompting It Yourself
When you ask an agent to "analyze AAPL," it hallucinates the current P/E ratio because it doesn't have a data pipeline — it generates plausible-sounding numbers. This skill wires up yfinance and Sina Finance with proper error handling, caching awareness, and multi-market format detection. The agent writes and executes real Python, not fabricated analysis.
Example Session
You: Analyze my portfolio — AAPL, 0700.HK, sh600519, with weights 40%, 30%, 30%
Agent:
Portfolio Summary
Total Return: 14.23%
Annualized: 18.67%
Sharpe Ratio: 1.42
Max Drawdown: -8.31%
Volatility: 13.15%
Technical Signals
AAPL: BULLISH — RSI oversold at 28.4, Golden Cross forming
0700.HK: NEUTRAL — Price at Bollinger midline, volume normal
sh600519: BEARISH — Death Cross confirmed, volume spike (Z: 2.7)
Risk Attribution
Alpha: +3.2% | Beta: 0.87 | Tracking Error: 4.1%
Information Ratio: 0.78
Use Cases
- Morning market briefing: pull overnight HK/A-share moves before US pre-market
- Portfolio rebalancing: run Sharpe optimization across multi-market positions
- Earnings season screening: filter watchlist by P/E and volume before reports
- Options strategy setup: scan unusual activity before position entry
- Technical signal review: identify golden crosses and RSI divergences across watchlist
Known Limitations
Yahoo Finance rate-limits at ~2000 requests/hour and may return stale data for HK/A-share tickers. Sina Finance API requires Referer headers and may be inaccessible outside mainland China. Options data availability varies by exchange and may be delayed 15+ minutes.
Upgrade to Pro
Free covers data pulls and portfolio snapshots. Python Trading Toolkit Pro ($5) adds the strategy layer: walk-forward backtesting with cost modeling, Sharpe/drawdown/alpha attribution, position-sizing calculators, and rebalancing workflows. Upgrade when you start making position decisions from the output — Pro version.
How to install
Works the same in every agent - Claude, Cursor, Codex, Copilot and 20+ more.
- 1
Download the ZIP
Free skills download straight away. Paid skills unlock right after purchase.
- 2
Unzip into your skills folder
Every agent reads skills from one folder on your machine. Drop the unzipped folder in there.
- 3
Ask your agent to use it
Restart the agent if it was already running. It picks the skill up automatically - no config needed.
Skills folder by agent
Click the path to copy it. Create the folder if it does not exist yet.
Reviews
52 people have installed this skill.
Trust & safety
Security scanned
Verified clean 4 months ago
- Free to download with an account