panel-data-rules

Enforce lagging, date-gap, and CCM linking rules for CRSP and Compustat panel data.

58|10|Updated Apr 2, 2026
One-click install
npx skills add https://github.com/Alexander-M-Dickerson/ai-asset-pricing --skill panel-data-rules
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: panel-data-rules
Source: https://github.com/Alexander-M-Dickerson/ai-asset-pricing/tree/main/.claude/skills/panel-data-rules
Command: npx skills add https://github.com/Alexander-M-Dickerson/ai-asset-pricing --skill panel-data-rules

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

Financial data pipelines often suffer from inconsistent lagging, misaligned dates, and opaque rules around earnings and balance-sheet items. This Skill codifies best practices to ensure data quality in CRSP/Compustat panel datasets.

Core Features & Use Cases

  • Safe lagging/leading with date gap checks
  • CCM linking guidance and zero-duplicate assurance
  • BE/BEQ construction and missing value conventions
  • Handling quarterly vs annual timing and staleness filters

Quick Start

Apply these rules when preparing CRSP, Compustat, or financial panel data to ensure correct lagging, alignment, and missing-value handling.

Frequently Asked Questions about panel-data-rules

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I fix date misalignment when lagging Compustat data in panel datasets?

To fix date misalignment when lagging Compustat panel data, apply safe lagging rules with date gap checks. This ensures correct point-in-time alignment by enforcing per-source gap thresholds and verifying quarterly versus annual timing across gvkey and permno joins.

What are the best practices for CCM linking to avoid duplicate records in CRSP-Compustat joins?

The best practice for CCM linking to avoid duplicate records involves enforcing zero-duplicate assurance rules during CRSP-Compustat joins. This process validates named IDs like gvkey and permno, applying proper linking guidance to maintain data integrity.

How do I construct Book Equity (BE) and quarterly BEQ from financial panel data?

You construct Book Equity (BE) and quarterly BEQ from financial panel data by applying standardized construction rules and missing-value conventions. This includes handling quarterly versus annual timing and applying staleness filters to ensure accurate balance-sheet item calculation.

Why does my financial panel data have inconsistent results across quarterly and annual timings?

Inconsistent results across quarterly and annual timings in financial panel data usually stem from opaque earnings and balance-sheet item rules. Enforcing proper timing alignment, staleness filters, and per-source gap thresholds standardizes the dataset and resolves the misalignment.

Can I use these panel data validation rules for databases other than CRSP and Compustat?

These panel data validation rules are specifically designed for CRSP, Compustat, and related financial panel-data workflows. They enforce named IDs and gap thresholds tailored to those sources, so applying them to unrelated databases may require adjustments.

What causes missing values when merging CRSP and Compustat data using gvkey and permno?

Missing values when merging CRSP and Compustat data using gvkey and permno often result from improper CCM linking or date gaps. Enforcing zero-duplicate assurance, proper BEQ construction, and missing-value conventions during the join resolves these gaps.