Giter Club home page Giter Club logo

loan-prequal-process's Introduction

Loan Pre Qualification

A sample implementation of Loan Pre-Qualification using DMN. Decision Request Diagram is a diagram that captures the relationships between a decision and the supporting decisions, business knowledge models, and input data, as well as the knowledge sources behind the decision logic.

The basic DRD element types are:

A decision represents decision logic that returns an output value for a given set of input values. It may directly contain the decision logic or invoke the decision logic specified in an attached business knowledge model (BKM) Input Data represents data values received at the time of execution. Input data has no value expression and can be constrained to a data type and validations. A Business Knowledge Model represents a self-contained bit of decision logic. Its value expression is a function definition, an expression of its parameters. A decision invokes a BKM by mapping its inputs to the BKM parameters; the BKM output value is then returned to the invoking decision. A knowledge source (rectangle with wavy bottom) represents the authority for some bit of decision logic. It could be a document, an external model or a person. Knowledge sources have no execution semantics. They simply document the source of the information used in the decision logic. A text annotation adds an additional bit of documentation to any of the parts of the decision logic, they have no execution semantics.

The DMN shows a mortgage loan pre-qualification decision that might appear on the lender's website to give prospective borrowers an idea of the likelihood of approval based on credit score, loan amount, and income.

DRD Input Elements

Elements
Credit Score
Monthly Income
Loan Rate pct
Down Payment
Purchase Price

Decision Flow

Affordability category classifies values of the debt-to-income ration as "Affordable", "Marginal" or "Unaffordable". This ratio is defined as the housing expense divided by the borrower's monthly income, where housing epense is the monthly loan payment plus the estimated monthly tax and insurance payments.

Affordability category depends on a supporting decision DTI pct, which in turn depends on supporting decision Housing expense, and input data Monthly income. Housing expense depends on supporting decisions Tax and insurance payment and Loan payment. Loan payment in turn depends on supporting decision Loan amount and input data Loan rate pct, where Loan amount depends on the input data Purchase price and Down payment.

DRD Elements

Credit score below 620 is poor, 620-680 is fair, 680-720 is good, and over 720 is excelent. The loan is likely approved if the credit score is excellent and affordability is either affordable or marginal, and also likely approved if the credit score is good and the loan is affordable. It is possibly approved if credit score is good and affordability marginal, or credit score is fair and affordable. And it is likely disapproved if the credit score is fair and affordability marginal, or either credit score is poor or affordability is unaffordable.

Affordability category merely classifies DTI pct, a number expressed as percent, into the possible values "Affordable", "Marginal" and "Unaffordable". The rules are these:

"Affordable" if DTI pct is less than 26 "Marginal" if DTI pct is between 26 and 28, including the endpoints. "Unaffordable" if DTI pct is greater than 28.

DTI pct, Housing Expense, Loan Amount, Tax and Insurance Payment are all simple formula expressed in the FEEL expression.

Finally Loan payment calculates the monthly loan payment based on the Loan amount and the Loan rate pct. The formula is just arithmetic can be reused as an function.

Testing the DMN

Red Hat Process Automation Manager provides for When-Then style scenario testing tool which simplifies the testing of DMN modes. An example test suite can be seen as below:

loan-prequal-process's People

Contributors

snandakumarops avatar dependabot[bot] avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.