NYC Data Science Academy| Blog
Bootcamps
Lifetime Job Support Available Financing Available
Bootcamps
Data Science with Machine Learning Flagship ๐Ÿ† Data Analytics Bootcamp Artificial Intelligence Bootcamp New Release ๐ŸŽ‰
Free Lesson
Intro to Data Science New Release ๐ŸŽ‰
Find Inspiration
Find Alumni with Similar Background
Job Outlook
Occupational Outlook Graduate Outcomes Must See ๐Ÿ”ฅ
Alumni
Success Stories Testimonials Alumni Directory Alumni Exclusive Study Program
Courses
View Bundled Courses
Financing Available
Bootcamp Prep Popular ๐Ÿ”ฅ Data Science Mastery Data Science Launchpad with Python View AI Courses Generative AI for Everyone New ๐ŸŽ‰ Generative AI for Finance New ๐ŸŽ‰ Generative AI for Marketing New ๐ŸŽ‰
Bundle Up
Learn More and Save More
Combination of data science courses.
View Data Science Courses
Beginner
Introductory Python
Intermediate
Data Science Python: Data Analysis and Visualization Popular ๐Ÿ”ฅ Data Science R: Data Analysis and Visualization
Advanced
Data Science Python: Machine Learning Popular ๐Ÿ”ฅ Data Science R: Machine Learning Designing and Implementing Production MLOps New ๐ŸŽ‰ Natural Language Processing for Production (NLP) New ๐ŸŽ‰
Find Inspiration
Get Course Recommendation Must Try ๐Ÿ’Ž An Ultimate Guide to Become a Data Scientist
For Companies
For Companies
Corporate Offerings Hiring Partners Candidate Portfolio Hire Our Graduates
Students Work
Students Work
All Posts Capstone Data Visualization Machine Learning Python Projects R Projects
Tutorials
About
About
About Us Accreditation Contact Us Join Us FAQ Webinars Subscription An Ultimate Guide to
Become a Data Scientist
    Login
NYC Data Science Acedemy
Bootcamps
Courses
Students Work
About
Bootcamps
Bootcamps
Data Science with Machine Learning Flagship
Data Analytics Bootcamp
Artificial Intelligence Bootcamp New Release ๐ŸŽ‰
Free Lessons
Intro to Data Science New Release ๐ŸŽ‰
Find Inspiration
Find Alumni with Similar Background
Job Outlook
Occupational Outlook
Graduate Outcomes Must See ๐Ÿ”ฅ
Alumni
Success Stories
Testimonials
Alumni Directory
Alumni Exclusive Study Program
Courses
Bundles
financing available
View All Bundles
Bootcamp Prep
Data Science Mastery
Data Science Launchpad with Python NEW!
View AI Courses
Generative AI for Everyone
Generative AI for Finance
Generative AI for Marketing
View Data Science Courses
View All Professional Development Courses
Beginner
Introductory Python
Intermediate
Python: Data Analysis and Visualization
R: Data Analysis and Visualization
Advanced
Python: Machine Learning
R: Machine Learning
Designing and Implementing Production MLOps
Natural Language Processing for Production (NLP)
For Companies
Corporate Offerings
Hiring Partners
Candidate Portfolio
Hire Our Graduates
Students Work
All Posts
Capstone
Data Visualization
Machine Learning
Python Projects
R Projects
About
Accreditation
About Us
Contact Us
Join Us
FAQ
Webinars
Subscription
An Ultimate Guide to Become a Data Scientist
Tutorials
Data Analytics
  • Learn Pandas
  • Learn NumPy
  • Learn SciPy
  • Learn Matplotlib
Machine Learning
  • Boosting
  • Random Forest
  • Linear Regression
  • Decision Tree
  • PCA
Interview by Companies
  • JPMC
  • Google
  • Facebook
Artificial Intelligence
  • Learn Generative AI
  • Learn ChatGPT-3.5
  • Learn ChatGPT-4
  • Learn Google Bard
Coding
  • Learn Python
  • Learn SQL
  • Learn MySQL
  • Learn NoSQL
  • Learn PySpark
  • Learn PyTorch
Interview Questions
  • Python Hard
  • R Easy
  • R Hard
  • SQL Easy
  • SQL Hard
  • Python Easy
Data Science Blog > Capstone > LendingClub Grade Optimization

LendingClub Grade Optimization

Kevin Corrigan
Posted on Mar 7, 2024

Introduction

In 2007, the startup LendingClub became the first peer-to-peer lending platform to offer registered investors the opportunity to purchase personal loans. Borrowers for these loans would apply for an amount between $1,000 - $40,000 and would either be approved or denied by LendingClub. The loans held a term of 3 or 5 years and could be issued for various purposes such as financing a major purchase or debt consolidation. Once approved, the loans would be issued a grade and placed into a catalog for investors to browse.

 

Investors registered at LendingClub were able to browse the catalog of available loans to determine where they wanted to invest their personal capital. Basic information about the loan, such as remaining principle, interest rate, and remaining term, was provided. LendingClub also provided background information about the borrower, including debt to income ratio, marital status (joint or single loan), and profession. The most important piece of information was the loan grade. The grades were designated by letters A-G, with A being the highest quality loans and G being the lowest. Each grade was also further divided into five sub-grades, such as A1-A5. 

 

The primary risk in investing with LendingClub was that none of the loans were secured by any entity. Investors held all of the risk if the borrowers were to default on their loans. As such, the difference between seeing a good return on the loan or losing one's investment often came down to finding which borrowers were most likely to follow through on their payment plans.

 

Purpose

The goal of this project was to determine what loans on LendingClubโ€™s platform would provide investors with maximum return on investment. Given that the loans were unsecured, investors needed to be careful to pick loans that would not default before repaying the original investment. Initial investigation into the dataset will prove that higher grades were given to safer loans, and riskier investments received worse grades. However, because riskier loans typically command higher interest rates, it would be possible to take much higher profits on lower grade loans that did follow through with 100% of their payments. This project employed machine learning methods to reprioritize the LendingClub grading system to find the right balance of risk vs reward to maximize investor profits. 

 

Data Preprocessing and EDA

The LendingClub Loan dataset houses information on over two million loans issued from 2007 to 2020. The data consists of 151 features to provide a comprehensive picture of both the loan and borrower. 

 

Before exploring trends in the dataset, all null values had to be addressed. First, I dropped the 33 loans did not have a grade recorded from the dataset. Beyond the missing row data, many of the columns in the dataset had most of their data missing. These features were addressed individually to determine the best method of removing the null values. For the most part, the features were either removed, or their missing data was imputed with an appropriate placeholder.

 

Once the data had been cleaned, the LendingClub grading system was investigated. The first step to determining if there was any room for improvement on the grading system was to identify how it was established. By looking at the number and percentage of fully paid or charged off loans, it can be clearly seen where LendingClubโ€™s priorities were. Figure 1 showcases the relationship with the charge off percentage and grade.

 

Figure 1: Fully Paid/Charged Off Loan Count and Percentage by Grade

 

The first plot in Figure 1 demonstrates the nominal distribution of fully paid and charged off loans LendingClub offered during their peer-to-peer lending tenure. The majority of loans accepted by LendingClub were given higher grades. The second plot in Figure 1 gives a clue as to why this occurred. When looking at the charge off rate of loans by grade, a very clear linear relationship forms. In fact, the relationship has a 99.7% correlation.

Simply put, each drop in grade corresponded to a direct and consistent increase in likelihood of charge off, proving the main objective for LendingClubโ€™s grading scheme was risk prevention. Risk averse investors would find this grading system very helpful, but any investors willing to assume some risk in order to maximize their returns may be leaving money on the table. 

Figure 2: Final Earnings Distribution by Grade

 

Figure 2 shows a curious relationship between profit and grade. As it turns out, the average return for all grades was roughly consistent, just above the break even line. The โ€˜safeโ€™ loan grades (A-C) had the advantage over the other grades in that the top three quartiles all fell above the breakeven point. This is consistent with the logic determined from Figure 1; the higher grades were more likely to reach fully paid status vs charge off. However, the maximum amount of profit that could be achieved in the safe grades was far lower than the riskier grades. Figures 3 and 4 provide clues to explain this trend. 

Figure 4: Interest Rate by Grade

 

In Figure 3, the distribution of loan amount is seen to increase for the riskier loan grades. Logically, the more money a borrower requests, the harder it will be for them to pay back in full. Additionally, the majority of the lower grade loans were over a longer term, five years as opposed to three. As with a larger principal, longer term loans could be considered more difficult to pay off due to the extended period of financial obligation for the borrower.

To compensate for the liability the investors incur with the riskier loans, lower grade loans are assigned higher interest rates, as seen in Figure 4. When considering only loans that will eventually be paid in full, it is clear that the earning potential is far greater for the lower grades. Higher average loan amounts multiplied by greater interest payments lead to the upper bound trend seen in Figure 2. By this point, it is clear that there is room to improve upon the LendingClubโ€™s gradings scheme. It's a matter of shifting the focus from risk avoidance to maximizing return on investment. 

 

Feature Generation and Predictive Modeling

After establishing evidence of a potentially more lucrative prioritization of LendingClub loans, it was time to turn to predictive modeling. The first step was to determine a variable to predict. Return on investment (feature named ROI) was calculated for all completed loans by dividing the sum of all payments received by the original investment provided. The investor received payments in three forms: principal payment, interest payments, and delinquency payments/fines. While delinquencies are normally a cause for concern for the financial health of the borrower, it is still money collected by the investor. Borrowers who incur delinquencies but end up following through on all payments will end up paying more for their loan. Similar to borrowers who must pay higher interest rates, borrowers who incur delinquency fines but do not default on payment will end up paying the investor more money overall.

For the predictive model stage of this project, the goal was to find a model that accurately predicted the ROI for each loan. To generate the models, the dataset was filtered to only include loans that had status Fully Paid or Charged Off. All other statuses were for loans that were still actively being paid and therefore would continue to increase ROI. Only Fully Paid and Charged Off statuses had reached their final ROI.

 

After filtering to completed loans, two regression models and two forest models were generated:

  1. Lasso Regression
  2. Ridge Regression
  3. Random Forest
  4. Random Forest with RandomizedSearchCV

All models used a train-test split of 20%-80% and were evaluated by their train and test R2 scores. The Lasso and Ridge models performed the worst overall, though they had very little bias, both scoring around 79% and 80% for their test and train correlation scores respectively. The random forest models performed far better, though they did fall into more bias. The traditional random forest model scored 94.2% test R2 but had a large amount of bias with a 99.2% train R2. Comparatively, the random forest model using RandomizedSearchCV (to allow fine tuning of parameters) resulted in a 93.9% test R2 and 97.8% train R2. With less of a gap between the train and test data, this model was chosen to predict ROI for the incomplete data.

 

By applying the predictive model to the incomplete dataset, a new grading criteria could be constructed. The LendingClub dataset provided A grade loans to the top 17.45% of loans, 29.16% to grade B, 28.36% to C, etc., so the new ROI focused grading scheme was divided into the same group sizes. Figure 5 showcases the distribution of LendingClubโ€™s grades for the new top tier grades. 

 

Figure 5: Quantity of Each LC Grade in New โ€˜Aโ€™ Grade

 

Because the focus of the new A grade was ROI, Figure 5 confirms the predictions stated above. The mid-level LendingClub grades outperform the top grades due to higher earning potential mixed with likelihood of full payment. 

 

Tables 1 and 2 account for the financial impact of using the ROI focused grading scheme over LendingClubโ€™s risk-averse version.

 

Grade Dataset % Avg. ROI Avg. Profit ($) Total Profit ($)
A 17.45 1.053 748.89 176,099,000.94
B 29.16 1.054 694.71 273,057,075.17
C 28.36 1.031 391.05 149,481,492.19
D 14.96 1.013 80.62 16,252,819.06
E 6.99 0.992 -220.63 -20,775,556.27
F 2.40 0.969 -739.24 -23,872,946.23
G 0.69 0.913 -1746.23 -16,264,382.13

Table 1: LendingClubโ€™s Grading Scheme Performance

 

Dataset % Avg. ROI Avg. Profit ($) Total Profit ($)
17.45 1.310 6,103.63 1,435,548,538.10
29.16 1.165 2,055.13 807,719,246.37
28.36 1.084 750.88 287,018,736.91
14.96 0.846 -1578.91 -318,360,674.62
6.99 0.380 -9,061.56 -853,707,915.30
2.40 0.190 -17,265.89 -558,482,531.63
0.69 0.066 -26,807.82 -245,720,507.60

Table 2: ROI Focused Grading Scheme Performance

 

The difference in performance between Tables 1 and 2 is substantial for investors looking to maximize their profits. With an average profit of over $6,000 compared to just $750 for A grade loans, it is clear that the LendingClub grading system is not optimized and that the new model can help investors maximize their earning potential. 

 

Future Work

Unfortunately there were some limiting factors with this project that require additional time and resources to overcome. First, the size of the dataset created a challenge with model generation because all two million loans could not efficiently be analyzed in the same model. Several subsets of 10,000 loans each were used to develop a reasonably accurate prediction of ROI. With greater computing power, all loans could be used to hopefully improve the performance of the model. Additionally, this project did not dive into sub-grades, which could provide further nuance for loan selection. 

 

About Author

Kevin Corrigan

View all posts by Kevin Corrigan >

Related Articles

Capstone
Catching Fraud in the Healthcare System
Capstone
The Convenience Factor: How Grocery Stores Impact Property Values
Capstone
Acquisition Due Dilligence Automation for Smaller Firms
Machine Learning
Pandemic Effects on the Ames Housing Market and Lifestyle
Machine Learning
The Ames Data Set: Sales Price Tackled With Diverse Models

Leave a Comment

No comments found.

View Posts by Categories

All Posts 2399 posts
AI 7 posts
AI Agent 2 posts
AI-based hotel recommendation 1 posts
AIForGood 1 posts
Alumni 60 posts
Animated Maps 1 posts
APIs 41 posts
Artificial Intelligence 2 posts
Artificial Intelligence 2 posts
AWS 13 posts
Banking 1 posts
Big Data 50 posts
Branch Analysis 1 posts
Capstone 206 posts
Career Education 7 posts
CLIP 1 posts
Community 72 posts
Congestion Zone 1 posts
Content Recommendation 1 posts
Cosine SImilarity 1 posts
Data Analysis 5 posts
Data Engineering 1 posts
Data Engineering 3 posts
Data Science 7 posts
Data Science News and Sharing 73 posts
Data Visualization 324 posts
Events 5 posts
Featured 37 posts
Function calling 1 posts
FutureTech 1 posts
Generative AI 5 posts
Hadoop 13 posts
Image Classification 1 posts
Innovation 2 posts
Kmeans Cluster 1 posts
LLM 6 posts
Machine Learning 364 posts
Marketing 1 posts
Meetup 144 posts
MLOPs 1 posts
Model Deployment 1 posts
Nagamas69 1 posts
NLP 1 posts
OpenAI 5 posts
OpenNYC Data 1 posts
pySpark 1 posts
Python 16 posts
Python 458 posts
Python data analysis 4 posts
Python Shiny 2 posts
R 404 posts
R Data Analysis 1 posts
R Shiny 560 posts
R Visualization 445 posts
RAG 1 posts
RoBERTa 1 posts
semantic rearch 2 posts
Spark 17 posts
SQL 1 posts
Streamlit 2 posts
Student Works 1687 posts
Tableau 12 posts
TensorFlow 3 posts
Traffic 1 posts
User Preference Modeling 1 posts
Vector database 2 posts
Web Scraping 483 posts
wukong138 1 posts

Our Recent Popular Posts

AI 4 AI: ChatGPT Unifies My Blog Posts
by Vinod Chugani
Dec 18, 2022
Meet Your Machine Learning Mentors: Kyle Gallatin
by Vivian Zhang
Nov 4, 2020
NICU Admissions and CCHD: Predicting Based on Data Analysis
by Paul Lee, Aron Berke, Bee Kim, Bettina Meier and Ira Villar
Jan 7, 2020

View Posts by Tags

#python #trainwithnycdsa 2019 2020 Revenue 3-points agriculture air quality airbnb airline alcohol Alex Baransky algorithm alumni Alumni Interview Alumni Reviews Alumni Spotlight alumni story Alumnus ames dataset ames housing dataset apartment rent API Application artist aws bank loans beautiful soup Best Bootcamp Best Data Science 2019 Best Data Science Bootcamp Best Data Science Bootcamp 2020 Best Ranked Big Data Book Launch Book-Signing bootcamp Bootcamp Alumni Bootcamp Prep boston safety Bundles cake recipe California Cancer Research capstone car price Career Career Day ChatGPT citibike classic cars classpass clustering Coding Course Demo Course Report covid 19 credit credit card crime frequency crops D3.js data data analysis Data Analyst data analytics data for tripadvisor reviews data science Data Science Academy Data Science Bootcamp Data science jobs Data Science Reviews Data Scientist Data Scientist Jobs data visualization database Deep Learning Demo Day Discount disney dplyr drug data e-commerce economy employee employee burnout employer networking environment feature engineering Finance Financial Data Science fitness studio Flask flight delay football gbm Get Hired ggplot2 googleVis H20 Hadoop hallmark holiday movie happiness healthcare frauds higgs boson Hiring hiring partner events Hiring Partners hotels housing housing data housing predictions housing price hy-vee Income industry Industry Experts Injuries Instructor Blog Instructor Interview insurance italki Job Job Placement Jobs Jon Krohn JP Morgan Chase Kaggle Kickstarter las vegas airport lasso regression Lead Data Scienctist Lead Data Scientist leaflet league linear regression Logistic Regression machine learning Maps market matplotlib Medical Research Meet the team meetup methal health miami beach movie music Napoli NBA netflix Networking neural network Neural networks New Courses NHL nlp NYC NYC Data Science nyc data science academy NYC Open Data nyc property NYCDSA NYCDSA Alumni Online Online Bootcamp Online Training Open Data painter pandas Part-time performance phoenix pollutants Portfolio Development precision measurement prediction Prework Programming public safety PwC python Python Data Analysis python machine learning python scrapy python web scraping python webscraping Python Workshop R R Data Analysis R language R Programming R Shiny r studio R Visualization R Workshop R-bloggers random forest Ranking recommendation recommendation system regression Remote remote data science bootcamp Scrapy scrapy visualization seaborn seafood type Selenium sentiment analysis sentiment classification Shiny Shiny Dashboard Spark Special Special Summer Sports statistics streaming Student Interview Student Showcase SVM Switchup Tableau teachers team team performance TensorFlow Testimonial tf-idf Top Data Science Bootcamp Top manufacturing companies Transfers tweets twitter videos visualization wallstreet wallstreetbets web scraping Weekend Course What to expect whiskey whiskeyadvocate wildfire word cloud word2vec XGBoost yelp youtube trending ZORI

NYC Data Science Academy

NYC Data Science Academy teaches data science, trains companies and their employees to better profit from data, excels at big data project consulting, and connects trained Data Scientists to our industry.

NYC Data Science Academy is licensed by New York State Education Department.

Get detailed curriculum information about our
amazing bootcamp!

Please enter a valid email address
Sign up completed. Thank you!

Offerings

  • HOME
  • DATA SCIENCE BOOTCAMP
  • ONLINE DATA SCIENCE BOOTCAMP
  • Professional Development Courses
  • CORPORATE OFFERINGS
  • HIRING PARTNERS
  • About

  • About Us
  • Alumni
  • Blog
  • FAQ
  • Contact Us
  • Refund Policy
  • Join Us
  • SOCIAL MEDIA

    ยฉ 2025 NYC Data Science Academy
    All rights reserved. | Site Map
    Privacy Policy | Terms of Service
    Bootcamp Application