Skip to content

Add securitisation (structured finance) plugin — free SEC EDGAR connector + skills - #283

Open
dacheah wants to merge 7 commits into
anthropics:mainfrom
dacheah:feat/securitisation-plugin
Open

Add securitisation (structured finance) plugin — free SEC EDGAR connector + skills#283
dacheah wants to merge 7 commits into
anthropics:mainfrom
dacheah:feat/securitisation-plugin

Conversation

@dacheah

@dacheah dacheah commented Jun 29, 2026

Copy link
Copy Markdown

Summary

Adds a securitisation / structured-finance vertical plugin backed by a free,
local SEC EDGAR connector. It searches registered ABS/CMBS deals, pulls their
prospectuses and investor reports, runs loan-level analysis on Form ABS-EE data
(auto and CMBS), compares deals, and measures prepayment/loss over time — with
skills for prospectus analysis, CLO indenture review, and waterfall extraction.

It's the only connector in this marketplace that needs no paid subscription
SEC EDGAR is public data — filling the structured-finance gap alongside the
licensed providers.

Drafts analyst work product for review by a qualified professional; not investment,
legal, tax, or accounting advice.

What's inside

  • 8 slash commands: search-deals, parse-abs-prospectus, analyze-loan-tape,
    analyze-cmbs-tape, analyze-prepayment, deal-comps, extract-waterfall,
    review-clo-indenture
  • 8 skills (fire automatically): deal-search, abs-prospectus-analysis,
    loan-tape-analysis, cmbs-loan-tape-analysis, prepayment-analysis, deal-comps,
    payment-waterfall-extraction, clo-indenture-review
  • Local MCP connector (connector/, Python standard library + the mcp SDK only),
    exposing 6 tools: search_securitisation_deals, get_deal_filings,
    get_filing_document, extract_loan_level, extract_cmbs_loan_level,
    extract_loan_timeseries
  • 1 agent: deal-surveillance — reconciles a deal's latest ABS-EE tape(s) against its 10-D, tracks period-over-period movement and trigger headroom, and outputs a one-page surveillance note.

Coverage (honest, verified)

Asset class Documents (424B/10-D) Loan-level (ABS-EE)
Auto loan / lease ✅ strong (tuned for this)
Conduit CMBS ✅ strong (DSCR, debt yield, LTV, maturity wall)
Credit-card ABS ❌ excluded from asset-level disclosure by rule
Registered RMBS ⚠️ rare ❌ effectively absent (market is 144A)
CLOs ❌ not on EDGAR ❌ not on EDGAR (use the indenture-review skill on a supplied doc)

Loan-level analysis (the differentiating piece)

The ~130–160 MB ABS-EE tape is streamed record-by-record (flat memory) through a
layout-agnostic iterator (handles <asset>-wrapped and flat layouts). Beyond pool
stats, extract_loan_level produces single-dimension stratifications and 2-D
cross-tabs (e.g. FICO band × state); extract_cmbs_loan_level gives the CMBS
credit view — balance-weighted DSCR, debt yield, occupancy, LTV, property-type and
geographic concentration, the maturity wall, and largest loans; and
extract_loan_timeseries joins loans on assetNumber across periods for roll-rate
matrices
, static-pool loss curves, and prepayment — analyses that aggregate
10-D reports can't reproduce. The deal-comps and prepayment-analysis skills build
on these primitives. Output formats are specified in each skill's references/output-schemas.md.

Extensible to other regions

Connector is US-first but region-neutral: a Region interface with a clean us/
(SEC EDGAR) implementation. EU/AU can be added as sibling modules served via a
region argument, with no command/skill changes.

Testing & validation

  • 58 offline tests pass (45 auto + 13 CMBS, connector/tests/) — no network;
    parsers run on bundled synthetic tapes, search/filings on real EDGAR JSON shapes.
    CMBS analytics validated against the real Benchmark 2018-B3 filing.
  • scripts/check.py passes (0 issues). Plugin version 0.3.0.
  • If the mcp SDK isn't installed, the server now reports it explicitly in the MCP
    logs (pip install "mcp>=1.2.0") instead of failing silently.

Data, rights, licence

SEC EDGAR public data, accessed per SEC fair-access policy (descriptive User-Agent,
request throttling). Apache-2.0, matching the repo. See DATA_PROVENANCE.md.

Updates since @kuangmi-bit's review — thank you

