Skip to content

Latest commit

 

History

History
26 lines (21 loc) · 3.73 KB

README.md

File metadata and controls

26 lines (21 loc) · 3.73 KB

LCR - Regulatory Reporting

This project is an example of using modeling to succinctly define business concepts centrally for use in various execution contexts. It is a series of calculations that would be used as a source for code-generating libraries that firm's would use in their systems. Code-generation could range from generic generation to target languages to specialized generation to match existing legacy systems. By defining the rules in a language like Elm, rule owners can take advantage of the precision and also provide a suite of verification test.

The calculation in this sample comes from the U.S. LCR specification. The LCR is an example of the type of regulatory reporting that is common through out the financial industry. Historically, regulatory bodies publish lengthy specifications in the form of legal documents along with a set of accompanying helper documents and spreadsheets. These get interpreted by a financial institution's legal and business experts into another set of documents. Next a set of business analysists attempt to map the concepts to their firm's business systems. Finally, developers attempt to translate these into software. There is a huge potential for interpretation drift and misunderstanding and the whole process takes a great deal of time and effort. A huge portion of these regulations are categorization rules and mathematical calculations. There is much potential benefit for all parties to take these regulations in the form of declarative models that could be tested independently and interpreted automatically onto internal systems. This project demostrates how a declarative model of regulatory rules could potential be delivered throughout the industry.

LCR Rules

The U.S. LCR rules are specified and supported in a set of documents:

This project implements a subset of the the rules pertaining to 5G and LCR. The 5G is concerned with categorizing asset flows so that they can be appropriately handled in the various calculations. Handling is usually in the form of inclusing in different calculated fields and applying weights to the category. The LCR (high quality liquid asset amount / total net cash flow amount) is then calculated as a ratio of outflows to inflows and is one of the factors in determining the institution's health.

Code Structure

View full project

  • Basics - Various common types and the such.
  • Calculations - The LCR and 5G calculations.
  • Flows - A common structure for the various flows.
  • Inflows - The rules for categorizing different types of inflows.
  • Outflows - The rules for categorizing different types of outflows.
  • MaturityBucket - Some arcane rules for grouping flows into buckets based on their maturity date. The LCR is only concerned with maturity dates up to 30 days. This is all relative to a given date that must be supplied by the caller.
  • Product - The minimal product info needed by these rules. Note that whether a product is HQLA is determined by another set of rules that firms must manage to more specs. There's some talk of making the issuer determine them. For this purpose, we'll assume this has been determined upstream.
  • Rules - The structure and functions for managing flow rules.