1595864460

# Prediction of Credit Risk of Vehicle Loans

INTRODUCTION

**Vehicle loans are one such type where the banks offer money to their customers to purchase a car and the customer agrees to pay back the full loan amount along with some interest, which is a source of profit to the bank. So, it is important to build a model to predict the credit risk of vehicle loan, based on its dependable factors. **In today’s world of economic expansion, credit risk is the biggest risk banks face. Vehicle loans are loans offered by the banks to their customers to purchase a vehicle where the customer agrees to terms and conditions that include repayment of the full loan amount along with the interests. This interest amount is actually a source of income to the bank. Population rich countries like India and China where population is huge, have loads of loan filing claims which are on hold and need approvals. Loan approval is a heavy task for banks because approving a loan for a defaulter might lead to loss of profit and refusal of loan to a non-defaulter might also lead to loss of profits for the bank. Hence, banks rely on such prediction model so that they could gain knowledge on figuring out as to whom the loan should be granted. It reminds me of how my father was denied a vehicle loan in the early 80’s. Hence, it is very essential for a data analyst to build a predictive model to forecast the possibility of credit risk based on certain dependable factors.

DATA MINING METHODOLOGIES

A. Logistic regression

The main mathematical concept that functions the logistic regression is the logit function which is the natural logarithm of an odd-even ratio [11]. It can be well explained by taking into consideration a distribution of one dichotomous outcome variable is paired with another dichotomous variable. Generally logistic regression is well matched for sketching and testing hypotheses about relationships between a categorical outcome variable and with one or more categorical or continuous predictor attributes. The simplest logistic regression is of the form

Where β is the regression coefficient, α is the Y intercept and _e _= 2.71828 is the base of the system of natural logarithms. _X _can be either continuous or categorical based on the chosen dataset, but _Y _is always categorical.

Logistic regression is a strong tool which allows simultaneous analysis of multiple explanatory variables thereby reducing the effect of confounding factors [10]. In this paper I have chosen logistic regression to predict the vehicle loan credit risk since the outcome is dichotomous like, if the loan is given, will the customer be a defaulter or non-defaulter.

Logistic regression is a strong tool which allows simultaneous analysis of multiple explanatory variables thereby reducing the effect of confounding factors [10]. In this paper I have chosen logistic regression to predict the vehicle loan credit risk since the outcome is dichotomous like, if the loan is given, will the customer be a defaulter or non-defaulter.

B. DECISION TREE

In this paper, I have considered decision tree to be applied to the vehicle loan credit risk problem which is a classification type of problem. Generally, classification is a task of assigning the object attributes into categorical attributes.

classification of object attributes into categories

We already know that a normal tree contains root, branches and leaves. This same structure is followed in decision tree algorithm. It comprises of the root node, branches and the leaf nodes. When a test is required to be done on a specific attribute, it is done on the every internal node and the result of the test is on branch and class label similar to a result in a leaf node [12]. The top most node in a tree is the parent node. Hence a decision tree is a tree where, each node is compared to a different attribute, each connection link to a branch through a decision rule and each leaf shows a result of the continuous or categorical value. It is based on the similarity of human level thinking and so it’s easy to make use of the data and make effective interpretations. The whole idea is to create a tree of the entire data and determine a solitary result at every leaf based on the objective of the problem. Below is one such example of how the decision tree algorithm is related to real-time problems faced.

The decision tree with an example statement

Hence, I have adopted the decision tree algorithm to make decisions on whether to approve vehicle loan for the customer’s claims or not.

DATA PREPROCESSING AND TRANSFORMATION

It’s always better to pre-process the data before we build a model. The pre-processing of the data includes checking the presence of missing values, detection of outliers if any and the univariate and bivariate analyses.

The dataset that I have collected for vehicle loan credit risk prediction consists of 233,154 rows and 40 different variables that might affect the prediction of the defaulters. The summary of the dataset is as follows,

#decision-tree #predictions #machine-learning #logistic-regression #deep learning

1624987004

## Quick Personal Loan Online | Swift Loans Australia

Swift Loans provides quick personal cash loans online in Australia that can be deposited into your bank account within 60 minutes. Apply for a fast loan!
Visit here: https://www.swiftloans.com.au/cms/quick-loan

#payday loans #short term loans #instant loans #cash loan #holiday loans #travel loans

1595864460

## Prediction of Credit Risk of Vehicle Loans

INTRODUCTION

