Skip to content

cusip._alphabet is too restrictive: prevents matching valid CUSIPs #337

Closed
@thomkav

Description

@thomkav

The cusip module's is_valid function returns false for a CUSIP that I would expect would pass, as I found it on a real Fidelity statement (see screenshot of document sample).

cusip.is_valid(`FDIC99425`)
>> False

I believe this is because cusip._alphabet does not permit "I" or "O":

cusip._alphabet
>> '0123456789ABCDEFGH JKLMN PQRSTUVWXYZ*@#'

Screen Shot 2022-10-16 at 11 50 45 AM

I checked cusip.com and I didn't find anything indicating that those two characters were not allowed.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions