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

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.txt — mcp>=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
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.

- 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 9e5b4f0 to 4736eaa Compare November 10, 2026 23:21
@dacheah

dacheah commented Nov 17, 2026

Copy link
Copy Markdown
Author

Rebased onto current main (head 4736eaa), four months after the last exchange here, and re-verified against the tree as it now stands.

What changed upstream that mattered: the wealth-management plugin has since been removed, so the registry overlap I expected to have to reconcile turned out to be textual only — the rebase applied cleanly and the marketplace entry needed no edit. All 20 registry entries now resolve to directories that exist, this plugin's included, and nothing in the plugin references the removed plugin.

scripts/check.py reports 83 files checked on this branch against 82 on main, with the same 3 findings in both: meeting-prep-agent's bundled client-report, client-review and investment-proposal skills no longer have matching vertical-plugins sources, because wealth-management was where they lived. That regression arrived upstream, not here — worth its own fix, and happy to send it separately if useful.

No CI has ever run on this branch (0 workflow runs on both the old and the new head), so the approval at 4736eaa rests on the code rather than on a green check. Is there anything else you would like before this goes in?

@kuangmi-bit

Copy link
Copy Markdown

Four months late, and the honest split is that I did one of the two spot-checks and did not do the other. Starting with what I actually ran.

AmeriCredit Automobile Receivables Trust 2017-1 — done, and it ties.

I pulled the real filings rather than your sample: ABS-EE accession 0001694010-21-000028 (period 08-01–08-31-2021, exhibit 102 = 53,147,917 bytes) and the matching distribution report, 10-D accession 0001213900-21-049871 (exhibit 99-1, collection date 09/20/2021). I parsed the tape myself with an independent reader, so this is not your parser grading its own homework — it also means it is not a test of analyze-loan-tape, which I did not run.

exhibit 99-1 line report my read of exhibit 102
{1} Beginning of period Aggregate Principal Balance 105,690,702 105,690,701.69
{6} Seller's Exercise of 10% Option 98,346,545 ending balance sum 98,346,545.11
{110} Receivables removed by the 10% option 12,353 records with a non-zero ending balance 12,353
{108} Beginning of period number of Receivables 12,743 13,171 records − 818 with a zeroBalanceCode = 12,353 active, plus 390 that liquidated or paid off this period = 12,743 ✓

So the tape reconciles to the cent on balances and exactly on counts, including the decomposition of the 390 loans that left the pool in the final period. Which matters more here than usual: this is the clean-up period where the seller exercised the 10% option, so an off-by-one in either the option amount or the retained-record logic would have shown up as a count mismatch rather than a rounding difference.

Benchmark 2018-B3 — I did not do it, and I am withdrawing that half.

I promised both and only delivered one. Rather than leave it as another four months of silence: I am not going to spot-check the CMBS tape, and you should not wait for me. If a second pair of eyes on the CMBS side is still worth having, say so and I will run it as a separate piece of work with its own thread — but it should not be part of whether this lands.

On your question — "anything else you want first, or can this go in": the spot-check does not block this. One measurement on one deal ties; that is evidence the auto path is mechanically sound, not a review of the plugin. Two things I did notice while working through it, both small:

  1. DATA_PROVENANCE.md says the ABS-EE parser handles "monthly asset data files". The one I read is 53 MB for 13,171 loans with 66 fields each — worth stating a realistic size and the parse time next to it, because the first user who tries a 200 MB tape will otherwise assume it is broken.
  2. The zero-balance records are retained in the tape (zeroBalanceCode present on 818 of 13,171) and are not part of the active pool count. Anything in the docs that reports "number of loans" from a tape should say which of the two it means — that ambiguity is exactly what made my count check non-obvious, and it is the kind of thing a reviewer will hit before a user does.

The upstream regression you flagged (meeting-prep-agent's three skills losing their vertical-plugins sources when wealth-management was removed) is not yours to fix in this PR, and I would not fold it in — separate issue, separate diff.

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