**Vehicle loans are one such type where the banks offer money to their customers to purchase a car and the customer agrees to pay back the full loan amount along with some interest, which is a source of profit to the bank. So, it is important to build a model to predict the credit risk of vehicle loan, based on its dependable factors. **In today’s world of economic expansion, credit risk is the biggest risk banks face. Vehicle loans are loans offered by the banks to their customers to purchase a vehicle where the customer agrees to terms and conditions that include repayment of the full loan amount along with the interests. This interest amount is actually a source of income to the bank. Population rich countries like India and China where population is huge, have loads of loan filing claims which are on hold and need approvals. Loan approval is a heavy task for banks because approving a loan for a defaulter might lead to loss of profit and refusal of loan to a non-defaulter might also lead to loss of profits for the bank. Hence, banks rely on such prediction model so that they could gain knowledge on figuring out as to whom the loan should be granted. It reminds me of how my father was denied a vehicle loan in the early 80’s. Hence, it is very essential for a data analyst to build a predictive model to forecast the possibility of credit risk based on certain dependable factors.

DATA MINING METHODOLOGIES

A. Logistic regression

The main mathematical concept that functions the logistic regression is the logit function which is the natural logarithm of an odd-even ratio [11]. It can be well explained by taking into consideration a distribution of one dichotomous outcome variable is paired with another dichotomous variable. Generally logistic regression is well matched for sketching and testing hypotheses about relationships between a categorical outcome variable and with one or more categorical or continuous predictor attributes. The simplest logistic regression is of the form

Where β is the regression coefficient, α is the Y intercept and _e _= 2.71828 is the base of the system of natural logarithms. _X _can be either continuous or categorical based on the chosen dataset, but _Y _is always categorical.

Logistic regression is a strong tool which allows simultaneous analysis of multiple explanatory variables thereby reducing the effect of confounding factors [10]. In this paper I have chosen logistic regression to predict the vehicle loan credit risk since the outcome is dichotomous like, if the loan is given, will the customer be a defaulter or non-defaulter.

Logistic regression is a strong tool which allows simultaneous analysis of multiple explanatory variables thereby reducing the effect of confounding factors [10]. In this paper I have chosen logistic regression to predict the vehicle loan credit risk since the outcome is dichotomous like, if the loan is given, will the customer be a defaulter or non-defaulter.

B. DECISION TREE

In this paper, I have considered decision tree to be applied to the vehicle loan credit risk problem which is a classification type of problem. Generally, classification is a task of assigning the object attributes into categorical attributes.

classification of object attributes into categories

We already know that a normal tree contains root, branches and leaves. This same structure is followed in decision tree algorithm. It comprises of the root node, branches and the leaf nodes. When a test is required to be done on a specific attribute, it is done on the every internal node and the result of the test is on branch and class label similar to a result in a leaf node [12]. The top most node in a tree is the parent node. Hence a decision tree is a tree where, each node is compared to a different attribute, each connection link to a branch through a decision rule and each leaf shows a result of the continuous or categorical value. It is based on the similarity of human level thinking and so it’s easy to make use of the data and make effective interpretations. The whole idea is to create a tree of the entire data and determine a solitary result at every leaf based on the objective of the problem. Below is one such example of how the decision tree algorithm is related to real-time problems faced.

The decision tree with an example statement

Hence, I have adopted the decision tree algorithm to make decisions on whether to approve vehicle loan for the customer’s claims or not.

DATA PREPROCESSING AND TRANSFORMATION

It’s always better to pre-process the data before we build a model. The pre-processing of the data includes checking the presence of missing values, detection of outliers if any and the univariate and bivariate analyses.

The dataset that I have collected for vehicle loan credit risk prediction consists of 233,154 rows and 40 different variables that might affect the prediction of the defaulters. The summary of the dataset is as follows,

#decision-tree #predictions #machine-learning #logistic-regression #deep learning

1669894200

## How to Making A Simple Credit Card Validation form

In this quick tutorial we will show you how to create a simple credit card form. We'll build the whole thing from scratch, with a little help from Bootstrap 3 for the interface, and Payform.js for client-side form validation.

## Project Overview

Here is a sneak-peak of what we will be building in this tutorial:

Credit Card Form Demo

You can get the full code for this project from the Download button near the top of the article. An overview of the files can be seen below:

There are two .css files and two .js files which we will need to include in our HTML. All other resources such as the Bootstrap framework, jQuery, and web fonts will be included externally via CDN.

### index.html

``````<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1">
<title>Credit Card Validation Demo</title>

<link href="https://fonts.googleapis.com/css?family=Open+Sans" rel="stylesheet">
<link rel="stylesheet" href="http://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/css/bootstrap.min.css">
<link rel="stylesheet" type="text/css" href="assets/css/styles.css">
<link rel="stylesheet" type="text/css" href="assets/css/demo.css">
</head>

<body>

