gateway/templates/skills/yf-data/SKILL.md
Collect, normalize, and validate market data directly from yfinance for stocks, ETFs, indices, forex, crypto, and futures. Use when an agent needs reliable OHLCV downloads, multi-ticker batching, timezone-safe alignment, corporate action handling, or clean datasets for downstream analysis.
npx skillsauth add phanijapps/agentzero yf-dataInstall this skill globally with one command. Works with Claude Code, Cursor, and Windsurf.
3 of 9 scanners reported clean
Some scanners were skipped, did not run, or reported a non-clean status. Review each row below.
Use direct yfinance calls as the data foundation. Build reusable, validated datasets for downstream technical, fundamental, options, and risk workflows.
yf.download first; fall back to Ticker.history when needed.open/high/low/close/adj_close/volume.import yfinance as yf
import pandas as pd
def fetch_ohlcv(symbols, start=None, end=None, period="1y", interval="1d"):
raw = yf.download(
tickers=symbols,
start=start,
end=end,
period=None if start or end else period,
interval=interval,
auto_adjust=False,
actions=True,
progress=False,
group_by="ticker",
threads=True,
)
if isinstance(symbols, str):
raw = raw.rename(columns=str.lower)
raw.columns = [c.replace("adj close", "adj_close") for c in raw.columns]
raw = raw.sort_index()
raw.index = pd.to_datetime(raw.index, utc=True)
return {symbols: raw}
out = {}
for symbol in symbols:
df = raw[symbol].copy()
df.columns = [c.lower().replace("adj close", "adj_close") for c in df.columns]
df = df.sort_index()
df.index = pd.to_datetime(df.index, utc=True)
out[symbol] = df
return out
actions=True.Read references/yfinance-recipes.md for ticker-format rules and fallback logic by asset class.
tools
Helper tools and instructions for creating new agents
development
Build technical indicator, trend, and momentum signals directly from yfinance price data. Use when an agent needs RSI, MACD, EMA, Bollinger, or ATR workflows, multi-timeframe confirmation, signal scoring, or chart-ready technical outputs.
data-ai
Perform portfolio construction and risk diagnostics directly from yfinance multi-asset return series. Use when an agent needs correlation analysis, drawdown and VaR metrics, stress scenarios, or weight optimization for stock, ETF, and crypto portfolios.
testing
Analyze options chains directly from yfinance to measure implied volatility structure, open-interest positioning, and directional options sentiment. Use when an agent needs expiry-by-expiry options diagnostics, put-call ratios, max pain estimates, or volatility regime checks.