Identifier Types
WRDSMerger.AbstractIdentifierWRDSMerger.CIKWRDSMerger.CusipWRDSMerger.Cusip6WRDSMerger.FirmIdentifierWRDSMerger.GVKeyWRDSMerger.IbesTickerWRDSMerger.NCusipWRDSMerger.NCusip6WRDSMerger.PermcoWRDSMerger.PermnoWRDSMerger.RPEntityWRDSMerger.SecIDWRDSMerger.SecurityIdentifierWRDSMerger.Ticker
WRDSMerger.AbstractIdentifier — TypeSupertype for all Firm Identifiers
Firm Identifiers
WRDSMerger.FirmIdentifier — TypeA FirmIdentifier specifies a specific firm over a given date range and is opposed to a SecurityIdentifier. In a standard database, a single FirmIdentifier can have multiple SecurityIdentifiers but a SecurityIdentifier should only have one FirmIdentifier.
WRDSMerger.GVKey — TypeGVKey <: FirmIdentifier
GVKey(s::Union{<:Real, <:AbstractString})::GVKey
GVKey(x::AbstractIdentifier, d::Date)::StringGVKey is the primary identifier in the Compustat universe It only contains numeric values, though is often represented as a string with 6 digits, therefore, it is stored as a String.
Example
julia> GVKey(2968) # GVKey for Chase
GVKey("002968")
julia> GVKey("002968")
GVKey("002968")
julia> GVKey(Permno(47896), Date(2020))
"002968"WRDSMerger.CIK — TypeCIK <: FirmIdentifier
CIK(s::Union{<:Real, <:AbstractString})::CIK
CIK(x::AbstractIdentifier, d::Date)::StringCIK is a common identifier outside of WRDS It only contains numeric values, though is often represented as a string with 10 digits, therefore, it is stored as a String.
Example
julia> CIK(19617) # CIK for Chase
CIK("0000019617")
julia> CIK("0000019617")
CIK("0000019617")
julia> CIK(GVKey(2968), Date(2020))
"0000019617"
julia> CIK(GVKey(2968)) # Date for GVKey <-> CIK is unnecessary
"0000019617"WRDSMerger.Permco — TypePermco <: FirmIdentifier
Permco(x::Real)::Permco
Permco(x::AbstractIdentifier, d::Date)::IntPermco is the primary firm identifier in the CRSP universe.
Example
julia> Permco(20436) # Permco for Chase
Permco(20436)
julia> Permco(NCusip6("46625H"), Date(2020))
20436WRDSMerger.Cusip6 — TypeCusip6 <: FirmIdentifier
Cusip6(s::AbstractString)::Cusip6
Cusip6(x::Cusip)::Cusip6
Cusip6(x::AbstractIdentifier, d::Date)::StringCusip6 is the firm identifier component of Cusip. It can contain numbers or letters (with a maximum length of 6 characters).
Cusip6 is different than NCusip6. The standard in CRSP (and some other WRDS datasets) is that Cusip6 represents the most recently available NCusip6 for a given firm, while NCusip6 will provide a historical view of that firm.
Example
julia> Cusip6("46625H") # Cusip6 for Chase
Cusip6("46625H")
julia> Cusip6(Cusip("46625H10")) # Cusip6 is the first 6 digits of a Cusip
Cusip6("46625H")
julia> Cusip6(Permno(47896), Date(2020))
"46625H"Related to the note on the difference between Cusip6 and NCusip6:
julia> Cusip6(Permno(47896), Date(2020))
"46625H"
julia> NCusip6(Permno(47896), Date(2020))
"46625H"
julia> Cusip6(Permno(47896), Date(1998))
"46625H"
julia> NCusip6(Permno(47896), Date(1998))
"16161A"WRDSMerger.NCusip6 — TypeNCusip6 <: FirmIdentifier
NCusip6(s::AbstractString)::NCusip6
NCusip6(x::NCusip)::NCusip6
NCusip6(x::AbstractIdentifier, d::Date)::StringNCusip6 is the firm identifier component of NCusip. It can contain numbers or letters (with a maximum length of 6 characters).
NCusip6 is different than Cusip6. The standard in CRSP (and some other WRDS datasets) is that Cusip6 represents the most recently available NCusip6 for a given firm, while NCusip6 will provide a historical view of that firm.
Example
julia> NCusip6("46625H") # NCusip6 for Chase
NCusip6("46625H")
julia> NCusip6(NCusip("46625H10")) # NCusip6 is the first 6 digits of a Cusip
NCusip6("46625H")
julia> NCusip6(Permno(47896), Date(2020))
"46625H"Related to the note on the difference between Cusip6 and NCusip6:
julia> Cusip6(Permno(47896), Date(2020))
"46625H"
julia> NCusip6(Permno(47896), Date(2020))
"46625H"
julia> Cusip6(Permno(47896), Date(1998))
"46625H"
julia> NCusip6(Permno(47896), Date(1998))
"16161A"WRDSMerger.RPEntity — TypeRPEntity <: FirmIdentifier
RPEntity(x::String)::RPEntity
RPEntity(x::AbstractIdentifier, d::Date)::StringRPEntity is used within RavenPack to identify different entities.
Example
julia> RPEntity("619882") # RPEntity for Chase
RPEntity("619882")
julia> RPEntity(NCusip6("46625H"), Date(2020))
"619882"
julia> NCusip6(RPEntity("619882"), Date(2020))
"46625H"The RavenPack links are especially messy, for example, there are two links for RPEntity -> NCusip6 from 2001-01-01 - 2001-05-31, and there is not easy way to distinguish these. This package simply returns the first value in such cases
julia> RPEntity(NCusip6("46625H"), Date(2001, 3))
"619882"
julia> RPEntity(NCusip6("616880"), Date(2001, 3))
"619882"
julia> NCusip6(RPEntity("619882"), Date(2001, 3))
"46625H"Security Identifiers
WRDSMerger.SecurityIdentifier — TypeA SecurityIdentifier specifies a specific firm over a given date range and is opposed to a FirmIdentifier. In a standard database, a single FirmIdentifier can have multiple SecurityIdentifiers but a SecurityIdentifier should only have one FirmIdentifier.
WRDSMerger.Permno — TypePermno <: SecurityIdentifier
Permno(x::Real)::Permno
Permno(x::AbstractIdentifier, d::Date)::IntPermno is the primary security identifier in the CRSP universe, it is also one of the most common methods of linking between databases since it is easy to find links to Cusip and Compustat (GVKey), and Cusip.
Example
julia> Permno(47896) # Permno for Chase
Permno(47896)
julia> Permno(NCusip6("46625H"), Date(2020))
47896WRDSMerger.Cusip — TypeCusip <: SecurityIdentifier
Cusip(s::AbstractString)::Cusip
Cusip(issuer::AbstractString, issue::AbstractString, checksum=nothing)::Cusip
Cusip(x::AbstractIdentifier, d::Date)::StringCusip is a common identifier within and outside of WRDS WRDS tracks older Cusips as NCusip all Cusips are made up of 3 parts, issuer (first 6 characters), issue (next 2 characters), and a checksum most databases in WRDS only use the 8 characters. If 9 digits are passed or the checksum is explicitly passed, the checksum is validated and a warning is given if it is an invalid checksum.
Cusip is different than NCusip. The standard in CRSP (and some other WRDS datasets) is that Cusip represents the most recently available NCusip for a given firm, while NCusip will provide a historical view of that firm.
Cusip only stores 8 characters (not the checksum digit) and, by default, only returns those 8 characters. This means that if using a join function on a set of Cusips with 9 characters and the default output, there will be no matches. It is easiest to shorten the 9 digit Cusips to 8 digits before joining.
Example
julia> Cusip("46625H10") # Cusip for Chase
Cusip("46625H10")
julia> Cusip("46625H", "10") # can also provide the parts separately
Cusip("46625H10")
julia> Cusip(Permno(47896), Date(2020))
"46625H10"Related to the note on the difference between Cusip and NCusip:
julia> Cusip(Permno(47896), Date(2020))
"46625H10"
julia> NCusip(Permno(47896), Date(2020))
"46625H10"
julia> Cusip(Permno(47896), Date(1998))
"46625H10"
julia> NCusip(Permno(47896), Date(1998))
"16161A10"WRDSMerger.NCusip — TypeNCusip <: SecurityIdentifier
NCusip(s::AbstractString)::NCusip
NCusip(issuer::AbstractString, issue::AbstractString, checksum=nothing)::NCusip
NCusip(x::AbstractIdentifier, d::Date)::StringNCusip is a common identifier within and outside of WRDS WRDS tracks the most recent NCusips as Cusip all NCusips are made up of 3 parts, issuer (first 6 characters), issue (next 2 characters), and a checksum most databases in WRDS only use the 8 characters. If 9 digits are passed or the checksum is explicitly passed, the checksum is validated and a warning is given if it is an invalid checksum.
NCusip is different than Cusip. The standard in CRSP (and some other WRDS datasets) is that Cusip represents the most recently available NCusip for a given firm, while NCusip will provide a historical view of that firm.
NCusip only stores 8 characters (not the checksum digit) and, by default, only returns those 8 characters. This means that if using a join function on a set of NCusips with 9 characters and the default output, there will be no matches. It is easiest to shorten the 9 digit NCusips to 8 digits before joining.
Example
julia> NCusip("46625H10") # NCusip for Chase
NCusip("46625H10")
julia> NCusip("46625H", "10") # can also provide the parts separately
NCusip("46625H10")
julia> NCusip(Permno(47896), Date(2020))
"46625H10"Related to the note on the difference between Cusip and NCusip:
julia> Cusip(Permno(47896), Date(2020))
"46625H10"
julia> NCusip(Permno(47896), Date(2020))
"46625H10"
julia> Cusip(Permno(47896), Date(1998))
"46625H10"
julia> NCusip(Permno(47896), Date(1998))
"16161A10"WRDSMerger.Ticker — TypeTicker <: SecurityIdentifier
Ticker(s::AbstractString)::Ticker
Ticker(x::AbstractIdentifier, d::Date)::StringTicker is a stock market ticker that is often seen on the NYSE or other exchanges. It typically consists of 1-4 characters.
Ticker should be kept distinct from IbesTicker. IbesTicker is within the IBES database and often differs from Ticker.
Example
julia> Ticker("JPM") # Ticker for Chase
Ticker("JPM")
julia> Ticker(Permno(47896), Date(2020))
"JPM"WRDSMerger.IbesTicker — TypeIbesTicker <: SecurityIdentifier
IbesTicker(s::AbstractString)::IbesTicker
IbesTicker(x::AbstractIdentifier, d::Date)::StringIbesTicker is the primary identifier in the IBES universe and typically consists of 1-4 characters.
Example
julia> IbesTicker("CHL") # IbesTicker for Chase
IbesTicker("CHL")
julia> IbesTicker(Permno(47896), Date(2020))
"CHL"WRDSMerger.SecID — TypeSecID <: SecurityIdentifier
SecID(x::Real)::SecID
SecID(x::AbstractIdentifier, d::Date)::IntSecID is the primary identifier within the OptionMetrics database.
julia> SecID(102936) # SecID for Chase
SecID(102936)
julia> SecID(NCusip("46625H10"), Date(2020))
102936