Understanding and Parsing 13F Reports: A Comprehensive Guide for Investors


For private and professional investors, understanding and analyzing 13F reports is crucial for gaining insights into the investment strategies of institutional investors. In this comprehensive guide, we will walk you through the process of fetching, parsing, and analyzing 13F reports filed by institutional investors with the United States Securities and Exchange Commission (SEC).

If you have any questions or would like to share your insights, feel free to reach out to us at [email protected].

Step One: Finding the CIK Number

The United States Securities and Exchange Commission (SEC) mandates institutional investors to file a 13F report every quarter if their holdings in securities from the official list of 13F securities exceed 100 million USD. Companies are assigned a CIK (Central Index Key) number, which is associated with each report they file. To locate a company's CIK number, we utilize the CIK Lookup tool provided by the SEC. For instance, by searching for Punch Card Capital, we can find that the company's CIK number is 0001631664.

Step Two: Retrieve the 13F Reports

Using the CIK number, we can search for all reports filed by Punch Card Capital. We conduct this search by accessing the Fast Search page on our browser. Enter the CIK number, such as 0001631664, and click Search.

The results may include reports that are irrelevant to us. To obtain a list of solely 13F reports, input 13F-HR in the Report Type field and click the Search button again. The search results will now display all 13F reports that Punch Card Capital has submitted to the SEC.

To simplify report retrieval, we can output the search results in XML format, which can be parsed programmatically. Click on the RSS Feed link to obtain the list of 13F reports as an XML document.

We then need to identify the ID and URL of each 13F report, which are enclosed by an XML element named entry:


In this example, the 13F report's accession number is 0001398344-14-005931, which serves as the unique identifier for Punch Card Capital's 13F report for the third quarter of 2014. The 13F report's contents can be viewed by accessing the URL listed in the "filing-href" element:

In the next steps, we will explain how we download and parse these two documents.

Step Three: Download XML Data

An XML version of the 13F report, containing both the primary document and the information table, can be found by modifying the URL we found in step two of this guide.

Before modification, the URL looks like this: http://www.sec.gov/Archives/edgar/data/1419050/000139834414005931/0001398344-14-005931-index.htm

The URL of the XML version uses the same format. We only need to replace "-index.htm" with ".txt": http://www.sec.gov/Archives/edgar/data/1419050/000139834414005931/0001398344-14-005931.txt

After downloading the document we can proceed with extracting information from it, in other words, parsing the document.

Step Three: Identifying and Downloading XML Data

Each 13F report in the XML format has an ID and URL enclosed in an "entry" element. The accession number serves as the unique identifier for the report. To download an XML version of the 13F report, modify the URL found in the "filing-href" element by replacing "-index.htm" with ".txt". After downloading the document, you can proceed to parse and extract the relevant information.

Step Four: Parsing the 13F Report

The downloaded file contains three top-level elements: the header, the primary document, and the information table. Each of these elements must be extracted and parsed separately. The header includes information about the filing date and the filer, while the primary document contains basic information about the report, such as the filing quarter and whether it is a new report or an amendment to a previously filed 13F report. The information table, enclosed by the "informationTable" element, consists of the detailed list of holdings.

The 13F Header

The header contains information about when the report was filed and who filed the report. The content is not valid XML. However, we can parse and extract information by using regular expressions.

<SEC-HEADER>0001398344-14-005931.hdr.sgml : 20141114
  ACCESSION NUMBER:     0001398344-14-005931
  FILED AS OF DATE:     20141114
  DATE AS OF CHANGE:        20141114
  EFFECTIVENESS DATE:       20141114

The 13F Primary Document

The primary document enclosed by the edgarSubmission element contains basic information about the report, including which quarter it was filed and information about whether this is a new report or an amendment to a previously filed 13F report.

  <amendmentType>NEW HOLDINGS</amendmentType>

An amendment type of NEW HOLDINGS means the holdings are added to the holdings reported in the 13F report that was reported before this one.

An amendment type of RESTATEMENT means all the previously reported holdings for this quarter are invalid and this report contains the restated holdings.

The 13F Information Table

We can find the holdings by searching for all elements named infoTable. These are enclosed by the informationTable element:

    <nameOfIssuer>BERKSHIRE HATHAWAY INC DEL</nameOfIssuer>
    <titleOfClass>CL A</titleOfClass>
    <nameOfIssuer>WELLS FARGO &amp; CO NEW</nameOfIssuer>
    <titleOfClass>*W EXP 10/28/201</titleOfClass>

Each infoTable element consists of the following subelements of which some are optional:

XML element Description
nameOfIssuer Name of security
titleOfClass Type of security, e.g., class A shares
cusip The security's CUSIP number
value The market value of the holding in thousands
sshPrnamt Total number of shares of the specified security
sshPrnamtType SH = shares, PRN = principal amount
investmentDiscretion SOLE, DFND (shared defined), or OTR (shared other)
putCall Empty, PUT, or CALL
otherManager Other managers on whose behalf these holdings are being reported
votingAuthority Number of shares for which the manager exercises shared, sole, or no voting authority


In summary, these are the steps we follow here at [email protected] to download and parse 13F reports:

  • Step one: Find the company's CIK number
  • Step two: Fetch a list of the company's 13F reports
  • Step three: Download an XML version of the 13F report
  • Step four: Parse the 13F reports

Send us an email at [email protected] if you have any questions or want to discuss how to download and parse 13F reports

In our next article, How to Analyze 13F Reports we will delve into the steps we follow when analyzing a 13F report in greater detail.