← ClaudeAtlas

data-quality-validationlisted

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).
howard-lynn-ye/fin-skills · ★ 1 · AI & Automation · score 80
Install: claude install-skill howard-lynn-ye/fin-skills
# Data quality validation 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. ## Executable contract ✅ Implemented and executed 2026-09-14 in [data_quality.py](scripts/data_quality.py): ```python 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 volatil