The LCR project uses the FINOS Morphir project so requires Morphir installation.
The quick summary is:
- Create a fork of this project and clone it to your workspace (requires git to be installed).
- Be sure to install npm
- Install the Morphir command line tool with:
npm install morphir
- Compile the CLR with:
npx morphir-elm make -f
- Interact with:
npx morphir-elm develop -o localhost
(the lcr function is a good starting point).
The code is organized in two sections:
The 2052a spec defines data types and the structure of the tables it requires to be supplied to run. The project places those in the FR2052A module.
- The business glossary (data types) are in the Fields sub-module.
- The table structures and asset class specific field definitions are in the DataTables module, which is further split into Inflows, Outflows, and Supplemental modules.
The various rules and calculations are in the LCR module. [TODO: Add more detail about the sub-modules]
There is a sample runtime to demonstrate calling the LCR as a library in Scala. The code can be found at SimpleApp.
There are a few main opportunities for contribution:
Parts of the LCR have been left unimplemented in order to experience collaborating on regulations in open-source. These include:
- Categorization Rules - Verify the rules for the different types of cash flows defined in the Inflows, Outflows, and Supplemental sub-modules of the LCR module.
- Maturity Date - The spec defines specific rules for calculating the Maturity Bucket. The Data Tables assume that the tables come with Maturity Bucket so the calculation has to happen before.
- Unit Tests - Many of the rules don't have unit tests. Unit tests would be useful for managing future changes and development. Tests can be created by using the Morphir Develop app or by generation based on the rule predicates.
- Acceptance Tests - We need a test harness with realistic data that produces an expected result. That's challenging to do in open-source. Options include donation of previously built tests, scrubbed data, or synthetic data generation.