How to calculate expected value in the following scenario

744 Views Asked by At

Here is the problem I'm working on: Your bank makes 1,000 loans for 180,000 for each loan. The probability of default is 2%. The loss per loan that defaults is 120,000. The way your bank can give out loans and not lose money is by charging an interest rate. If you charge an interest rate of, say, 2% you would earn 3,600 for each loan that doesn't foreclose. At what percentage should you set the interest rate so that your expected profit totals 100,000. Hint: Create a sampling model with expected value 100 so that when multiplied by the 1,000 loans you get an expectation of 100,000. Corroborate your answer with a Monte Carlo simulation.

The first part of the question asks me to calculate the percentage to set the interest rate so that the bank's expected profit totals 100,000. I'm really struggling with how to do this and was hoping someone in the community could get me going in the right direction.

For the Monte Carlo simulation, I am using RStudio and I created a model as follows:

library(dplyr)
pool <- rep(c(0, 1), 1000 * c(1 - 0.02, 0.02))
loans <- data.frame(i = numeric(1000),
                    p = numeric(1000),
                    int = numeric(1000),
                    def = numeric(1000),
                    earn = numeric(1000))
for (i in 1:1000){
  loans$i[i] <- i
      loans$p[i] <- 180000
  loans$def[i] <- sample(pool, 1, replace = TRUE)
      loans$int <- 0.02
  loans$earn[i] <- ifelse(loans$default[i] == 1, -120000, 3600)
}

Can someone point me in the right direction on how to do the simulation. I'm very good with R and just need some direction.

1

There are 1 best solutions below

4
On BEST ANSWER

The mean profit for a given \$180,000 loan is $-0.02 \cdot 120000 + 0.98 \cdot r \cdot 180000=176400r-2400$, where $r$ is the interest rate (as a fraction, not a percentage). You want the mean of one loan to be $100$ so $r$ should be $\frac{2500}{176400} \approx 0.0142$.

You then want to do a Monte Carlo simulation: take a sample of 1000 values from this distribution and compute the total. But this isn't hard; your profit is $-120000$ with probability $0.02$ and $180000r \approx 2551$ with probability $0.98$. So you can sample 1000 elements from this distribution using a code like this (this is MATLAB, but R can do the same easily enough):

u = rand(1000,1);
x = zeros(1000,1);
for i=1:1000
  if u(i)<0.02
    x(i)=-120000;
  else 
    x(i)=2551;
  end
end
mean(x)

and you expect the output to be 100 on average (between multiple simulations). In practice you will see that the standard deviation of this distribution is far larger than its mean (on the order of $10^4$). Averaging 1000 elements scales this down by $\sqrt{1000}$, which is about 30, but that still means the standard deviation is a few times bigger than the mean. So you shouldn't be surprised to see negative results or relatively large positive results.

All in all I'm not sure where the difficulty particularly is here, based on your question.