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 > Investor tips and P2P lending: Investing with LendingClub

Investor tips and P2P lending: Investing with LendingClub

Vincent Ji, Jamie Anderson, Jon Harris and Joe Lu
Posted on Apr 7, 2020
The skills I demoed here can be learned through taking Data Science with Machine Learning bootcamp with NYC Data Science Academy.

Executive Summary

Online Peer-to-peer (P2P) lending is an innovative channel that connects borrowers who need money with lenders who seek competitive returns on investment. In this blog post, we will discuss the P2P lending business model, focusing on LendingClub which is a leading player in the industry. Furthermore, we will introduce data science techniques such as classification models to help investors generate higher returns by identifying high-risk loans. For low-grade loans (grade D or below), the classifiers are able to improve the average return from -1.4% to 7.6%.

The Meteoric Rise of P2P Lending

P2P lending uses technology to operate an online lending marketplace and provide match-making between lenders and borrowers. Its technology-based business model allows it to operate more efficiently and provide service at a lower cost than traditional financial institutes such as banks. As a result, borrowers can get money faster and cheaper while lenders can receive higher returns on investment.

Since its existence in 2005, P2Pโ€™s growth has been nothing short of meteoric. In the five-year period from 2009 to 2014, its market size exploded from $26 million to $1.7 billion.[1] Then from 2015 to 2019, the digital lenders doubled their market share again to the point where, by March 2019, a staggering half of unsecured personal loans were provided by these financial technology firms.[2]  

LendingClub is the worldโ€™s largest internet-based P2P lending company. The company enables borrowers to take out uncollateralized personal loans between $1,000 and $40,000. Borrowers pay back the loans in either 36 or 60 monthly payments with no penalty for prepayment. LendingClub charges origination fees between 1% and 6% of the loan amount.

Fixed interest rates for loans through the company range from 6.95% to 35.89%, depending on applicantsโ€™ risk profile. The interest rates are often lower than those from banks or credit cards. As of the end of 2018, two-thirds of LendingClub loans are either โ€œdebt consolidationโ€ or โ€œpaying off credit card loansโ€(see Figure 1).

Figure 1: Two-thirds of the loans are for debt consolidation and credit card

LendingClub rose to fame in 2013, when they received a $125 million investment from Google. In the same year, former Morgan Stanley CEO John Mack and former Treasury Secretary Larry Summers joined LendingClubโ€™s board.[3]  Since its founding in 2007, LendingClub has facilitated over $50 billion of loans for more than three million borrowers.[4] 

Figure 2: Total P2P loan amount through LendingClub by year

In addition to consumer lending, LendingClub is also an SEC-registered firm that offers loan-backed securities to not only institutional investors but also retail investors. This unique offering presents an opportunity for non-accredited investors to invest in consumer credits which historically were only accessible to accredited investors (e.g., high-net-worth individuals) or institutional investors (e.g., banks or investment firms). The company charges investors a service fee of 1%. 

LendingClub's proprietary algorithm to determine a borrowerโ€™s creditworthiness is rather prudent and rigorous.  It approves only ~10% of loan applications and assigns interest rates proportionally to credit risk based on credit score, payment history, requested loan size, debt-to-income ratio, and other factors. LendingClub allows retail investors to buy fractions of loans that are issued by the platform. This gives investors the flexibility to better manage risk and reward by investing in a mixed range of interest rates and in different loans. 

How to Invest on LendingClub

Investors can choose which loans to invest in on LendingClubโ€™s website just like the way they shop online. To enable investors to make better investment decisions, LendingClub allows investors to select loans based on 29 features, including the grade of the loan, the term of the loan, the borrowerโ€™s debt-to-income ratio, among others.

Figure 3: Available loan and borrower metric filters to the investor

Among these dozens of factors, are there any filters for investors to quickly find winners among the available loans to invest in? It turns out the answer is not as clear-cut as one would have hoped. To start, loan grade is a critically important feature because it determines the interest rate of the loan. About 80% of the loans fall under the top three tiers: A, B, and C, while more speculative tiers D and E make a minority. The riskiest tiers F and G account for less than three percent of the loan universe.

  • Figure 4: Differences in interest rates between loan grades
  • Figure 5: Percent breakdown of rates of the loan charge off  by loan grade

While it is tempting for investors to lend money to lower-grade borrowers at higher interest rates, the probability of default (and loss of principal as a result) for the lower-quality loans is also much higher. For example, grade F and G loans have default rates that are greater than 30%. This is a classic risk-reward trade-off: higher interest rates come with higher risk.

  • Figure 6: Difference in return on investment between 36 and 60-month loans
  • Figure 7: Percentage breakdown of loan term length by loan grade

Loan Term

Loan term, or the length of a loan, is another key factor investors should consider because it determines how long it takes for investors to get back their investment. At a glance, 36-month loans seem to outperform 60-month ones as the 36-month loans generate a similar median return on investment (ROI) with more consistency. However, the difference in ROI expectation is driven by the fact that 36-month loans consist of a higher proportion of high-grade (A, B, and C) loans. 

