Downloads the WRDS-provided linking table that maps IBES tickers to CRSP PERMNOs with valid date ranges and match quality scores.
Arguments
- wrds
A
DBIConnectionobject returned bywrds_connect().- max_score
Maximum match quality score to include. Defaults to
5, which excludes score 6 (the worst matches). Lower scores indicatebetter matches:
1: Best match (CUSIP, ticker, and company name all match)2-5: Progressively weaker matches6: Worst match (excluded by default)
- n
Maximum number of rows to return. Defaults to
Inf(all rows). Use a smaller value (e.g.,n = 100) to preview data before downloading the full table.- lazy
If
TRUE, returns a lazytblinstead of collecting. Defaults toFALSE.
Value
A tibble with columns:
- ticker
IBES ticker
- permno
CRSP permanent security identifier
- sdate
Start date of the link
- edate
End date of the link
- score
Match quality score (1 = best, 6 = worst)
Details
The linking table comes from wrdsapps_link_crsp_ibes.ibcrsphist.
To use the link, join on ticker and ensure your observation date falls
within the sdate to edate range.
References
WRDS IBES-CRSP Linking Table Documentation: https://wrds-www.wharton.upenn.edu/documents/796/IBES_CRSP_Linking_Table_by_WRDS.pdf
Examples
if (FALSE) { # \dontrun{
wrds <- wrds_connect()
ibes_link <- link_ibes_crsp(wrds)
# Join with IBES data on ticker and date range
ibes_data |>
dplyr::inner_join(ibes_link, by = dplyr::join_by(ticker)) |>
dplyr::filter(date >= sdate, date <= edate)
wrds_disconnect(wrds)
} # }