Overview
DebtStack extracts and structures corporate debt data from SEC filings. The data is organized around companies, entities, debt instruments, and their relationships.Core Objects
Company
The top-level object representing a publicly traded company.Entity
A legal entity within the corporate structure (subsidiaries, holding companies, operating companies).holdco- Holding company (typically top-level)opco- Operating companyfinco- Financing subsidiarysubsidiary- General subsidiaryjv- Joint venturevie- Variable interest entity
Debt Instrument
A specific debt obligation (bond, loan, credit facility).senior_secured- First priority claimsenior_unsecured- Unsecured senior debtsubordinated- Junior to senior debt
senior_notes- Fixed-rate bondsterm_loan_a- Amortizing term loanterm_loan_b- Bullet term loanrevolver- Revolving credit facilityfirst_lien- First lien secured loansecond_lien- Second lien secured loan
Guarantee
A relationship where one entity guarantees another entity’s debt.Collateral
Assets pledged to secure debt instruments.real_estate- Property and buildingsequipment- Machinery, vehiclesreceivables- Accounts receivableinventory- Stock and goodsip- Intellectual property, patentssecurities- Stock pledgesgeneral_lien- Blanket lien on assetsvehicles- Aircraft, ships, carsenergy_assets- Oil/gas reserves
Data Conventions
Monetary Values
All monetary values are stored in cents (hundredths of a dollar) to avoid floating-point precision issues.
Example:
total_debt: 9500000000000 = $95 billion
Interest Rates
Interest rates are stored as percentages (not basis points) for readability.Dates
All dates use ISO 8601 format:YYYY-MM-DD
Relationships
- A Company has many Entities
- An Entity can issue Debt Instruments
- An Entity can guarantee other entities’ Debt Instruments
- A Debt Instrument can have multiple Guarantors
- A Debt Instrument can have Collateral
Document Sections
SEC filings are parsed into searchable sections:
Sections support three search modes:
- Keyword search — PostgreSQL full-text search with relevance ranking
- Semantic search — Each section is split into overlapping chunks and embedded with Gemini (
gemini-embedding-001, 768 dimensions). Queries are embedded and matched via cosine similarity, enabling natural language questions like “can they pay dividends” to find covenant language about restricted payments. - Hybrid search — Combines both via Reciprocal Rank Fusion for comprehensive results