As illustrated by the loan grade and loan term examples above, loan features are interconnected; there is no magic bullet for investing on the LendingClub platform. As a matter of fact, even if an investor invests only in high-grade loans, he or she may still lose up to 100% of the investment. It is apparent that univariate and bivariate analyses are not enough to create a sound investment strategy. 

Figure 8: 100% loss of investment may occur regardless of loan grade.

Use of Machine Learning to Improve Investment 

Due to the interconnectivity of known features, we employed machine learning classification algorithms to predictively categorize high-risk and low-risk loans, as defined by a loss of 20% on the principal. Loss on investments can be expected no matter what the venture, however our primary investment strategy is risk aversion and avoidance of high-risk loans.

As such, it would be advantageous to be able to predict low-risk loans (ROI > -20%) and high-risk loans (ROI < -20%). Although seemingly arbitrary, The cutoff of -20% ROI was selected based on the 25th percent quartiles shown in Figure 8. For Grades A-C, more than 75% of all loans resulted in a profit (+ROI), whereas losses were more frequent in Grade D-G, the more profitable loans. 

Classification algorithms used in the present case-study included logistic regression and eXtreme gradient boosting (XGBoost) tree-based models. Logistic regression was used because it is efficient, highly interpretable (doesn't require input scaling), and is easy to regularize and train.

However, the model is limited to linear problems, which is unknown in the current study. Alternatively, the tree-based XGBoost model was implemented as it is more robust when solving a nonlinear problem, however, this flexibility comes at a great cost computationally as multiple hyperparameters require tuning. 

The ultimate goal of our classification algorithm was to avoid false positives, ie. misclassifying high-risk loans as low-risk. False negatives were considered less harmful as they represented a loss of potential profit, not actual investment loss.

Key Metrics

Therefore, two key metrics were used to evaluate the accuracy of our models: (1) precision, the fraction of actual positives of all true and false positives; and (2) false discovery rate (FDR), the fraction of incorrectly predicted positives of all true and false positives. Based on the selected -20% ROI threshold, low-risk loans constituted a majority of the loans (83.8%) - high-risk loans made up only 16.2% - creating an imbalanced classification problem. 

While multiple techniques are available to address data imbalance such as down-sampling the majority class, or up-sampling the minority class, both classification packages in SKLEARN possess parameters within the algorithms that address imbalance instead of tweaking the data fed into the models  (Logistic: class_weight; and XGBOOST: scale_pos_weight).

The implementation of these parameters improved the False Discovery Rate (Table 1). The null model, assuming all loans were low-risk loans, would produce an FDR of 16.2%. Without addressing data imbalance, logistic regression and XGBoost models resulted in FDRs of 16.2% and 15.9% respectively; while tuning the class_weight and scale_pos_weight dramatically improved the FDR to 9.3% and 9.2%, respectively.

Following hyperparameter tuning of both Logistic Regression and XGBoost, both models improved the precision from 83.8% (null model) to 90.7% and 90.8%, respectively; indicating that approximately 90% of the loans identified as a low-risk loan (ROI > -20%) were, in fact, a low-risk loan (Table 2). 

Gain

Finally, feature importance as defined by the gain, ie. the improvement in accuracy brought by the specific feature to the branches the feature is on is presented (Figure 9).

Across all features available to the investor, the top five features contributing to the accuracy of the model include (1) grade; (2) whether or not the loan term limit is 60mo; (3) interest rate; (4) whether the borrower rents their home; and (5) whether the income of the borrower is non-verified.

Despite the interconnectivity of the features available to the investor, grade, loan-term length, and interest rate appear to overwhelmingly contribute to the outcome of the loan. This is reassuring as it indicates the proprietary LendingClub grading system provides some indication about the performance of a loan. However, a real-world case study would better articulate the utility of machine learning. 

Figure 9: XGBoost Model Feature Importance

CASE STUDIES

Case Study 1 - Power of Diversity:

Despite the overwhelming contribution of loan grade on the outcome of the loan, not only is a profit not guaranteed, but it is possible to lose 100% of the principal regardless of the grade, as noted in Figure 8. Nobel-prize winning economist Harry Markowitz developed a heuristic, the Modern Portfolio Theory (MPT), to minimize the effect of risk.

The central thesis of MPT is allocating financial risk across multiple investments in an effort to sufficiently reduce such risk, perhaps captured best by the idiom โ€˜do not put all your eggs in one basketโ€™. Take stocks, for example, a collection of multiple stocks have a lower risk than a single stock does. 

Regarding the available LendingClub data set, diversification can occur by (1) increasing the number of loans, and (2) diversifying the grade of the loan. To assess the baseline approach of diversification by the number of loans, simulated portfolios of 20 and 100 completed Grade A loans were randomly selected, repeating 1,000 times.

The distribution of the ROI of the portfolios is found in Figure 10. In this example, increasing the number of loans stabilized the ROI of the investment (Mean ROI: 5.2%ยฑ1.4% vs. 5.2%ยฑ3.3%), and minimizing the loss of the worst performing portfolio (-1.0% vs. -8.5%).  

Figure 10. ROI distribution of 1000 portfolios of 20 and 100 Grade A loans

Risk Diversification

Alternatively, risk diversification across loan grades had, on average, a deleterious effect on ROI of the simulated portfolios when comparing 100 grade A loans, and 100 mixed grade loans. While the best performing mixed grade portfolio saw a 12.7% ROI compared to just 9.3% of the grade A portfolio, on average, the grade A portfolio outperformed the mixed grade counterpart (Mean ROI: 5.2%ยฑ1.4% vs. 1.0%ยฑ3.5%) and minimized the loss of the worst performing portfolio (-1.0% vs. -8.7%).

Figure 11: ROI distribution of 1000 simulated portfolios of 100 grade A and mixed grade loans

Case Study 2 - Attempt to maximize ROI with the use of XGBoost Classifier:

The previous case study found that diversification across loan grades did not minimize risk, and in fact likely increased risk; this result is possibly due to the high rates of charge off of high-risk loans (Grade D-G) as noted in Figure 5, despite the higher interest rates.

Therefore, it may be advantageous to use machine learning techniques to predict profitable high-risk loans. As such, the second case study sought to compare simulated portfolios (n=1000) of the following loan structures: (1) 100 grade A loans; (2) 100 mixed grade loans; and (3) 100 mixed grade loans randomly selected from predicted low-risk loans (ROI > -20%).  Table 3 and Figure 12 highlights the observed differences.

Our predictive classification algorithm improved risk diversification across loan grades such that it improved portfolio ROI compared to grade A portfolios by, on average, 1.5%; the best performing portfolio outperformed the grade A portfolio by 6.3% while nearly eliminating the downside risk (worst portfolio: -2.0% vs .-1.0%, respectively). Compared to the original mixed grade portfolios, the use of the classifier improved the mean portfolio ROI by 5.5% while improving the worst-case scenario ROI by 6.7%. 

Figure 12: ROI distribution of 1000 simulated portfolios of (1) 100 grade A, (2) 100 mixed grade loans, and (3) 100 mixed grade loans identified as low-risk by the classification algorithm

Case Study 3 - Where is the Benefit of the Classification Model Observed:

We performed a third case study to better understand the effectiveness of the predictive classifier across grades, and how that might have contributed to the results seen in the second case study. As such, we compared simulated portfolios (n=1000) of the following loan structures: (1) 100 low-risk loans (Grade A-C), with and without the use of the classifier; and (2) 100 high-risk loans (Grade <C), both with and without the use of the classifier.

Results from the present case study are found in Table 4, Figures 13 and 14. For low-risk loans, the use of the classifier had negligible results when compared across average ROI, and ROI of the worst- and best-performing portfolios. However, improvements in ROI with the use of the classifier are largely observed in the lower grade loans. Most significantly, while investing in high-risk loans resulted in a loss of principal on average, our predictive classifier produced a mean portfolio ROI of 7.9%, a 9% increase. 

  • Figure 13: Comparison of simulated portfolio ROI of low-risk loans with and without the use of the predictive classifier
  • Figure 14: Comparison of simulated portfolio ROI of high-risk loans with and without the use of the predictive classifier

Future Work

One area we would like to improve in the future is to back-test our models. For example, we can train the models using 2007 to 2015 data and observe how accurate they are at predicting outcomes of the loans that were issued in 2016.  In addition, the lending club dataset has its inherent limitation because almost all loans were issued during an economic expansion post-2008 financial crisis. To make our models robust enough to predict loan outcomes under any economic conditions, we would need data for at least a full business cycle. 

About Authors

Jamie Anderson: LinkedIn

Jon Harris: LinkedIn

Vincent Ji: LinkedIn

Joe Lu: LinkedIn

About Authors

Vincent Ji

Vincent is a data scientist and a former research data associate at Bridgewater Associates. Prior to that, he was an associate at BlackRock, focusing on data analytics, business strategy, and implementation. He started his career as a management...
View all posts by Vincent Ji >

Jamie Anderson

View all posts by Jamie Anderson >

Jon Harris

Jon is a certified Data Scientist and accomplished quantitative healthcare researcher with real-world experience in research methodologies, interpreting experimental results data, statistical and machine learning modeling, and creating data-driven narratives for multi-level stakeholders. Looking to utilize my strong...
View all posts by Jon Harris >

Joe Lu

I am a data scientist with 4 years of modeling experience, and 7+ years of financial industry experience. I have a passion for leveraging the power of data science to solve business challenges. At Fidelity, I have upgraded,...
View all posts by Joe Lu >

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