Skip to main content

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


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

x23113383_loan_management_system-0.0.2.tar.gz (5.1 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

File details

Details for the file x23113383_loan_management_system-0.0.2.tar.gz.

File metadata

  • Download URL: x23113383_loan_management_system-0.0.2.tar.gz
  • Upload date:
  • Size: 5.1 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

Hashes for x23113383_loan_management_system-0.0.2.tar.gz
Algorithm Hash digest
SHA256 c4f681fd1542a813f1d14c44744e704cac6a7a4444e71fb9f9e2ac60e89c80b7
MD5 d4bee749a128231a463ec3908e3b92f3
BLAKE2b-256 f45aeb4de1f9f88ef492937ed9b1d00f48d494d5e3d4f247016941b4aae7ec41

See more details on using hashes here.

File details

Details for the file x23113383_loan_management_system-0.0.2-py3-none-any.whl.

File metadata

  • Download URL: x23113383_loan_management_system-0.0.2-py3-none-any.whl
  • Upload date:
  • Size: 7.6 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

Hashes for x23113383_loan_management_system-0.0.2-py3-none-any.whl
Algorithm Hash digest
SHA256 e3c684c3befb68cd9044d00a457ee0c650a6808f11935873716313a8ae95b97e
MD5 e668b818fcbfdc33ffd44e2c81ec7765
BLAKE2b-256 17bb717efabc4dfbf8616d44195007595d24ce4c7f3694fa9d9ec02963fa4720

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page