<!-- The HTML for our form will go here -->

<script src="https://ajax.googleapis.com/ajax/libs/jquery/1.12.4/jquery.min.js"></script>
<script src="assets/js/jquery.payform.min.js" charset="utf-8"></script>
<script src="assets/js/script.js"></script>
</body>
</html>``````

Now that everything is set up, we can start building our credit card form. Let's start with the HTML layout!

## Layout

A credit card dialog needs to be simple, short, and straightforward. Here are the four input fields that every credit card form needs to have:

• Credit card owner name
• Card number
• Secret code (also known as CVV/CVC/CID)
• Expiration Date

All we need to do is create a `<form>` and add all the required input fields. For the owner, card number, and CVV we will use simple text fields. For the expiration date we'll put a combination of two selects with predefined options.

Besides that our form will have a heading, a submit button, and images for popular credit card vendors. Since we are working with Bootstrap there is a little extra markup, but it helps keep the code organized and the layout responsive.

``````<div class="creditCardForm">
<div class="heading">
<h1>Confirm Purchase</h1>
</div>
<div class="payment">
<form>
<div class="form-group owner">
<label for="owner">Owner</label>
<input type="text" class="form-control" id="owner">
</div>
<div class="form-group CVV">
<label for="cvv">CVV</label>
<input type="text" class="form-control" id="cvv">
</div>
<div class="form-group" id="card-number-field">
<label for="cardNumber">Card Number</label>
<input type="text" class="form-control" id="cardNumber">
</div>
<div class="form-group" id="expiration-date">
<label>Expiration Date</label>
<select>
<option value="01">January</option>
<option value="02">February </option>
<option value="03">March</option>
<option value="04">April</option>
<option value="05">May</option>
<option value="06">June</option>
<option value="07">July</option>
<option value="08">August</option>
<option value="09">September</option>
<option value="10">October</option>
<option value="11">November</option>
<option value="12">December</option>
</select>
<select>
<option value="16"> 2016</option>
<option value="17"> 2017</option>
<option value="18"> 2018</option>
<option value="19"> 2019</option>
<option value="20"> 2020</option>
<option value="21"> 2021</option>
</select>
</div>
<div class="form-group" id="credit_cards">
<img src="assets/images/visa.jpg" id="visa">
<img src="assets/images/mastercard.jpg" id="mastercard">
<img src="assets/images/amex.jpg" id="amex">
</div>
<div class="form-group" id="pay-now">
<button type="submit" class="btn btn-default" id="confirm-purchase">Confirm</button>
</div>
</form>
</div>
</div>``````

Now that we have the needed input fields, we can setup the validation rules.

## Validation

All of the validation we will show here is client side and done exclusively in the JavaScript. If it is HTML validation that you are interested in, check out this article.

To kick things off we will define all the jQuery selectors we will need:

``````var owner = \$('#owner'),
cardNumber = \$('#cardNumber'),
cardNumberField = \$('#card-number-field'),
CVV = \$("#cvv"),
mastercard = \$("#mastercard"),
confirmButton = \$('#confirm-purchase'),
visa = \$("#visa"),
amex = \$("#amex");``````

Then, using Payform.js, we will turn our basic input fields into specialized input for credit card data. We simply need to call the right function and the library will automatically handle text formatting and maximum string length for us:

cardNumber.payform('formatCardNumber'); CVV.payform('formatCardCVC');

Next, we want to be able to give real-time feedback to users while they are typing in their card number. To do so we will write a simple function that does two things:

1. Check if the current text in the field is а valid card number or not. Add appropriate coloring to the text field.
2. Depending on the present input characters, see if the card is either Visa, MasterCard, or American Express. This is done using the `payform.parseCardType()` method.

Since we want to execute the above actions every time a new character is typed in, we will use the jQuery `keyup()` event listener.

``````cardNumber.keyup(function() {
amex.removeClass('transparent');
visa.removeClass('transparent');
mastercard.removeClass('transparent');

if (\$.payform.validateCardNumber(cardNumber.val()) == false) {
cardNumberField.removeClass('has-success');
cardNumberField.addClass('has-error');
} else {
cardNumberField.removeClass('has-error');
cardNumberField.addClass('has-success');
}

if (\$.payform.parseCardType(cardNumber.val()) == 'visa') {
mastercard.addClass('transparent');
amex.addClass('transparent');
} else if (\$.payform.parseCardType(cardNumber.val()) == 'amex') {
mastercard.addClass('transparent');
visa.addClass('transparent');
} else if (\$.payform.parseCardType(cardNumber.val()) == 'mastercard') {
amex.addClass('transparent');
visa.addClass('transparent');
}
});``````

There is one more thing we have to do and that is is check if all the field are holding valid data when the user tries to submit the form.

Name validation can be quite tricky. To keep this tutorial light, we won't be going into that subject, and we will only check if the input name is at least 5 characters long. Payform provides us with the needed methods for validating the rest of the form.

``````confirmButton.click(function(e) {
e.preventDefault();

var isCardValid = \$.payform.validateCardNumber(cardNumber.val());
var isCvvValid = \$.payform.validateCardCVC(CVV.val());

if(owner.val().length < 5){
alert("Wrong owner name");
} else if (!isCardValid) {
alert("Wrong card number");
} else if (!isCvvValid) {
alert("Wrong CVV");
} else {
// Everything is correct. Add your form submission code here.
alert("Everything is correct");
}
});``````

The above validation is for educational purposes only and shouldn't be used on commercial projects. Always include both client-side and server-side validation to your forms, especially when working with credit card data.

## Styles

We are using Bootstrap, so most of the styling is done by the framework. Our CSS mostly covers the size of the input fields and various padding, margin and font tweaks.

### styles.css

``````.creditCardForm {
max-width: 700px;
background-color: #fff;
margin: 100px auto;
overflow: hidden;
padding: 25px;
color: #4c4e56;
}
.creditCardForm label {
width: 100%;
margin-bottom: 10px;
}
.creditCardForm .heading h1 {
text-align: center;
font-family: 'Open Sans', sans-serif;
color: #4c4e56;
}
.creditCardForm .payment {
float: left;
font-size: 18px;
padding: 10px 25px;
margin-top: 20px;
position: relative;
}
.creditCardForm .payment .form-group {
float: left;
margin-bottom: 15px;
}
.creditCardForm .payment .form-control {
line-height: 40px;
height: auto;
padding: 0 16px;
}
.creditCardForm .owner {
width: 63%;
margin-right: 10px;
}
.creditCardForm .CVV {
width: 35%;
}
.creditCardForm #card-number-field {
width: 100%;
}
.creditCardForm #expiration-date {
width: 49%;
}
.creditCardForm #credit_cards {
width: 50%;
margin-top: 25px;
text-align: right;
}
.creditCardForm #pay-now {
width: 100%;
margin-top: 25px;
}
.creditCardForm .payment .btn {
width: 100%;
margin-top: 3px;
font-size: 24px;
background-color: #2ec4a5;
color: white;
}
.creditCardForm .payment select {
padding: 10px;
margin-right: 15px;
}
.transparent {
opacity: 0.2;
}
@media(max-width: 650px) {
.creditCardForm .owner,
.creditCardForm .CVV,
.creditCardForm #expiration-date,
.creditCardForm #credit_cards {
width: 100%;
}
.creditCardForm #credit_cards {
text-align: left;
}
}``````

With this our Credit Card Validation Form is complete!

Original article source at: https://tutorialzine.com/

1607331240

## Credit Risk Modelling in Python

Credit risk modelling in python can help banks and other financial institutions reduce risk and prevent society from experiencing financial crises as in the case of 2008.The objective of this article is to build a model to predict probability of person defaulting a loan. The following steps will be followed in building the model.

1. Data preparation and Pre-processing

2. Feature Engineering and Selection

3. Model Development and Model Evaluation

#python #risk #credit-risk

1623223443

## Predictive Modeling in Data Science

#### Predictive modeling is an integral tool used in the data science world — learn the five primary predictive models and how to use them properly.

Predictive modeling in data science is used to answer the question “What is going to happen in the future, based on known past behaviors?” Modeling is an essential part of data science, and it is mainly divided into predictive and preventive modeling. Predictive modeling, also known as predictive analytics, is the process of using data and statistical algorithms to predict outcomes with data models. Anything from sports outcomes, television ratings to technological advances, and corporate economies can be predicted using these models.

### Top 5 Predictive Models

1. Classification Model: It is the simplest of all predictive analytics models. It puts data in categories based on its historical data. Classification models are best to answer “yes or no” types of questions.
2. Clustering Model: This model groups data points into separate groups, based on similar behavior.
3. **Forecast Model: **One of the most widely used predictive analytics models. It deals with metric value prediction, and this model can be applied wherever historical numerical data is available.
4. Outliers Model: This model, as the name suggests, is oriented around exceptional data entries within a dataset. It can identify exceptional figures either by themselves or in concurrence with other numbers and categories.
5. Time Series Model: This predictive model consists of a series of data points captured, using time as the input limit. It uses the data from previous years to develop a numerical metric and predicts the next three to six weeks of data using that metric.

#big data #data science #predictive analytics #predictive analysis #predictive modeling #predictive models