How We Automated Real-Time Portfolio Monitoring for 8 BDCs with n8n — Insightful Agents
Blog · Build Log

How We Automated Real-Time Portfolio Monitoring for 8 BDCs with n8n

By John Gillespie, Founder — Insightful Agents · April 5, 2026 · 7 min read

In early 2026, the AI-driven selloff in software stocks erased roughly $285 billion in market cap in a single week. Salesforce down 26%. ServiceNow down 28%. Intuit down 34%.

For most investors, that's a stock market story. For Business Development Companies — firms that lend to private software companies — it's a credit quality story. And for us at Insightful Agents, it was a system design problem: how do you monitor 8 BDC portfolios across hundreds of borrowers for early warning signals, in real time, without a team of analysts?

The answer: you automate it. Here's how we built the system.

The Problem: Manual Monitoring Doesn't Scale

A BDC (Business Development Company) is a publicly traded firm that lends money to small and mid-sized private businesses. They're legally required to distribute 90%+ of their income as dividends, which is why they offer 10-12% yields. The catch: when their borrowers struggle, the dividends get cut.

We track 8 BDCs in our Occam's Investing platform. Each one files quarterly SEC reports with hundreds of pages of financial data. Monitoring them manually means:

For one person, that's a full-time job. For an n8n workflow, it's a scheduled task.

The Architecture: 4 Workflow Layers

The monitoring system runs as four interconnected n8n workflows that fire automatically. No human in the loop for routine analysis.

Layer 1: SEC Filing Monitor

An n8n workflow polls the SEC EDGAR RSS feed every 15 minutes, watching for new 10-K and 10-Q filings from our 8 tracked BDCs (MAIN, ARCC, TRIN, CSWC, OBDC, CCAP, FSK, TCPC). When a new filing drops, it triggers the ingestion pipeline immediately.

Why this matters for any monitoring system: The trigger architecture determines your response time. Polling every 15 minutes means we detect new filings within minutes of publication. For a client building, say, a vendor compliance monitor, the same pattern works — poll the data source on a schedule, trigger the analysis instantly when something changes.

Layer 2: XBRL Parser and Data Extraction

SEC filings contain XBRL-tagged financial data — essentially structured XML that encodes every number in the filing. Our 50-node n8n workflow downloads the filing, parses the XBRL into structured JSON, and extracts the specific metrics we need:

The hardest part: Every BDC structures its SEC filing HTML differently. ARCC uses pipe-delimited industry names in an investments detail page. OBDC uses a separate industry concentration risk table. MAIN splits across multiple sub-categories. The n8n Code node handles each BDC's unique parsing logic through a routing switch. This is the kind of messy, real-world data problem that no off-the-shelf tool handles — and exactly where custom n8n workflows earn their keep.

Layer 3: Safety Scoring Engine

Once the raw data is extracted, a scoring workflow calculates two key metrics and produces a verdict:

NII Coverage Ratio:

NII Coverage = NII per Share / Dividend per Share

NAV Trend Razor:

If NAV per share declines > 5% quarter over quarter → cap verdict at WATCH regardless of NII coverage

This is the rule that catches what NII coverage alone misses. A BDC can report strong income today while quietly destroying book value through bad underwriting. The NAV Trend Razor forces the system to flag deterioration even when the headline numbers look fine.

The scoring engine assigns one of five verdicts: VERY SAFE, SAFE, ADEQUATE, WATCH, or AT RISK.

Layer 4: Alerting and Reporting

Results are stored in Supabase and trigger three types of automated outputs:

What the System Caught

When the AI selloff hit software stocks in February 2026, our system was already tracking software exposure across all 8 BDC portfolios. The data told a clear story:

The system flagged FSK and TCPC as distressed (both scoring 20/100) well before the broader market panic. It wasn't making predictions — it was reading the XBRL data that was already public but buried in hundreds of pages of SEC filings.

The system doesn't predict the future. It reads the data faster than a human can and applies scoring rules consistently. The value isn't intelligence — it's speed and consistency.

Why This Matters Beyond Investing

The BDC monitoring system is specialized, but the architecture pattern is universal. Any monitoring problem with these characteristics can be solved the same way:

  1. Data arrives on a schedule or event (SEC filings, vendor reports, CRM updates, project status changes)
  2. The data requires parsing and normalization (every source structures it differently)
  3. Scoring rules determine whether action is needed (thresholds, trend analysis, cross-referencing)
  4. Alerts need to reach the right person in real time (not in next week's meeting)

We've built the same architecture for clients in different contexts:

The tools change. The pattern doesn't.

Lessons from Building This System

1. Every data source is unique — plan for messiness

The hardest part of the BDC system wasn't the scoring logic. It was parsing 8 different HTML structures from SEC EDGAR. Each BDC reports industry concentrations differently. Build your workflows expecting that every source will surprise you.

2. Override rules catch what formulas miss

The NAV Trend Razor is a simple override: if NAV drops more than 5%, cap the score regardless of what other metrics say. This single rule caught deterioration that the NII coverage ratio alone would have missed. In any scoring system, build at least one hard override that can't be gamed by other inputs.

3. Run your own audit tool on your own stack

Our n8n workflow audit tool runs against this monitoring system regularly. With 50+ nodes in the XBRL parser alone, missing error handlers or dormant paths would be invisible without systematic auditing. We built the tool to solve our own problem.

4. Archived workflows are a sign of health, not waste

We went through 6 iterations of the SEC XBRL parser before arriving at the current version. Each previous version still exists in our 187-workflow n8n instance as an archived reference. A growing archive means you're iterating. A growing active workflow count without archiving means you're accumulating debt.

The Automation ROI

Without automation, monitoring 8 BDCs across quarterly filings with this level of forensic detail would require approximately 20 hours per quarter of manual analyst work — reading filings, extracting data, calculating metrics, writing alerts. That's 80 hours per year.

The n8n workflows do it in minutes. Every quarter. With no human intervention. And they catch things faster than any manual review because they trigger on the SEC filing itself, not on an analyst's schedule.

That's the math behind automation: build once, run forever, catch everything.

What Could You Automate?

If you're manually monitoring data from multiple sources, applying scoring rules, and sending alerts — that's an automation candidate. We build these systems for clients every week.

Book a Call →