All three non-blocking suggestions addressed:

  • Install docs — README now installs via pip install -r connector/requirements.txt
    (pinned mcp>=1.2.0), with a numbered Installation section and a Claude Code /
    Cowork / claude.ai support matrix.
  • .mcp.json cwd — documented that ${CLAUDE_PLUGIN_ROOT} is substituted by the
    Cowork/plugin runtime and that standalone/Claude Code use needs an absolute cwd
    (kept out of .mcp.json itself, which is parsed as strict JSON).
  • extract_loan_timeseries — added an assetNumber-stability caveat in the
    loan-tape and prepayment skills.

Also added since review: deal-comps and prepayment-analysis skills/commands, an
MCP-SDK import guard, and a "securitisation / securitization" spelling alias for
discoverability.

Structure & conformance

Aligned with marketplace plugin conventions: a bundled Apache-2.0 LICENSE; a CONNECTOR.md health-check/recovery guide that every connector-dependent skill and command points to (so a missing connector is stated plainly rather than silently degrading to web search); output schemas moved into skills/*/references/ for progressive disclosure; .mcp.json no longer hardcodes SEC_EDGAR_USER_AGENT, so a user's own value is respected (compliant default remains in config.py); skill frontmatter flattened to single-paragraph descriptions; and completed plugin.json metadata ($schema, displayName, license, keywords).

Try it

/securitisation:search-deals AmeriCredit auto → then parse the 424B5, analyse the
latest ABS-EE tape (auto or CMBS), run deal-comps across a shelf, or
analyze-prepayment across a deal's monthly tapes. (One-time: pip install "mcp>=1.2.0".)

@kuangmi-bit kuangmi-bit left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Review: PR #283 — Securitisation plugin

Overall: ✅ Strong contribution, ready to merge

This is a well-built, honest plugin. Here is what stood out.

What is excellent

1. Free data source. This is the only connector in the marketplace that
needs no paid subscription — SEC EDGAR is public data. Fills a real gap.

2. Honest coverage. DATA_PROVENANCE.md and LOAN_LEVEL_OUTPUTS.md
explicitly say what does NOT work (credit-card ABS no loan-level data, RMBS
rare, CLOs not on EDGAR). This builds trust.

3. SEC compliance. User-Agent identification + 10 req/s throttle built into
http_client.py. Clean pattern: config.py as single source of truth for
endpoints.

4. Layout-agnostic XML parser. record_iter.py handles both
<asset>-wrapped and flat ABS-EE layouts. The _Stratifier in
absee_parser.py is a clean abstraction for group-by aggregations.

5. Test coverage. 5 XML samples + Python tests for parsing and CMBS field
mapping. The samples exercise both layout formats and edge cases.

6. Region-ready architecture. regions/registry.py + UsEdgar
registration pattern makes it trivial to add EU/AU modules later.

Minor suggestions (non-blocking)

  1. requirements.txtmcp>=1.2.0. The parent repo has no pyproject.toml
    or lockfile for this connector. Consider documenting how users install it
    (pip install -r connector/requirements.txt) in the README or connector
    README.

  2. .mcp.json cwd — Uses ${CLAUDE_PLUGIN_ROOT}. This is a Cowork
    built-in. Consider adding a comment noting this only works in Cowork; for Claude
    Code users, cwd needs an absolute path.

  3. extract_loan_timeseries — Joining across periods on assetNumber is
    powerful but sensitive to data quality. A brief note in the skill about what
    happens when assetNumber is not stable across filings would help analysts
    trust the output.

Verdict

Clean architecture, honest about limits, free data source, good test coverage.
Approved with minor documentation suggestions.

@dacheah

dacheah commented Jul 4, 2026

Copy link
Copy Markdown
Author

Thanks so much for the thorough review, @kuangmi-bit. I really appreciate the careful read and the kind words. Your three suggestions are all fair and happy to fold them in:

  • requirements.txt / install docs: I'll add a pip install -r connector/requirements.txt note to the connector README.
  • .mcp.json cwd: I'll add a comment noting ${CLAUDE_PLUGIN_ROOT} is Cowork-specific and that Claude Code users need an absolute path.
  • extract_loan_timeseries: I'll add a note in the skill on how it behaves when assetNumber isn't stable across filings.

One question for the maintainers: the merge box flags "Commits must have verified signatures," and my commits are currently unsigned. Would you like me to sign and re-push them, or does your merge process handle that? Happy to do whichever is cleaner on your end. I'll also hold for a maintainer to approve the workflow runs.

Thanks again for taking the time.

@dacheah
dacheah force-pushed the feat/securitisation-plugin branch 2 times, most recently from 29a6328 to 5f05b0f Compare July 6, 2026 01:31
@kuangmi-bit

Copy link
Copy Markdown

Curious about the scope here — does this plugin target ABS/MBS/CLO equally, or focus on a specific asset class? Happy to help test with real EDGAR filings if helpful.

@dacheah

dacheah commented Jul 9, 2026

Copy link
Copy Markdown
Author

Good question @kuangmi-bit. It's not even across asset classes, mostly because EDGAR's loan-level disclosure isn't either. Roughly where it stands:

Auto ABS (loans and leases): the strongest area. The loan-level engine is built around this, since auto has the richest ABS-EE coverage.
Conduit CMBS: also well covered, with its own commercial-mortgage analytics (balance-weighted DSCR, debt yield, LTV, property and geographic concentration, maturity wall).
Credit-card ABS: you can pull the documents (424B, 10-D), but there's no loan-level data. Asset-level disclosure is excluded by rule, so it's 10-D pool-level only.
Registered RMBS: barely present on EDGAR since that market is mostly 144A, so document coverage is rare and loan-level is basically nil.
CLOs: not on EDGAR at all (144A). Those go through the clo-indenture-review skill on an indenture/OM you supply, rather than an EDGAR filing.

So document search, prospectus parsing and waterfall extraction work across registered ABS generally, but the loan-level analytics are really auto and CMBS. The coverage table in the README lays this out.
Testing would be useful, thanks for offering. A few worth trying:

Auto: a recent AmeriCredit (GM Financial), Westlake or GLS auto ABS-EE tape with analyze-loan-tape
CMBS: Benchmark 2018-B3 (CIK 1734103) with analyze-cmbs-tape. That's the one I validated against, so it's a good check.
Prepayment: stack a few consecutive monthly ABS-EE tapes for one auto deal with analyze-prepayment

If something doesn't tie back to the filing, that's the feedback I'm after.

dacheah added 7 commits July 11, 2026 13:05
- CMBS module + extract_cmbs_loan_level: DSCR, debt yield, occupancy, LTV,
     property/state concentration, maturity wall, stratifications. Validated
     on the real Benchmark 2018-B3 filing.
   - /analyze-cmbs-tape command + cmbs-loan-tape-analysis skill.
   - record_iter.py: structure-agnostic iterator (handles <asset>-wrapped and
     flat assetTypeNumber layouts); auto parser now delegates to it.
   - 40 auto + 13 CMBS tests pass; scripts/check.py clean. Plugin v0.2.0.
- New skills: prepayment-analysis (wraps extract_loan_timeseries) and deal-comps
  (cross-deal normalization), each with a matching slash command
- server.py: import guard — a missing mcp SDK now prints an install hint to stderr
  and exits nonzero instead of failing silently
- README: numbered Installation (Claude Code + Cowork), surface-support matrix,
  and a "verify the connector is live" check
- plugin.json 0.2.0 -> 0.3.0; marketplace.json + README listings updated
- scripts/check.py clean; 45 auto + 13 CMBS tests pass
- Add "securitization" (US spelling) alias to descriptions for discoverability
- plugin.json 0.2.0 -> 0.3.0; marketplace.json + README listings updated
@dacheah
dacheah force-pushed the feat/securitisation-plugin branch from 154f6d4 to 9e5b4f0 Compare July 11, 2026 03:05
@kuangmi-bit

Copy link
Copy Markdown

Thanks for the thorough breakdown @dacheah — the asset-class coverage matrix is exactly what I was looking for. The auto ABS / CMBS split makes sense given EDGAR's disclosure gaps.

Happy to spot-check the AmeriCredit ABS-EE tape and Benchmark 2018-B3. I'll run them through analyze-loan-tape and analyze-cmbs-tape and report back if anything doesn't tie to the filings.

One quick thought on the .mcp.json cwd note you mentioned earlier — if you're documenting ${CLAUDE_PLUGIN_ROOT} as Cowork-specific, it might also be worth adding a one-line fallback for vanilla Claude Code users (e.g. "cwd": "." with a comment that users should adjust). Small thing, but it'll save the first "why doesn't this work" issue.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants