- Credit Risk Modelling - Case Studies
- Classification vs. Regression Models
- Case Study - German Credit - Steps to Build a Predictive Model
- Import Credit Data Set in R
- German Credit Data : Data Preprocessing and Feature Selection in R
- Credit Modelling: Training and Test Data Sets
- Build the Predictive Model
- Logistic Regression Model in R
- Measure Model Performance in R Using ROCR Package
- Create a Confusion Matrix in R
- Credit Risk Modelling - Case Study- Lending Club Data
- Explore Loan Data in R - Loan Grade and Interest Rate
- Credit Risk Modelling - Required R Packages
- Loan Data - Training and Test Data Sets
- Data Cleaning in R - Part 1
- Data Cleaning in R - Part 2
- Data Cleaning in R - Part 3
- Data Cleaning in R - Part 5
- Remove Dimensions By Fitting Logistic Regression
- Create a Function and Prepare Test Data in R
- Building Credit Risk Model
- Credit Risk - Logistic Regression Model in R
- Support Vector Machine (SVM) Model in R
- Random Forest Model in R
- Extreme Gradient Boosting in R
- Predictive Modelling: Averaging Results from Multiple Models
- Predictive Modelling: Comparing Model Results
- How Insurance Companies Calculate Risk

# Credit Risk Modelling - Case Study- Lending Club Data

To build a good model, it is important to use high quality data. For the purpose of this course, we will use the loan data available From LendingClub's website. LendingClub is a US peer-to-peer lending company which matches borrowers with investors willing to fund their loans.

LendingClub provides rich datasets a which are available to public for analysis and can be downloaded from the following link:

https://www.lendingclub.com/info/download-data.action

We have downloaded the data for 2016 Quarter 1, which contains complete loan data for all loans issued during Q1 2016, including the current loan status (Current, Late, Fully Paid, etc.) and latest payment information. When you download the data file (csv), the original file is named **LoanStats_2016Q1.csv**. We have renamed the file to **loan_data_2017.csv** for simplicity. (Note: This is a big file - 109MB)

Before we begin building our model, our first step would be to explore the data, understand more about it, and also transform the data where necessary so that it is suitable for analysis. We have intentionally chosen to demonstrate things here starting with the raw data file in order to emulate a real model building scenario.

Download the data file either directly from the LendingClub website or from the link below:

Once the file is downloaded, move it to your R working directory. This tutorial is creating on a MacBook, so the paths are set according the MacBook’s folder structure.

```
> setwd("~/Dropbox/Finance Train/Courses/Credit_Risk_Modelling_R")
```

# This content is for paid members only.

Join our membership for lifelong unlimited access to all our data science learning content and resources.