Hello, dear friend, you can consult us at any time if you have any questions, add WeChat: daixieit

Big Data Applications in Finance

Individual Assignment

2022

What am I grading you on?

I want to test your ability to use models learned during the first part of the course and to synthesize the insights in a concise way into a report. This assignment requires you to apply all the skills learned during your first part of the term, and the models learned during the lectures. Your ability to estimate the model is only half of the challenge. Your interpretation of the findings matter equally.


Can I ask assignment related questions during ofce hours?

The questions that your TA and I will answer are only to clarify the meaning of a question. We will not provide suggestions about what you are doing is “right”, or “wrong”, or suggest ways to improve your code. However, if you have doubts on estimating a model, we then ask you to phrase your questions on the tutorial datasets and models, so that we are able to provide guidance.

The dataset provided to you should not have many challenges to resolve before you estimate a model. However, if you face any challenges while using the data on Python, do reach out to us. I strongly recommend that you work on your assignment in your computer, and not on the cloud so that you have complete control over the file. Any excuses that the file was not “saved”, or went “missing” on the cloud will not be entertained.

Submission les

You are expected to create a .ipynb file (a Jupyterlab notebook) with the code as part of your submission. The notebook file should be self-contained, i.e., I should be able to run the code on my computer loading the same data file without any error and ideally obtain what there is in the .mat file. In addition to the Python notebook code, you are expected to create a PDF submission of no more than 5 pages, that present your evaluation of the models.

The Assignment

LendingClub is an American peer-to-peer lending company, currently the world’s largest platform that allows for individuals to both invest and borrow on the platform. Borrowers can obtain unsecured personal loans from the platform, and this assignment is set up for you to assess your ability to predict defaulters in the data using the predictors provided in the data.

The data is a random sample of loans issued on the platform between 2007 − 2015, including the loan status, and payment information. The data also contains a number of predictors that have been documented in the variables description file provided to you named “ECOM151-Assignment- VariableDescription.xlsx”. For tractability, your assignment focuses only on a small set of variables

available for prediction.

You have been provided with a main .csv data le:

 

Data: This is the data set that should be used for the assignment.

 

varDescription: This is a replication of the variable description available in the excel spreadsheet provided to you.

Question A (15 points)

This question expects you to estimate five different class of models to identify the best model to predict default on the LendingClub platform.

Set up and visualise the data (5 points)

 Load the files as pandas dataframe on your work environment.

 

 Search for missing observations and restrict the set of predictors by taking out those predictors

for which we have more than 10 observations missing.

 

• Visualise the distribution of the loan  amount and the interest  rate against the loan grade.

 

• Sample splitting: retain 70% of the observations as training sample and the remaining 30% of observations as testing sample.

 

Logistic regression and classication tree (5 points)

 Estimate a logistic regression and calculate its confusion matrix

 

 Compare the forecasted probability of default from the logistic regression against a ”no-skill”

predictor which just take the majority class as forecast. Comparison is based on the ROC curve.

 Estimate a simple classification tree without cross-validating the parameters.

 

 Compare the forecasted probability of default from the classification tree against the logistic

regression and the no-skill” prediction. Comparison is based on the ROC curve.

 

Cross validation and random forests (5 points)

• Estimate a simple classification tree with max depth and min samples leaf parameters cross validated. The set of options is outlined in the notebook.

 

 Compare the forecasted probability of default from the classification tree with and without

cross-validation against the logistic regression and the ”no-skill” prediction. Comparison is based on the ROC curve.

• Estimate a random forest with n estimators = 10.

 

 Compare the forecasted probability of default against all models estimated above. Comparison

is based on the ROC curve.

 

Question B (5 points)

You are required to synthesize all the work in Question A to submit a “Prediction Report” to your manager on your ability to predict default for borrowers on the LendingClub platform. Utilize all the information you have generated to write a report no longer than 5 pages and present your best model to your manager. Pay attention to explain why it is the best model, in terms of its out of sample predictive power, and visualize the model’s predictive power compared to the other models on hand.