Loan Management System Library
Project description
#Loan Management System Library
This library provides a set of functionalities for managing loans in a financial application, including loan applications, EMI calculations, loan eligibility checks, and custom exception handling. The primary modules include tools for calculating EMIs, checking customer loan eligibility, managing data helpers, and handling custom exceptions.
##Features: 1.Loan EMI Calculation: Calculate the equated monthly installment (EMI) for a specific loan based on the principal, interest rate, and loan term. 2.Loan Eligibility Check: Determine whether a customer is eligible for a loan based on their credit score, income, previous loans, and other parameters. 3.Custom Exception Classes: Handle errors related to loan processing, customer eligibility, and payment issues. 4.Data Validators: Utility functions to support data validations across the system.
##Installation:
To use the loan management library in your Django project: ``` pip install x23113383_loan_management_system
````
##Functions Overview: ###1. calculate_emi(loan_application)
This function calculates the Equated Monthly Installment (EMI) for a loan based on the loan amount, interest rate, and loan term. The EMI is calculated using the following formula:
```
EMI=P⋅r⋅(1+r)**n / (1+r)**n−1
````
Where:
P = Loan amount (Principal)
r = Monthly interest rate (Annual interest rate / 12 / 100)
n = Loan tenure (Number of months)
Parameters:
loan_application: The loan application object containing the loan amount and loan type.
loan: The loan object with the loan tenure.
loan_customer: The loan customer object (used for future extensions).
Returns:
The calculated EMI amount, rounded to two decimal places.
Example Usage:
```
emi = calculate_emi(loan_application, loan, loan_customer)
print(f"Monthly EMI: {emi}")
```
##Detailed Explanation: The function extracts the principal amount and the interest rate from the loan_application and converts the annual interest rate to a monthly interest rate. Using the formula, it calculates the EMI based on the loan term (in months) and returns the amount the customer needs to pay each month. If the interest rate is zero, the EMI is simply the loan amount divided by the loan term.
###2. check_loan_eligibility(loan_customer, loan_type, previous_loans)
This function checks whether a customer is eligible for a particular loan based on multiple factors, such as:
Credit score
Monthly or yearly income
Total pending EMI payments
Number of overdue loans
Interest rate for the new loan
Previous loans of the same type (customers are not allowed to have more than three active loans of the same type)
Parameters:
loan_customer: The customer applying for the loan.
loan_type: The type of loan being applied for (e.g., personal loan, vehicle loan, etc.).
previous_loans: A list of the customer’s previous loans, including those that are still active and any overdue loans.
Returns:
Max Amount Eligible by the customer for this LoanType
Throws:
CustomerNotEligible
Example:
```
max_loan_amount_eligible = get_customer_eligibility(loan_type, loan_customer, previous_loans)
print(f"Max LoanAmount Eligible: {max_loan_amount_eligible}")
```
##Detailed Explanation: The function checks whether the customer’s credit score meets the minimum requirement for the loan type. It also verifies whether the customer’s income can support additional EMIs based on their current EMI commitments (from active loans). Customers with overdue loans or more than three active loans of the same type are automatically disqualified. Additionally, the function calculates the maximum loan amount a customer can apply for based on their remaining EMI capacity (income minus existing EMI obligations) and the interest rate of the new loan.
opensource LICENSE
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file x23113383_loan_management_system-0.0.1.tar.gz.
File metadata
- Download URL: x23113383_loan_management_system-0.0.1.tar.gz
- Upload date:
- Size: 2.9 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/3.8.0 pkginfo/1.10.0 readme-renderer/34.0 requests/2.27.1 requests-toolbelt/1.0.0 urllib3/1.26.19 tqdm/4.64.1 importlib-metadata/4.8.3 keyring/23.4.1 rfc3986/1.5.0 colorama/0.4.5 CPython/3.6.9
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
3976e206c75842529e329cc0977e4589790061448a7ddef14327324f205dab4d
|
|
| MD5 |
513c49e9808b17bea0efabf2fe7c1709
|
|
| BLAKE2b-256 |
e7849e629b923928545e3059bdffd298356772dcd2bfa1c3026d3c3c13b2fece
|
File details
Details for the file x23113383_loan_management_system-0.0.1-py3-none-any.whl.
File metadata
- Download URL: x23113383_loan_management_system-0.0.1-py3-none-any.whl
- Upload date:
- Size: 3.5 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/3.8.0 pkginfo/1.10.0 readme-renderer/34.0 requests/2.27.1 requests-toolbelt/1.0.0 urllib3/1.26.19 tqdm/4.64.1 importlib-metadata/4.8.3 keyring/23.4.1 rfc3986/1.5.0 colorama/0.4.5 CPython/3.6.9
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
5dd8fbbf715ecf12c0966222473e161d53d2d03e6cf27caa9002cc87961fb6cc
|
|
| MD5 |
1e8c4746628925190e18e37b4d86566e
|
|
| BLAKE2b-256 |
266ab373cc56c5df105ce1212276f57b997cf135cc9b2d870b1e871d9eeb3d2c
|