Alternative Data

Edgar SEC Filings

Edgar SEC Filings

Introduction

QuantConnect hosts SEC filing data for U.S. Equities sourced directly from the SEC website. The data contains properties related to the SEC filing as well as the report contents and attachments. By law, the SEC requires publicly listed corporations to file any important investor notices (8-K), quarterly reports (10-Q), yearly reports (10-K), and various other reports that are made publicly available for investors to access.

The report contents are not parsed in any way. The contents range from plain text to XBRL structured data format. For more information about the SEC and structured data formats, please visit the SEC's Office of Structured Disclosure webpage

Usage

SEC filing data is a linked data source. This means filing data is tied to the underlying equity whenever possible. This linkage is performed by the ticker used at the time of the filing. To add the right data to your strategy, you should use the equity asset symbol when you request SEC data.

Requesting Data

// Request underlying equity data.
var aapl = AddEquity("AAPL", Resolution.Minute).Symbol;
// Add SEC 10-Q (quarterly report) filings for Apple 
AddData<SECReport10Q>(aapl);
// Add SEC 10-K (yearly report) filings for Apple
AddData<SECReport10K>(aapl);
// Add SEC 8-K (investor notices) filings for Apple
AddData<SECReport8K>(aapl);
# Request underlying equity data.
aapl = self.AddEquity("AAPL", Resolution.Minute).Symbol
# Add SEC 10-Q (quarterly report) filings for Apple
self.AddData(SECReport10Q, aapl)
# Add SEC 10-K (yearly report) filings for Apple
self.AddData(SECReport10K, aapl)
# Add SEC 8-K (investor notices) filings for Apple
self.AddData(SECReport8K, aapl)

Accessing data

Each unique data event can be accessed via Slice events. Slice events deliver the unique SEC report objects to your algorithm as they happen. Alternatively, because this is a linked data source, it is also available on the underlying security via the cache helper methods.

var reports = Securities["IBM"].Data.GetAll<SECReport10Q>();
reports = self.Securities["IBM"].Data.GetAll(SECReport10Q)

When you request data via the data cache it will always return the last SEC report object stored. You can see an example of both of these accessors in the sample code below.

using QuantConnect.Data.Custom.SEC;
namespace QuantConnect.Algorithm.CSharp
{
    public class SECDemonstration : QCAlgorithm
    {
        public override void Initialize()
        {
            SetStartDate(2019, 8, 1);
            SetCash(100000);

            // Request linked SEC report data for Apple.
            var aapl = AddEquity("AAPL", Resolution.Minute).Symbol;
            
            AddData<SECReport10Q>(aapl);
            AddData<SECReport10K>(aapl);
        }

        public override void OnData(Slice data)
        {
            // Accessing linked SEC filings from securities collection.
            // (returns a list, you can drop the "Values" from the loop below)
            //var quarterlyReports = Securities["AAPL"].Data.GetAll<SECReport10Q>();
            //var yearlyReports = Securities["AAPL"].Data.GetAll<SECReport10K>();

            // Accessing via Slice event
            var quarterlyReports = data.Get<SECReport10Q>();
            var yearlyReports = data.Get<SECReport10K>();

            foreach (var filing in quarterlyReports.Values)
            {
                // The first filer tends to be the company that is publicly listed
                Log($"Received quarterly report for company {filing.Report.Filers.First().CompanyData.ConformedName}");
            }
            foreach (var filing in yearlyReports.Values)
            {
                // The first filer tends to be the company that is publicly listed
                Log($"Received yearly report for company {filing.Report.Filers.First().CompanyData.ConformedName}");
            }
        }
    }
}
from QuantConnect.Data.Custom.SEC import *

class SECDemonstration(QCAlgorithm):
    
    def Initialize(self):
        self.SetStartDate(2019, 8, 1)
        self.SetCash(100000)

        # Request linked SEC report data for Apple.
        aapl = self.AddEquity("AAPL", Resolution.Minute).Symbol
        self.AddData(SECReport10Q, aapl)
        self.AddData(SECReport10K, aapl)

    def OnData(self, data):
        # Accessing linked SEC filings from securities collection.
        # (returns a list, you can drop the "Values" from the loop below)
        #quarterlyReports = self.Securities["AAPL"].Data.GetAll(SECReport10Q)
        #yearlyReports = self.Securities["AAPL"].Data.GetAll(SECReport10K)

        # Accessing unique SEC report objects via slice event:
        quarterlyReports = data.Get(SECReport10Q)
        yearlyReports = data.Get(SECReport10K)

        for filing in quarterlyReports.Values:
            self.Log(f"Received quarterly report for company {filing.Report.Filers[0].CompanyData.ConformedName}")

        for filing in yearlyReports.Values:
            self.Log(f"Received yearly report for company {filing.Report.Filers[0].CompanyData.ConformedName}")

Historical Data

You can request for historical custom data in your algorithm. To learn more about historical data requests, please visit the Historical Data documentation page. The following example gets SEC report 10-Q historical data using the History API.

// Request underlying equity data.
var ibm = AddEquity("IBM", Resolution.Minute).Symbol;
// Add SEC report 10-Q data for the underlying IBM asset
var earningsFiling = AddData<SECReport10Q>(ibm).Symbol;
// Request 120 days of history with the SECReport10Q IBM custom data Symbol.
var history = History<SECReport10Q>(earningsFiling, 120, Resolution.Daily);
# Request underlying equity data.
ibm = self.AddEquity("IBM", Resolution.Minute).Symbol
# Add news data for the underlying IBM asset
earningsFiling = self.AddData(SECReport10Q, ibm).Symbol
# Request 120 days of history with the SECReport10Q IBM custom data Symbol
history = self.History(SECReport10Q, earningsFiling, 120, Resolution.Daily)

Data Properties

Demonstration

The following demonstration uses QuantConnect Coarse Universe selection to add SEC custom data to a universe of assets.

About the Provider

The mission of the U.S. Securities and Exchange Commission is to protect investors, maintain fair, orderly, and efficient markets, and facilitate capital formation. The SEC oversees the key participants in the securities world, including securities exchanges, securities brokers and dealers, investment advisors, and mutual funds. The SEC is concerned primarily with promoting the disclosure of important market-related information, maintaining fair dealing, and protecting against fraud.

Pricing

Application ContextSubscription Fee
All ApplicationsFree

You can also see our Tutorials and Videos. You can also get in touch with us via Chat.

Did you find this page helpful?

Contribute to the documentation: