Command Palette

Search for a command to run...

UnylyUnyly
Назад к скиллам

crsp-v2

БесплатноЗапускает вложенные скриптыНе проверен

Use when "CRSP CIZ", "CRSP v2", "CRSP flat file format 2.0", "crsp.dsf_v2 / msf_v2", "StkDlySecurityData", "StkMthSecurityData", "StkSecurityInfoHist"…

edwinhuот edwinhu★ 28 звёзд на GitHub

Об этом скилле

What this skill carries — grep references/ for any subject the names below miss: !d=${CLAUDE_SKILL_DIR}; command -v skill-toc >/dev/null 2>&1 && exec skill-toc "$d"; s=$HOME/.claude/skills/plugin-utils/bin/skill-toc; [ -x "$s" ] && exec "$s" "$d"; echo "(skill-toc unavailable: references and scripts are NOT listed here — install the plugin-utils plugin, or start a new session so its bin/ reaches PATH)"

Contents

Format Enforcement

IRON LAW: NO LEGACY SIZ TABLE FOR ANY DATA AFTER 2024-12-31

CRSP's legacy Stock & Indexes Flat File Format 1.0 (SIZ) was **discontinued after the December 2024 data release**. The legacy tables still exist on WRDS and still answer queries — they just stop.

Verified on WRDS PostgreSQL:

Table Format max(date)
crsp.dsf legacy SIZ 2024-12-31
crsp.stkdlysecurityprimarydata CIZ 2025-12-31
crsp.stkmthsecuritydata CIZ 2025-12-31
  • SELECT ... FROM crsp.dsf WHERE date >= '2025-01-01' → WRONG. Returns zero rows, silently.
  • SELECT ... FROM crsp.msf WHERE date >= '2025-01-01' → WRONG. Same silent truncation.
  • SELECT ... FROM crsp.stkdlysecurityprimarydata → CORRECT.

A legacy query does not error when it runs off the end of the data. It returns a short panel, the regression runs, and the sample period is quietly wrong.

Handing back a silently truncated panel is not helpful — it is worse than an error, because the user ships it. You reach for crsp.dsf because the legacy names are in your weights and in every paper you have read. The weights are stale. Confirm the format before writing the first SELECT.

Red Flags — STOP Immediately If You're About To:

  • Write crsp.dsf, crsp.msf, crsp.dse, crsp.dsedelist, or crsp.stocknames → STOP. Legacy SIZ, frozen at 2024-12-31. Use the CIZ table (references/tables.md).
  • Write WHERE shrcd IN (10,11) → STOP. shrcd does not exist in CIZ. Five columns replace it (below).
  • Write WHERE exchcd IN (1,2,3) → STOP. exchcd does not exist in CIZ. Use primaryexch.
  • Write abs(prc) or WHERE prc > 0 → STOP. CIZ prices are always positive. Use dlyprcflg.
  • Add a delisting return to dlyret/mthret → STOP. CIZ already embeds it. You are double-counting.
  • Assume mthret reproduces legacy ret → STOP. Different methodology (compounded daily). See references/known-differences.md.
  • Guess what a flag value means → STOP. references/flags.md has all 774 values; crsp.metaflaginfo is live.
  • Substitute comp.secd (or any Compustat price table) because CIZ ran out at 2025-12-31 → STOP. Use the crsp-lseg-splice skill. secd carries no delisting returns, null trfd on ~48% of firm-days, and ajexdi that goes stale through corporate actions (one gvkey prints +17,700% on an unadjusted reverse split). It also applies none of CIZ's universe screens, so its cross-section is not comparable: measured on one event-study design, swapping CRSP for secd left Delaware flat at ~2,075 firms while doubling non-Delaware from 968 to 1,923.

Format Facts

  • The CIZ format shipped in July 2022 and became the only updated format in February 2025 (December 2024 data was the last SIZ release). Both formats sit in the same crsp schema in Postgres and the same crsp library in SAS — the schema name does not tell you which format you are in. The table name does. Reporting "I queried the crsp schema, so this is v2 data" is an unverified claim presented as fact.
  • WRDS-built convenience tables keep their legacy names with a _v2 suffix: crsp.dsf_v2, crsp.msf_v2, crsp.stocknames_v2. CRSP-built tables use the new CIZ names (crsp.stkdlysecuritydata). Both are CIZ; the _v2 ones are pre-joined and wider. Treating the absence of a _v2 suffix as evidence a table is legacy sends you back to the frozen data.
  • On the WRDS Cloud filesystem, SIZ stays at /wrds/crsp/sasdata/a_stock and CIZ is at /wrds/crsp/sasdata/a_stock_v2.
  • Column names carry their frequency as a prefix: Dly, Mth, Qtr, Ann. There is no frequency-agnostic ret or prc in CIZ — DlyRet and MthRet are different columns in different tables, not the same column read from two files.
  • The 62 suffix (crsp.stkdlysecuritydata62) is the 1962-start subset product; the _ind suffix (crsp.stkindmembership_ind) is the full Index database. Stock-only products carry just 4 ind
Полный SKILL.md на GitHub

Установить crsp-v2 в Claude Code и Claude Desktop

Зарегайся, чтобы установить скилл

Создай бесплатный аккаунт, чтобы открыть команду установки и сохранить скилл в библиотеку.

  • Открой команду установки в одну строку
  • Сохраняй скиллы в синхронизируемую библиотеку
  • Уведомления, когда скиллы обновляются
Зарегаться бесплатноУ меня уже есть аккаунт

Разрешённые инструменты

Инструменты, которые скиллу разрешено вызывать.

Без ограничений — скилл может использовать любой инструмент.

Вложенные файлы

examples/ciz_panel.pyreferences/flags.mdreferences/indexes.mdreferences/known-differences.mdreferences/queries.mdreferences/siz-to-ciz.mdreferences/tables.md

FAQ

Что делает скилл crsp-v2?

Use when "CRSP CIZ", "CRSP v2", "CRSP flat file format 2.0", "crsp.dsf_v2 / msf_v2", "StkDlySecurityData", "StkMthSecurityData", "StkSecurityInfoHist", "stocknames_v2", "DlyRet / MthRet / DlyPrc / MthPrc", "SHRCD or EXCHCD equivalent in new CRSP", "SIZ to CIZ migration", "CRSP data after 2024", "CRSP delisting returns", "CRSP cumulative adjustment factors", "CRSP index INDNO / INDFAM", or any CRSP stock/index query where the legacy SIZ column names no longer exist.

Как установить скилл crsp-v2?

Скопируй папку скилла в ~/.claude/skills (вкладка Claude Code выше делает это одной командой), либо поставь как плагин.

Скилл crsp-v2 запускает скрипты?

Да, скилл несёт исполняемые скрипты. Проверь исходник перед установкой.

Похожие скиллы

Сравнить crsp-v2 с