A native macOS financial-analysis app that measures what most tools ignore: a company's regulatory footprint.
Most financial-analysis tools stop at prices and ratios. RegLens starts from a different premise, drawn from recent empirical accounting and finance research: regulation is a first-order determinant of firm costs, growth, and disclosure quality. The app pulls fundamentals and filings directly from SEC EDGAR (free, no API key), then layers text analytics on top of the actual regulatory documents that firms file.
Built with SwiftUI and Swift Charts. No accounts, no API keys, no scraping of paid data providers.
I work as a research assistant in empirical accounting at Bocconi University, on projects at the intersection of regulation, disclosure, and M&A. While reading the recent literature — on regulatory fragmentation, on fairness opinions in mergers, on how multiple regulators shape disclosure quality — I kept wanting a tool that would let me look at these constructs for any given company: how regulated is this firm, by whom, and how does that sit next to its costs and profitability? Standard financial dashboards don't answer that, and the research measures live in Stata datasets, not in anything interactive. So I built RegLens to close that gap: a small native app that turns the primary sources (EDGAR filings and XBRL data) into the measures the literature actually uses.
1 — Fundamentals dashboard.
Search any U.S. public company by ticker or name. RegLens fetches structured XBRL data from EDGAR's companyfacts API and reconstructs clean fiscal-year series for revenue, net income, assets, equity, liabilities, and SG&A. It then computes the outcome variables most used in empirical accounting research: ROA, ROE, net margin, leverage, sales growth, asset growth — and SG&A/assets, a standard proxy for administrative and compliance costs.
2 — Regulatory-exposure scanner (the innovative part). One click downloads the company's latest 10-K and scans the full text for mentions of ~30 U.S. federal agencies (SEC, FINRA, Federal Reserve, FDIC, CFPB, FDA, EPA, DOJ, PCAOB, …). From the mention counts it computes:
- Regulatory intensity — agency mentions per 1,000 words of the annual report;
- Dispersion index (1 − HHI) — how spread out the company's regulatory footprint is across agencies. A value near 0 means one regulator dominates; a value near 1 means the firm answers to many. This is a filing-level analogue of the dispersion measures used in the recent literature on regulatory fragmentation (e.g., Kalmenovitz, Lowry & Volkova, The Journal of Finance, 2025).
3 — Filings & M&A workbench. Browse the company's recent EDGAR filings, filter to M&A-related forms (DEFM14A, PREM14A, SC 14D9, SC TO-T, S-4, 425), open any document, and run the fairness-opinion / conflict-of-interest scanner: a keyword analysis of merger proxies that counts the disclosure language studied in the M&A accounting literature (fairness opinions, conflicts of interest, financial-advisor fees, appraisal rights, DCF and comparable-companies valuation language).
See docs/METHODOLOGY.md for how each measure is constructed and the research it draws on.
Ordinary dashboards tell you how profitable a firm is. RegLens also tells you how regulated it is — and the research suggests those two things are connected: firms whose activities are fragmented across many regulators tend to show higher SG&A and lower profitability and growth. RegLens puts both sides of that relationship on the same screen, for any U.S. public company, from primary sources.
- macOS 13 Ventura or later
- Xcode 15+ (Swift 5.9) — or just the Swift toolchain if you run from the command line
git clone https://github.com/alessandrogaudio03-wq/RegLens.git
cd RegLens
swift runOr open the package in Xcode and press ⌘R:
xed .Before first use: open Sources/RegLens/EdgarClient.swift and set userAgent to your own name and email. The SEC's fair-access policy asks every automated tool to identify itself, and EDGAR may throttle anonymous traffic.
To produce a double-clickable RegLens.app and a distributable disk image:
chmod +x scripts/make_dmg.sh # first time only
./scripts/make_dmg.shThe script builds a release binary (universal — Apple Silicon + Intel — when the toolchain allows), assembles the .app bundle with the icon in packaging/icon.png, ad-hoc signs it, and creates dist/RegLens-1.0.0.dmg with the usual drag-to-Applications layout. Because the app is ad-hoc signed and not notarized, anyone who downloads the DMG may need to right-click → Open on first launch (or you can sign with your own Developer ID and notarize — swap the - in the codesign step for your identity).
Sources/RegLens/
├── RegLensApp.swift App entry point
├── AppViewModel.swift State & orchestration (async/await, MainActor)
├── EdgarClient.swift SEC EDGAR API client + HTML-to-text
├── FundamentalsEngine.swift XBRL → clean annual series → ratios
├── RegulatoryAnalyzer.swift Agency lexicon, dispersion index, FO/COI scanner
└── Views/ SwiftUI interface (dashboard, scanner, filings)
packaging/ Info.plist template + app icon
scripts/make_dmg.sh One-command .app + .dmg packaging
All data comes from the SEC EDGAR public APIs: the company-ticker directory, the XBRL companyfacts endpoint, the submissions filing index, and the filing archive itself. EDGAR is free but rate-limited; RegLens makes one request per user action and caches the company directory in memory.
- Export any series or report to CSV for use in Stata/R/Python
- Peer-comparables module (valuation multiples across a user-defined peer set)
- Federal Register API integration to track agency rulemaking by topic
- Historical regulatory-exposure time series (scan every past 10-K, not just the latest)
- Sentiment and uncertainty word lists (Loughran–McDonald) for filing text
Contributions and issues are welcome.
RegLens is an educational and research tool. Nothing it displays is investment advice. Text-based measures are noisy by construction — counting agency mentions in a 10-K is a proxy for regulatory exposure, not a legal assessment of it.
Parts of this codebase were developed with the assistance of AI tools (Anthropic's Claude). The idea, the research grounding, and the testing are mine — and so are the remaining bugs.
MIT — see LICENSE.


