This project contains code to extract financial information for commercial real estate used as collateral in Commercial Mortgage Backed Security (CMBS) offerings.
The Securities and Exchange Commission (SEC) requires issuers of asset-backed securities (bonds backed by a collection of mortgages or other financial assets) to submit summary data in XML format for the underlying assets. The regulation (Reg AB II) that requires this went into force in November 2016.
Issuers submit data using an SEC Form ABS-EE (example) with 2 exhibits: EX-102 (Asset Data File) and EX-103 (Asset Related Document). The EX-102 is an XML document (example) that describes the assets. Form ABS-EE can be used to submit information on securities backed by auto loans, auto leases, credit card debt, commercial or residential mortgages. The XML schema for the EX-102 differs depending on the asset type.
The source code is contained in the cmbs
directory. A separate legacy-code
directory contains code for an old version of the application that is no longer maintained.
The cmbs/scripts
directory contains code to identify and download ABS-EE (Electronic Exhibits) and FWP (Free Writing Prospectus) files for CMBS offerings. A nodejs/express application in the cmbs/node
is used to process files in the directory populated by the scripts:
- Use
scripts/get-abs-submissions.sh
to download all SEC submission files and populate a directory with only submissions that include ABS-EE files. - Set an
ABS_DIRECTORY
environment variable to point to the newly populated directory and then start a nodejs process from thecmbs/node
directory.
It exposes REST endpoints control processing:
-
GET /cmbs/:form-type (http://localhost:3000/cmbs/FWP)
Reads the files in the ABS_DIRECTORY and returns an HTML or JSON document with hypertext links to files of the selected type as shown in the example below. The default behavior is to return HTML. Pass an
Accept: application/json
header to retrieve response as a JSON doc -
POST /cmbs/:form-type
Updates Postgres database tables with filing data of type ABS-EE or FWP. ABS-EE submissions populate the exh_102_exhibits table with data from the exhibit 102 files. FWP submissions populate the cmbs_prospectuses table with Free Writing Prospectus submissions. The DDL to create these tables is in the
cmbs/node/ddl
directory. Database connection details are defined in thecmbs/node/services/http.js
file.note: ABS_DIRECTORY, POSTGRES_USER and POSTGRES_PASSWORD can be set using environment variables in a
.env
file -
GET /filing/:cik/:accession_number
Returns the json representation stored in the database of the exhibit 102 file for the specified CIK and accession number