Skill 詳細
stock-liquidity
Equity liquidity, slippage, and execution-cost analysis.
使用前に確認
自動レビューは関連性のみを確認し、安全性や推奨を保証しません。使用前に出典の説明を読んでください。
SKILL.md
これはレビュー時に保存された抜粋です。完全で最新の内容は外部ソースを確認してください。
---
name: stock-liquidity
description: >
Analyze stock liquidity using bid-ask spreads, volume profiles, order book depth,
market impact estimates, and turnover ratios via Yahoo Finance data.
Use this skill whenever the user asks about liquidity, trading costs, bid-ask spread,
market depth, volume analysis, slippage, market impact, turnover ratio, or how
easy/hard it is to trade a stock without moving the price.
Triggers: "how liquid is AAPL", "bid-ask spread", "volume analysis", "order book depth",
"market impact of a large order", "turnover ratio", "slippage estimate",
"can I trade 100k shares without moving the price", "liquidity comparison",
"spread analysis", "ADTV", "Amihud illiquidity", "dollar volume",
"execution cost estimate", "liquidity score", penny stocks, small caps,
or thinly traded securities.
---
# Stock Liquidity Analysis Skill
Analyzes stock liquidity across multiple dimensions — bid-ask spreads, volume patterns, order book depth, estimated market impact, and turnover ratios — using data from Yahoo Finance via [yfinance](https://github.com/ranaroussi/yfinance).
Liquidity matters because it determines the real cost of trading. The quoted price is not what you actually pay — spreads, slippage, and market impact all eat into returns, especially for larger positions or less liquid names.
**Important**: This is for research and educational purposes only. Not financial advice. yfinance is not affiliated with Yahoo, Inc.
---
## Step 1: Ensure Dependencies Are Available
**Current environment status:**
```
!`python3 -c "import yfinance, pandas, numpy; print(f'yfinance={yfinance.__version__} pandas={pandas.__version__} numpy={numpy.__version__}')" 2>/dev/null || echo "DEPS_MISSING"`
```
If `DEPS_MISSING`, install required packages:
```python
import subprocess, sys
subprocess.check_call([sys.executable, "-m", "pip", "install", "-q", "yfinance", "pandas", "numpy"])
```
If already installed, skip and proceed.
---
## Step 2: Route to the Correct Sub-Skill
Classify the user's request and jump to the matching section. If the user asks for a general liquidity assessment without specifying a particular metric, run **Sub-Skill A** (Liquidity Dashboard) which computes all key metrics together.
| User Request | Route To | Examples |
|---|---|---|
| General liquidity check, "how liquid is X" | **Sub-Skill A: Liquidity Dashboard** | "how liquid is AAPL", "liquidity analysis for TSLA", "is this stock liquid enough" |
| Bid-ask spread, trading costs, effective spread | **Sub-Skill B: Spread Analysis** | "bid-ask spread for AMD", "what's the spread on NVDA options", "trading cost estimate" |
| Volume, ADTV, dollar volume, volume profile | **Sub-Skill C: Volume Analysis** | "volume analysis MSFT", "average daily volume", "volume profile for SPY" |
| Order book depth, market depth, level 2 | **Sub-Skill D: Order Book Depth** | "order book depth for AAPL", "market depth", "show me the book" |
| Market impact, slippage, execution cost for large orders | **Sub-Skill E: Market Impact** | "how much would 50k shares move the price", "slippage estimate", "market impact of $1M order" |
| Turnover ratio, trading activity relative to float | **Sub-Skill F: Turnover Ratio** | "turnover ratio for GME", "float turnover", "how actively traded is this" |
| Compare liquidity across multiple stocks | **Sub-Skill A** (multi-ticker mode) | "compare liquidity AAPL vs TSLA", "which is more liquid AMD or INTC" |
### Defaults
| Parameter | Default |
|---|---|
| Lookback period | `3mo` (3 months) |
| Data interval | `1d` (daily) |
| Market impact model | Square-root model |
| Intraday interval (when needed) | `5m` |
---
## Sub-Skill A: Liquidity Dashboard
**Goal**: Produce a comprehensive liquidity snapshot combining all key metrics for one or more tickers.
### A1: Fetch data and compute all metrics
```python
import yfinance as yf
import pandas as pd
import numpy as np
def liquidity_dashboard(ticker_symbol, period=GitHub で全文を読む (外部ページ)