README
Application Scorecards Calculator API
https://docs.google.com/document/d/1hwSKnVB-LDd93sFZCLzB2gARJ1Toc9uCEW43QFXDi0U/edit
This is an implementation of decision scorecards (the result of a traditional logistic regression model).
The scorecard typically would have less than 10 variables and would work this way (assigning different scores for different ranges of a variable):
Variable 1: Customer Age
- 18-25 – 0 points
- 25-35 – 20 points
- 35-45 – 10 points
- > 45 – 0 points
Variable 2: Region
- Madrid – 12 points
- Catalunya – 6 points
- Other – 0 points
Variable 3: Financed product
- Mobile – 0 points
- Appliances – 35 points
- PC/Laptop/Tablet – 15 points
The module should calculate the score according to those variables (just summing up the resulting score per category) and then send the result to the decision engine where the OK/KO logic is implemented (i.e. above or equal to 50 points, approve / KO if below). A similar strategy as get the income and expenses, calculate debt to income ratio, and send it to the decision engine where the affordability acceptance strategy is built.
Run the tests
You can run the test suite with:
make test-clean test test-coverage
Also before any push make sure to run:
make fmt analyze
No exit codes other than 0 will pass the CI pipeline.