edgartools icon indicating copy to clipboard operation
edgartools copied to clipboard

Add Method to Determine Company Filer Status (Domestic, Foreign, Canadian)

Open amcamc92 opened this issue 11 months ago • 5 comments

Feature Category

  • [X] New API functionality
  • [ ] Performance improvement
  • [ ] Developer experience improvement
  • [ ] Documentation enhancement
  • [ ] Tool/utility addition

Problem Statement

Is your feature request related to a problem? Please describe. Yes. For any automated financial analysis pipeline, it is essential to first identify a company's filer status to know which set of documents to parse (e.g., 10-K for domestic companies, 20-F for foreign, 40-F for Canadian). These different forms often align with different accounting standards (US GAAP vs. IFRS) and reporting schedules.

Currently, EdgarTools users must manually implement logic to determine this status. This typically involves fetching multiple lists of filings for different form types (10-K, 20-F, 40-F) and comparing their recency to make a determination. This is boilerplate code that nearly every advanced user needs to write and maintain, and it can be tricky to handle edge cases, such as companies that change their filing status.

Who would benefit from this feature?

  • [ ] Beginner Python users working with SEC filings
  • [X] Financial analysts and researchers
  • [X] Advanced developers building financial applications
  • [X] Data scientists working with financial datasets

Proposed Solution

Describe the solution you'd like I propose that the Company object be enhanced with a new method or attribute that provides a clear, standardized filer status. For example:

   status = company.get_filer_status()  # -> "Domestic", "Foreign", or "Canadian"

This method would encapsulate the logic for determining the filer type based on the primary annual reports filed by the company.

Proposed Algorithm:

The determination should be based on the most recent primary annual report filed:

  1. Fetch the latest filings for 10-K (Domestic), 20-F (Foreign), and 40-F (Canadian).
  2. Compare the filing dates of the most recent report of each type.
  3. The status should correspond to the type of the most recently filed annual report. * If the latest is a 40-F, the status is "Canadian". * If the latest is a 20-F, the status is "Foreign". * If the latest is a 10-K, the status is "Domestic".
  4. If a company has never filed any of these, it could return None or "Unknown".

This approach correctly handles companies that may have historically filed one type of report but have since changed their status (e.g., a foreign company that "domesticates" and begins filing 10-Ks).

Describe alternatives you've considered A clear and concise description of any alternative solutions or features you've considered. The only alternative is the current situation, where each user must implement this logic manually. This is inefficient and can lead to inconsistent results across different applications that use EdgarTools.

Use Case Example

How would you use this feature?

from edgar import Company
company = Company("AAPL")
status = company.get_filer_status() # The proposed new method

if status == "Domestic":
# Process 10-K
elif status == "Foreign":
# Process 20-F
elif status == "Canadian":
# Process 40-F
else:
# do other stuff

Implementation Considerations

Complexity Level:

  • [ ] Simple (minor API addition)
  • [X] Moderate (new functionality with existing patterns)
  • [ ] Complex (significant architectural changes)

Backwards Compatibility:

  • [X] This feature maintains backwards compatibility
  • [ ] This feature might break existing code (please explain below)
  • [ ] Unsure about compatibility impact

Additional Context

Add any other context, screenshots, or examples about the feature request here.

Related Issues/Features:


Feature requests are evaluated based on EdgarTools' core principles: Simple yet powerful, accurate financials, beginner-friendly, and joyful UX.

amcamc92 avatar Dec 28 '25 14:12 amcamc92

Priority Assessment: MEDIUM (P2)

Priority Score: 53.3 (HIGH by formula - excellent feature!)
Target Release: v5.7.0 or v5.8.0
Estimated Timeline: 4-12 hours implementation (0.75 days)


Decision Rationale

