GuideOpen

Data Quality Checker (en)

Validate data quality in market analysis documents and blog articles before publication. Use when checking for price scale inconsistencies (ETF vs futures), instrument notation errors, date/day-of-week mismatches, allocation total errors, and unit mismatches. Supports English and Japanese content. Advisory mode -- flags issues as warnings for human review, not as blockers. {: .fs-6 .fw-300 }

Front matter
layout: default
title: "Data Quality Checker"
grand_parent: English
parent: Skill Guides
nav_order: 12
lang_peer: /ja/skills/data-quality-checker/
permalink: /en/skills/data-quality-checker/

Data Quality Checker

{: .no_toc }

Validate data quality in market analysis documents and blog articles before publication. Use when checking for price scale inconsistencies (ETF vs futures), instrument notation errors, date/day-of-week mismatches, allocation total errors, and unit mismatches. Supports English and Japanese content. Advisory mode -- flags issues as warnings for human review, not as blockers. {: .fs-6 .fw-300 }

<span class="badge badge-free">No API</span>

Download Skill Package (.skill){: .btn .btn-primary .fs-5 .mb-4 .mb-md-0 .mr-2 } View Source on GitHub{: .btn .fs-5 .mb-4 .mb-md-0 }

<details open markdown="block"> <summary>Table of Contents</summary> {: .text-delta }

  • TOC

{:toc} </details>


1. Overview

Detect common data quality issues in market analysis documents before publication. The checker validates five categories: price scale consistency, instrument notation, date/weekday accuracy, allocation totals, and unit usage. All findings are advisory -- they flag potential issues for human review rather than blocking publication.


2. When to Use

  • Before publishing a weekly strategy blog or market analysis report
  • After generating automated market summaries
  • When reviewing translated documents (English/Japanese) for data accuracy
  • When combining data from multiple sources (FRED, FMP, FINVIZ) into one report
  • As a pre-flight check for any document containing financial data

3. Prerequisites

  • Python 3.9+
  • No external API keys required
  • No third-party Python packages required (uses only standard library)

4. Quick Start

# Check a markdown file
python3 skills/data-quality-checker/scripts/check_data_quality.py \
  --file reports/weekly_strategy.md

# Run specific checks only
python3 skills/data-quality-checker/scripts/check_data_quality.py \
  --file report.md --checks price_scale,dates,allocations

# With reference date for year inference
python3 skills/data-quality-checker/scripts/check_data_quality.py \
  --file report.md --as-of 2026-02-28 --output-dir reports/

5. Workflow

Step 1: Receive Input Document

Accept the target markdown file path and optional parameters:

  • --file: Path to the markdown document to validate (required)
  • --checks: Comma-separated list of checks to run (optional; default: all)
  • --as-of: Reference date for year inference in YYYY-MM-DD format (optional)
  • --output-dir: Directory for report output (optional; default: reports/)

Step 2: Execute Validation Script

Run the data quality checker script:

python3 skills/data-quality-checker/scripts/check_data_quality.py \
  --file path/to/document.md \
  --output-dir reports/

To run specific checks only:

python3 skills/data-quality-checker/scripts/check_data_quality.py \
  --file path/to/document.md \
  --checks price_scale,dates,allocations

To provide a reference date for year inference (useful for documents without explicit year in dates):

python3 skills/data-quality-checker/scripts/check_data_quality.py \
  --file path/to/document.md \
  --as-of 2026-02-28

Step 3: Load Reference Standards

Read the relevant reference documents to contextualize findings:

  • references/instrument_notation_standard.md -- Standard ticker notation,

digit-count hints, and naming conventions for each instrument class

  • references/common_data_errors.md -- Catalog of frequently observed errors

including FRED data delays, ETF/futures scale confusion, holiday oversights, allocation total pitfalls, and unit confusion patterns

Use these references to explain findings and suggest corrections.

Step 4: Review Findings

Examine each finding in the output:

  • ERROR -- High confidence issues (e.g., date-weekday mismatches verified

by calendar computation). Strongly recommend correction.

  • WARNING -- Likely issues that need human judgment (e.g., price scale

anomalies, notation inconsistencies, allocation sums off by more than 0.5%).

  • INFO -- Informational notes (e.g., mixed bp/% usage that may be

intentional).

Step 5: Generate Quality Report

The script produces two output files:

  1. JSON report (data_quality_YYYY-MM-DD_HHMMSS.json): Machine-readable

list of findings with severity, category, message, line number, and context.

  1. Markdown report (data_quality_YYYY-MM-DD_HHMMSS.md): Human-readable

report grouped by severity level.

Present the findings to the user with explanations referencing the knowledge base. Suggest specific corrections for each issue.


6. Resources

References:

  • skills/data-quality-checker/references/common_data_errors.md
  • skills/data-quality-checker/references/instrument_notation_standard.md

Scripts:

  • skills/data-quality-checker/scripts/check_data_quality.py

Supported weekday checks

The checker accepts YYYY-MM-DD, YYYY/MM/DD, M/D and Japanese M月D日 dates followed by a weekday. Numeric dates accept English three-letter or full names (case-insensitive), or Japanese 火 / 火曜日 style labels. Use matching ASCII (Tue) or full-width (火) parentheses, optionally preceded by spaces or tabs. Japanese weekday labels also accept mixed-width parentheses for compatibility. Dates accept Unicode decimal digits, including full-width digits. Tight ranges such as 11/10(火)-11/12(水) and 12/9-12/10(金) check every dated endpoint. A year prefix written as 2025-11/10(水) is ambiguous, so the weekday is reported only when it is wrong for both that year and the inferred year. Invalid calendar dates and unrecognized labels are outside this weekday check and are skipped, not reported as valid dates. An explicit numeric year always wins. Yearless forms reuse --as-of year inference (including the existing six-month rollover), then document year, filename year, or current year. Supply --as-of for reproducible checks. Every computed mismatch is an advisory ERROR, including Japanese forms that previously produced WARNING. Findings still leave the CLI exit status 0.

Source: https://github.com/tradermonty/claude-trading-skills/blob/main/docs/en/skills/data-quality-checker.md

Author: tradermonty, Trading skills. License: MIT.

Shown here with formatting for the web. Keep the author and license notice when you reuse it.

Related entries

There are more like this in the members library

The Claude Code library holds 13,843 entries. Members can search all of them by meaning and read every one in full.