TRIGGER - stale closes, zero volume, missing trading sessions, duplicate timestamps, negative prices, invalid OHLC, outlier returns, validate downloaded bars, 数据质量, 缺失行情. Validate a daily OHLCV panel and report defects without filling, clipping or deleting data. SKIP for selecting a vendor or detecting price-adjustment convention (market-data-sourcing), session schedules (trading-calendars-and-sessions), corporate event accounting (corporate-actions-processing), and storage/as-of joins (market-data-engineering).
Ships in fin-market-data. Installing the plugin adds it to Claude Code.
What the skill costs in Claude's context, stage by stage
Name and description: Claude knows it exists.
SKILL.md joins the conversation and stays.
Read when SKILL.md points to them; scripts run unread.
Validate one instrument's delivered daily OHLCV panel before computing signals. Report bad rows and missing sessions; leave the original values intact. A diagnostic is not an imputation policy and an outlier is not automatically an error.
✅ Implemented and executed 2026-09-14 in data_quality.py:
from fin_skills.market_data.data_quality import validate_panel
report = validate_panel(bars, sessions=declared_sessions)
print(report.summary())
if not report.passed:
# Preserve the delivery and investigate the reported rows before calculating signals.
raise ValueError("bar delivery failed its declared quality contract")
The report has checks, per-check counts, severity and example dates, plus stats and
passed. Schema, timestamp, nonfinite-value, positive-price and OHLC-order defects fail.
Negative volume fails; zero volume is a warning because some markets or instruments have
valid no-trade sessions. Use require_volume=False for a source without volume.
Repeated-close and return thresholds are declared acceptance limits, not universal market
rules. Defaults are exposed as max_stale_run, max_stale_frac, max_abs_return and
outlier_sigma. The absolute-return cap is applied to simple returns symmetrically; robust
outlier screening uses centred log-return deviations. Invalid prices are not bridged to
manufacture a return. Zero-variance samples report an undefined volatility ratio.
fin_skills.api.get("data_quality").run(bars=bars, dates=declared_sessions) provides the same
check through the guard interface. Bundle uses the existing bars and dates slots.
Direct validate_panel also reports an unsorted input; Bundle rejects unsorted time-series
slots before the guard runs. Neither path sorts or repairs data for the caller.
The session list must cover exactly the requested sample and venue. Dates are local session labels. Convert observation instants to the exchange timezone before supplying them; UTC midnight is not a universal exchange session boundary. Intraday missing-minute coverage is outside this daily contract; use an explicit schedule with trading-calendars-and-sessions.
Missing sessions produces a warning that calendar coverage was not checked. With a declared
calendar, every absent session and every extra local date is counted. A calendar mismatch may
mean a wrong venue, timezone or session-label convention rather than a fabricated quote.
✅ Measured 2026-09-14: the seeded fill_cost() removes 24 of 504 declared sessions. The
comparison fill creates 23 repeated-close runs. Its retained volatility is 0.9768 times the
complete synthetic panel's volatility, while the moving average differs by over one basis
point on 306 sessions, with maximum relative error 37.01 basis points. These are synthetic
measurements, not general bounds. The validator itself never performs that fill.
🚨 An identical close can be a real unchanged trade, a stale quote or an inserted non-session row. Removing it changes the observation clock. A fresh quote following no prints can include several sessions' accumulated return, so dropping stale days is not generally unbiased.
✅ Measured 2026-09-14: mechanism_table() shows identical delivered values under two possible
calendar interpretations. The sample has 156 repeated-close runs, with 35.02% of rows repeated.
Volatility is 0.3211 with rows retained and 0.3985 with them removed; their ratio is 1.2408.
For the latent real-session process, volatility is 0.3240: deleting rows overshoots. If the extra
rows are known non-sessions, the fresh-session comparison uses a different annualization clock.
The ratio is a sensitivity diagnostic; it does not reveal which interpretation is correct.
For a fixed volatility target with no other constraints, position size is inversely proportional to estimated volatility. Caps, leverage limits, changing risk and execution can alter realized exposure. Do not promise that a sample ratio equals future realized risk.
Run python scripts/data_quality.py from this skill directory. The demo is seeded, offline,
ASCII-only and writes no files. Tests cover missing sessions, malformed deliveries, constant
prices and guard integration without a live data source.
What SKILL.md sets; muted values are Claude Code's defaults
Other plugins' skills for the same job
9 skills in this plugin
/choosing-a-data-vendorDecide whether a data source may legally and factually serve a research question, before any fetch code is written. TRIGGER - need delisted, survivorship-free or point-in-time data and are choosing where to get it; may I store, cache, redistribute or publish what I fetched; is the free tier enough and what does a key cost; comparing vendor terms, licences, rate limits or paid tiers; "there are no delisted names on the free tier"; picking between yfinance, Tiingo, Alpha Vantage, stooq, EODHD, Norgate, CRSP or Polygon. Automated by `python -m fin_skills.data advise`. SKIP once the source is chosen and the question is how to CALL it - adjustment, timezone, calendar and off-by-one traps (market-data-sourcing); storing, partitioning or as-of joining data you already hold (market-data-engineering); EDGAR, XBRL and macro vintages (fundamental-and-macro-data); A-share sources and 退市 lists (china-ashare-data); exchange OHLCV and venue limits (crypto-data-and-execution)./corporate-actions-processingTRIGGER - spin-off, spinoff, rights issue, TERP, merger, exchange ratio, reverse split, cash in lieu, ticker change, symbol recycling, special dividend, parent price dropped on ex-date, 分拆, 配股, 并购. Reconcile event cash and share entitlements with position returns. SKIP for ordinary split/dividend price-adjustment detection (market-data-sourcing), stale prices and OHLC validation (data-quality-validation), calendars (trading-calendars-and-sessions), and survivorship-free universes (research-integrity-guards)./finding-and-searching-dataFind the identifier before you fetch it, and know which free sources can actually search. TRIGGER - "what is the FRED series id for X", "which ticker is this company", "find the CIK for", searching for a series, ticker, symbol, contract, crypto pair or filing by name or phrase; fred/series/search, company_tickers.json, EDGAR full-text search, efts.sec.gov; a guessed identifier returning an empty frame; retrieving filings by form and date range; when a document became PUBLIC versus when it was filed; earnings-call transcript timestamps. Load BEFORE guessing an identifier - three of the four free searches are current snapshots and cannot answer as of a past date. SKIP for resolving or dating an identifier you already hold (security-master-and-symbology), for choosing a price vendor (market-data-sourcing), for the point-in-time join once the data is yours (fundamental-and-macro-data), for auditing a finished result (research-integrity-guards), and for crypto venue mechanics (crypto-data-and-execution)./fundamental-and-macro-dataCompany fundamentals and macro series with correct point-in-time semantics. TRIGGER - 10-K, 10-Q, 8-K, 13F, Forms 3/4/5, filings, EDGAR, XBRL, accession number, CIK, "which CIK is this ticker", ticker-to-CIK mapping, edgartools; parsing an income statement or balance sheet out of a filing; revenue, EPS or balance-sheet history as it was known on a past date; restatements; earnings dates; or CPI, GDP, payrolls, unemployment, interest rates, FRED, ALFRED, data vintages and revisions. Load before joining ANY fundamental or macro series to prices: the obvious join is a look-ahead bug, and the SEC frames API cannot be made point-in-time. SKIP for price and OHLCV vendors (market-data-sourcing) and Chinese filings (china-ashare-data)./market-data-engineeringStore, join and parallelize market data you already hold, without corrupting it. TRIGGER - as-of join, merge_asof, join_asof, ASOF JOIN, "join quotes to trades", aligning signals to prices; reading or writing Parquet, Feather, HDF5 or CSV of market data; choosing between pandas, polars, DuckDB, pyarrow, dask or ray; a time-series store such as ArcticDB, QuestDB, ClickHouse, TimescaleDB or kdb; storing years of minute bars for thousands of tickers; a dataset too big for memory; partitioning; timestamps or timezones coming back wrong; float precision on prices or volume; "different numbers when I parallelise". SKIP for choosing a data VENDOR (market-data-sourcing) - this skill starts once the bytes are yours./market-data-sourcingChoose a market price or reference data vendor and use it without silently corrupting the numbers. TRIGGER - download, fetch, pull or load OHLCV, prices, quotes, bars or a ticker universe; compare vendors on cost, coverage or free-tier limits; need delisted US or global tickers, or a survivorship-free universe; two sources disagree; hitting 429 or rate limits; "KeyError: Adj Close"; split and dividend adjustment; trading calendars and holidays. Covers yfinance, yahooquery, defeatbeta, EODHD, Tiingo, Twelve Data, Finnhub, Alpha Vantage, Polygon/Massive, Databento, openbb, findatapy, financetoolkit, exchange_calendars, and alternative data. Also covers 美股 and global 行情数据 requests. SKIP for historical option chains (options-backtesting), Asian calendars and lot sizes (asia-pacific-markets), storing, partitioning or as-of joining data you already hold (market-data-engineering); for EDGAR filings, XBRL, CIK and macro vintages (fundamental-and-macro-data); and for A-share, 沪深 or 退市 queries (china-ashare-data)./fin-market-data:data-quality-validationfrom fin-market-data
npx claudepluginhub howard-lynn-ye/fin-rsi --plugin fin-market-data