Thank you for another excellent feature request, @amcamc92! Your systematic approach to company classification (both this issue and #561) demonstrates strong understanding of real-world financial analysis needs.

Why HIGH Priority Score (53.3):

  • ✅ User Value (4/5): Fills genuine API gap, removes "boilerplate code that nearly every advanced user needs to write"
  • ✅ Feasibility (5/5): Clear implementation path using existing EdgarTools functionality
  • ✅ Low Effort (0.75 days): Single method addition with straightforward logic
  • ⚠️ Urgency (2/5): Enhancement (not blocking, workaround exists)

Classification: MEDIUM Priority (P2) for strategic reasons:

  • Advanced use case (benefits pipeline builders, not beginners)
  • Complementary to Issue #561 (business categorization)
  • Recommend implementing #562 first (simpler, more immediately useful)

Enhanced Algorithm (Incorporating state_of_incorporation)

Great insight about using state_of_incorporation! This significantly improves the implementation:

def get_filer_status(self, as_of_date: Optional[date] = None) -> str:
    """
    Determine company's SEC filer status.
    
    Returns "Domestic" (10-K), "Foreign" (20-F), "Canadian" (40-F), or "Unknown"
    based on state of incorporation and most recent annual report filings.
    """
    # Primary Signal: Check state_of_incorporation (fast lookup)
    if self.state_of_incorporation:
        if self.state_of_incorporation in US_STATES:
            # Likely Domestic, but verify with filings
            pass
        elif self.state_of_incorporation in ['Canada'] + CANADIAN_PROVINCES:
            # Likely Canadian
            pass
        else:
            # Likely Foreign
            pass
    
    # Verification Signal: Check most recent annual report filing
    # Fetch latest 10-K, 20-F, 40-F and compare dates
    # Return status based on most recent filing

Advantages of this approach:

  • ✅ Fast: Uses state_of_incorporation first (no filing fetch for common case)
  • ✅ Accurate: Verified with actual filing history
  • ✅ Robust: Detects edge cases (e.g., Canadian incorporation but filing 10-K)
  • ✅ Handles transitions: Companies changing filing status over time

Strategic Alignment

Excellent alignment with EdgarTools principles:

  • ✅ Simple yet powerful: Single method (company.get_filer_status()) hides complex multi-signal logic
  • ✅ Joyful UX: Removes boilerplate code burden you described
  • ✅ Accurate financials: Helps users apply correct accounting standards (US GAAP vs IFRS)
  • ⚠️ Advanced use case: Primary beneficiaries are financial analysts/researchers (not beginners)

Next Steps

  1. Tracking: Created Beads issue edgartools-l85p with priority P2 and external reference to this GitHub issue
  2. Roadmap: Added to "Under Consideration for v5.7.0+" section with enhanced algorithm
  3. Relationship to #561: Both issues address company classification. Recommend implementing #562 first (simpler, clearer immediate value), then evaluating #561.
  4. Timeline: Subject to roadmap capacity and current committed work

Questions for Discussion

  1. Return Type: Would you prefer string ("Domestic") or enum (FilerStatus.DOMESTIC) for type safety?
  2. Caching: Should filer status be cached or recomputed on each call?
  3. Historical Status: Is as_of_date parameter useful for your use case (companies changing status over time)?
  4. Inconsistency Handling: Should we expose inconsistencies between state_of_incorporation and filing type? (e.g., warning or separate method)
  5. Edge Cases: Any specific scenarios beyond the ones described?

Status: Accepted for consideration. Will be evaluated alongside Issue #561 for coordinated implementation planning.

Thank you for the systematic approach to improving EdgarTools' company classification capabilities!


Tracking:

  • Beads Issue: edgartools-l85p
  • Priority: P2 (MEDIUM)
  • Target Release: v5.7.0 or v5.8.0 (Q1 2026)
  • Estimated Effort: 0.75 days (S size)

dgunning avatar Dec 29 '25 00:12 dgunning

Thank you @dgunning for reviewing this. My thoughs to your questions:

1. Return Type:

  • Use a string-based Enum.
  • Why: It removes ambiguity from repeated literal labels and reduces human error, while remaining compatible with systems that treat the status as a text attribute.

2. Caching

  • Yes, cache it. But it should be updated somehow over time.
  • Why: Filer status is a stable property that changes infrequently. Avoiding repeated IO or network lookups improves consistency and efficiency without sacrificing accuracy.

3. Historical Status Support

  • Optional, but reasonable.
  • Why: The “current” status is what matters for most decisioning, but having an as-of reference date can enable correct historical labeling when needed for backtesting or time-based analysis.

4. Inconsistency Handling

  • Log a warning, don’t fail.
  • Why: Filing behavior usually aligns with legal status, but exceptions exist. A warning preserves data quality awareness without treating mismatches as pipeline-breaking errors.

5. Edge Cases

  • FPI filing 10-K: Legally foreign, but operationally domestic for market screening or index eligibility.
  • Transition years: Overlapping form types can occur; resolve by effective date, not assumptions.
  • SPACs/Shells: May lack filings early on; absence is a valid state, not necessarily an error.

amcamc92 avatar Dec 29 '25 16:12 amcamc92

@dgunning After I debug issues with some US stocks, I was coming to exactly this same point. I agree with @amcamc92, this improvement would be significant and it impacts more than just Advanced users. If I invest in very common stocks (NVO, NICE, TSM, etc) the logic would be required - and actually improves the experience for less advanced users. I am looking forward to this enhancement!

miruddfan avatar Jan 01 '26 15:01 miruddfan

Hi @dgunning

Thanks for the implementation. Still, I think the logic is not complete as there are 955 out of 7947 company with empty registers when asking for the filer_type property.

Should I open another bug report?

These are some examples:

Symbol Name CIK Sector Category Filing Type
AAUAF Almaden Minerals Ltd 1015647 Metal Mining Unknown  
ABBNY Abb Ltd 1091587 Electronic And Other Electrical Equipment Unknown  
ABCP Ambase Corp 20639 Real Estate Operating Company
ABSI Absci Corp 1672688 Engineering Accounting Research Management Services Operating Company
ACCL Acco Group Holdings Ltd 2038378 Engineering Accounting Research Management Services Unknown  
ACCS Access Newswire Inc 843006 Engineering Accounting Research Management Services Operating Company
ACGL Arch Capital Group Ltd 947484 Insurance Carriers Insurance Company
ACHR Archer Aviation Inc 1824502 Transportation Equipment Operating Company
ACP Abrdn Income Credit Strategies Fund 1503290 - Closed-End Fund
ACRV Acrivon Therapeutics Inc 1781174 Chemicals And Allied Products Operating Company
ADOOY Adaro Energy Pt Adr 1489079 Private Households Unknown  
ADTN Adtran Holdings Inc 926282 Electronic And Other Electrical Equipment Operating Company
ADV Advantage Solutions Inc 1776661 Business Services Operating Company
ADYYF Adyen N V Adr 1788707 - Unknown  
ADZCF Deutsche Bank Aktiengesellschaft 1159508 Depository Institutions Bank  
AEBMF Anadolu Efes Biracilik Ve Malt Sanayi A S Adr 1174511 Private Households Unknown  
AERT Aeries Technology Inc 1853044 Engineering Accounting Research Management Services Operating Company
AFA Farlong Holding Corp 2054964 Chemicals And Allied Products Unknown  
AFB Alliancebernstein National Municipal Income Fund 1162027 - Closed-End Fund
AFJK Aimei Health Technology Co Ltd 1979005 Holding And Other Investment Offices SPAC  
AGM Federal Agricultural Mortgage Corp 845877 Non Depository Credit Institutions Operating Company
AGNC Agnc Investment Corp 1423689 Holding And Other Investment Offices REIT  
AGRO Adecoagro S A 1499505 Agricultural Production Crops Unknown  
AIBRF Aib Group Plc Adr 1728918 - Unknown  
AIDG Ais Holdings Group Inc 1702015 Holding And Other Investment Offices SPAC  
AIGO Aigo Holding Ltd 2025255 Wholesale Trade Durable Goods Unknown  
AII American Integrity Insurance Group Inc 2007587 Insurance Carriers Insurance Company
AIJTY Jianpu Technology Inc 1713923 Business Services Unknown  
AIQUF L Air Liquide Sa Fi 1161167 - Unknown  
AIRG Airgain Inc 1272842 Electronic And Other Electrical Equipment Operating Company
AIRS Airsculpt Technologies Inc 1870940 Health Services Operating Company
AKA A K A Brands Holding Corp 1865107 Miscellaneous Retail Operating Company

Thank you!

amcamc92 avatar Jan 02 '26 21:01 amcamc92

Hi @dgunning

Did you have time to look into this? Thank you in advance!

amcamc92 avatar Feb 07 '26 15:02 amcamc92