Automates extraction or estimation of EBITDA from SEC filings and writes results to Excel using Python and VBA.
Install the required Python libraries:
pip install requests xlwings msalUse the XBRL tag:
EarningsBeforeInterestTaxesDepreciationAndAmortization
Estimate EBITDA using this standard formula:
EBITDA = Net Income
+ Interest
+ Taxes
+ Depreciation
+ Amortization
EBITDA = Net Sales
– Operating Expenses (excluding Depreciation & Amortization)
- Adjusted EBITDA includes custom, non-standard company-specific adjustments (e.g., stock-based compensation, restructuring)
- These adjustments are not standardized in the SEC’s US-GAAP taxonomy.
- Not reported in machine-readable XBRL data — typically only available in press releases or presentations
-
Q4 Calculation
Q4 = Annual - Q1 - Q2 - Q3 -
Gross Margin Rounded to the nearest integer
-
Net Cashflow from Operations Uses the tag:
NetCashProvidedByUsedInOperatingActivities
If the program stops working:
- ✅ Re-save the Excel file to the same location (overwrite it)
- ✅ Ensure no other programs are using the file
- ✅ Close all Excel windows (multiple instances can break VBA)
Python couldn’t locate the file due to a relative path issue. Re-saving (Save As) refreshed the file reference.
✅ Best Practice: Use absolute file paths for reliability.
We compare companies using their most recent SEC filings, regardless of fiscal calendar.
- Ensures comparisons are across similar calendar windows
- Keeps analysis consistent and fresh
- Designed for Quarterly & Annual Reports
Net Sales → how much we are earning
Gross Profit → production efficiency
EBITDA → core operating health
SG&A → overhead efficiency
Net Cash from Ops → true financial strength
-
Acquisition Targeting Insight: Find companies with declining revenue but strong EBITDA or cash flow Action: Flag as potential acquisition targets — cost-cutting and growth opportunities
-
Overhead Efficiency Insight: Benchmark SG&A % of revenue vs. competitors Action: If ours is higher, reduce overhead through org streamlining or vendor renegotiation
-
Margin & Pricing Strategy Insight: Compare gross profit and EBITDA margins across competitors Action: If others have better margins, explore price increases or cost savings; if we lead, scale high-margin segments
-
Cash Flow Risk Monitoring Insight: Spot competitors with strong EBITDA but weak or negative operating cash flow Action: These firms may be unstable — capture their customers, recruit their laid-off staff, or prepare to acquire assets if they go under.
Net Cash Flow from Operations corresponds to "Net cash used in operating activities" on SEC Filings
We assume it's best to compare companies using their most recent SEC filings, rather than aligning by fiscal quarter. Our dashboard updates quarterly, so comparing performance across the most recent calendar windows ensures a consistent and timely view—despite different fiscal calendars across companies. We assume comparing the best way is to use the most recent SEC filings from each company rather than aligning by fiscal quarter, because our dashboard is updated quarterly with new data. This approach ensures we're comparing performance across similar calendar windows, even though companies may operate on different fiscal calendars.
