Package 'SEC13Flist'

Title: Functions to Work with Official List of SEC Section 13(f) Securities and Security Identifiers
Description: Extract official list of SEC Section 13(f) securities in data processing friendly format. Extracted data could be used for analysis or export in required format using existing export functionality (in CSV, database connections, or other required format). Official list of SEC Section 13(f) securities published quarterly on SEC website <https://www.sec.gov/divisions/investment/13flists.htm> in PDF format (500+ pages) and used in mandatory quarterly reporting for financial firms. Also provides function to validate Committee on Uniform Securities Identification Procedures numbers for any security including numbers provided in SEC official list.
Authors: Yan Lyesin [aut, cre]
Maintainer: Yan Lyesin <[email protected]>
License: CC0
Version: 1.1.1
Built: 2025-02-17 06:01:14 UTC
Source: https://github.com/yanlesin/SEC13Flist

Help Index


Return valid 9-character CUSIP identifier (with checksum digit) from 8-character CUSIP identifier (without checksum digit)

Description

This function returns full CUSIP code by adding calculated checksum digit to 8-character CUSIP identifier. If supplied CUSIP identifier is not 8 characters, function returns "0"

Usage

fullCusip(s)

Arguments

s

eight-character string with CUSIP identifier

Value

String value with full 9-character CUSIP identifier, or "0" if supplied input is not 8-character CUSIP string

Examples

library(SEC13Flist)
fullCusip("B38564109") #returns zero - supplied code is not 8-character CUSIP identifier
fullCusip("B3856410") #valid CUSIP returned example

Check validity of CUSIP identifier

Description

This function check validity of CUSIP code by comparing calculated checksum digit based on first 8 characters of CUSIP code with 9th character of CUSIP code - checksum digit

Usage

isCusip(s)

Arguments

s

nine-character string with CUSIP code to validate

Value

Logical value indicating validity of CUSIP number: TRUE if CUSIP number is valid, FALSE if CUSIP number is invalid

Examples

library(SEC13Flist)
isCusip("B38564109") #invalid CUSIP example
isCusip("B38564108") #valid CUSIP example

Check validity of ISIN identifier

Description

This function check validity of ISIN code by comparing calculated checksum digit based on first 11 characters of CUSIP code with 12th character of CUSIP code - checksum digit

Usage

isIsin(isin)

Arguments

isin

twelve-character string with ISIN code to validate

Value

Logical value indicating validity of ISIN number: TRUE if ISIN number is valid, FALSE if ISIN number is invalid

Examples

library(SEC13Flist)
isIsin("US0378331009") #invalid ISIN example
isIsin("US0378331005") #valid ISIN example

Check validity of SEDOL identifier

Description

This function check validity of SEDOL code by comparing calculated checksum digit based on first 6 characters of SEDOL code with 7th character of SEDOL code - checksum digit

Usage

isSedol(s)

Arguments

s

seven-character string with SEDOL code to validate

Value

Logical value indicating validity of SEDOL number: TRUE if SEDOL number is valid, FALSE if SEDOL number is invalid

Examples

library(SEC13Flist)
isSedol("2046252") #invalid SEDOL example
isSedol("2046251") #valid SEDOL example

Official List of Section 13(f) Securities

Description

This function downloads, specified by Year and Quarter (starting from year 2004, quarter 1), official list of Section 13(f) securities from SEC website https://www.sec.gov/divisions/investment/13flists.htm, parses it and returns a data frame. If no parameters provided, function determines year and quarter based on Current List section of SEC website https://www.sec.gov/divisions/investment/13flists.htm

Usage

SEC_13F_list(YEAR_, QUARTER_, show_progress = FALSE)

Arguments

YEAR_

Numeric, Year for the SEC List

QUARTER_

Numeric, Quarter for the SEC List

show_progress

Logical, Option is not active in this build! Show progress during list parsing, default value show_progress = FALSE

Value

A data frame that contains official list of Section 13(f) securities with the following columns:

  • CUSIP: character - CUSIP number of the security included in the official list

  • HAS_LISTED_OPTION: character - An asterisk indicates that security having a listed option and each option is individually listed with its own CUSIP number immediately below the name of the security having the option

  • ISSUER_NAME: character - Issuer name

  • ISSUER_DESCRIPTION: character - Issuer description

  • STATUS: character - "ADDED" (The security has become a Section 13(f) security) or "DELETED" (The security ceases to be a 13(f) security since the date of the last list)

  • YEAR: integer - Year of the official list

  • QUARTER: integer - Quarter of the official list

Examples

## Not run: library(SEC13Flist)
SEC_13F_list_2018_Q3 <- SEC_13F_list(2018,3) #Parse list for Q3 2018 without progress indicator
SEC_13F_list_2018_Q3_ <- SEC_13F_list(2018,3,TRUE) #Parse list with progress indicator

## End(Not run)

Official List of Section 13(f) Securities from local file

Description

This function parses file with official list of Section 13(f) securities downloaded from SEC website https://www.sec.gov/divisions/investment/13flists.htm, and returns a data frame. Year and quarter of the list determined based on name of the file.

Usage

SEC_13F_list_local(path_to_13f_file)

Arguments

path_to_13f_file

character string, path to local file

Value

A data frame that contains official list of Section 13(f) securities with the following columns:

  • CUSIP: character - CUSIP number of the security included in the official list

  • HAS_LISTED_OPTION: character - An asterisk indicates that security having a listed option and each option is individually listed with its own CUSIP number immediately below the name of the security having the option

  • ISSUER_NAME: character - Issuer name

  • ISSUER_DESCRIPTION: character - Issuer description

  • STATUS: character - "ADDED" (The security has become a Section 13(f) security) or "DELETED" (The security ceases to be a 13(f) security since the date of the last list)

  • YEAR: integer - Year of the official list

  • QUARTER: integer - Quarter of the official list

Examples

## Not run: 
library(SEC13Flist)
SEC_13F_list_2018_Q4 <- SEC_13F_list_local("/Users/user_name/Downloads/13flist2020q4.pdf")
#Parse list from "Downloads" folder

## End(Not run)