Quantitative Investment Analysis - Chapter 4
library(tidyverse)
library(knitr)
library(kableExtra)
In this post we will solve the end of the chapter practice problems from chapter 4 of the book.
Problem 1
Suppose that 5 percent of the stocks meeting your stock-selection criteria are in the telecommunications (telecom) industry. Also, dividend-paying telecom stocks are 1 percent of the total number of stocks meeting your selection cri-teria. What is the probability that a stock is dividend paying, given that it is a telecom stock that has met your stock selection criteria?
# Probability stock is telecom
p_telecom <- 0.05
# Probability stock is dividend paying telecom stock
p_div_telecom <- 0.01
# Find
# p(stock_is_div | stock_is_telecom) = p(stock_is_div_telecom) / p(stock_is_telecom)
p <- p_div_telecom / p_telecom
cat("The probability that a stock is dividend paying,
given that it is a telecom stock that
has met your stock selection criteria is", p)
## The probability that a stock is dividend paying,
## given that it is a telecom stock that
## has met your stock selection criteria is 0.2
Problem 2
You are using the following three criteria to screen potential acquisition targets from a list of 500 companies:
Criterion | Fraction of the 500 Companies Meeting the Criterion |
---|---|
Product lines compatible | 0.20 |
Company will increase combined sales growth rate | 0.45 |
Balance sheet impact manageable | 0.78 |
If the criteria are independent, how many companies will pass the screen?
p <- (0.2 * 0.45 * 0.78)
c <- 500 * p
cat(paste0(p*100,"%"), "or", round(c), "companies will pass the screening.")
## 7.02% or 35 companies will pass the screening.
Problem 3
You apply both valuation criteria and financial strength criteria in choosing stocks. The probability that a randomly selected stock (from your investment universe) meets your valuation criteria is 0.25. Given that a stock meets your valuation criteria, the probability that the stock meets your financial strength criteria is 0.40. What is the probability that a stock meets both your valuation and financial strength criteria?
p_val <- 0.25
p_fin <- 0.4
p <- p_val * p_fin
cat("The probability that a stock meets both your
valuation and financial strength criteria is", p)
## The probability that a stock meets both your
## valuation and financial strength criteria is 0.1
Problem 4
Suppose the prospects for recovering principal for a defaulted bond issue depend on which of two economic scenarios prevails.
- Scenario 1 has probability 0.75 and will result in recovery of $0.90 per $1 principal value with probability 0.45, or in recovery of $0.80 per $1 principal value with probability 0.55.
Scenario 2 has probability 0.25 and will result in recovery of $0.50 per $1 principal value with probability 0.85, or in recovery of $0.40 per $1 principal value with probability 0.15.
- A Compute the probability of each of the four possible recovery amounts: $0.90, $0.80, $0.50, and $0.40.
- B Compute the expected recovery, given the first scenario.
- C Compute the expected recovery, given the second scenario.
D Compute the expected recovery.
# Probability Recovery of $0.90
p_90 <- (0.75) * (0.45)
# Probability Recovery of $0.80
p_80 <- (0.75) * (0.55)
# Probability Recovery of $0.50
p_50 <- (0.25) * (0.85)
# Probability Recovery of $0.40
p_40 <- (0.25) * (0.15)
cat("The probability of each of the four possible recovery
amounts: $0.90, $0.80, $0.50, and $0.40 is\n",
p_90,p_80,p_50,p_40, "respectively.")
## The probability of each of the four possible recovery
## amounts: $0.90, $0.80, $0.50, and $0.40 is
## 0.3375 0.4125 0.2125 0.0375 respectively.
A. The probability of each of the four possible recovery amounts: $0.90, $0.80, $0.50, and $0.40 is 0.3375 0.4125 0.2125 0.0375 respectively.
# Expected recovery given Scenario 1
e_1 <- (0.45 * 0.9) + (0.55 * 0.8)
cat("Expected recovery given Scenario 1 is", e_1)
## Expected recovery given Scenario 1 is 0.845
B. Expected recovery given Scenario 1 is 0.845
# Expected recovery Scenario 2
e_2 <- (0.85 * 0.5) + (0.15 * 0.4)
cat("Expected recovery given Scenario 2 is", e_2)
## Expected recovery given Scenario 2 is 0.485
C. Expected recovery given Scenario 2 is 0.485
e <- e_1 + e_2
cat("The expected recovery is", e)
## The expected recovery is 1.33
D. The expected recovery is 0.755
Problem 5
You have developed a set of criteria for evaluating distressed credits. Companies that do not receive a passing score are classed as likely to go bankrupt within 12 months. You gathered the following information when validating the criteria:
Forty percent of the companies to which the test is administered will go bankrupt within 12 months: P(nonsurvivor) = 0.40. Fifty- five percent of the companies to which the test is administered pass it: P(pass test) = 0.55. The probability that a company will pass the test given that it will subsequently survive 12 months, is 0.85: P(pass test | survivor) = 0.85.
- A What is P(pass test | nonsurvivor)?
- B Using Bayes’ formula, calculate the probability that a company is a survivor, given that it passes the test; that is, calculate P(survivor | pass test).
- C What is the probability that a company is a nonsurvivor, given that it fails the test?
- D Is the test effective?
# P(nonsurvivor) = 0.40
# P(pass test) = 0.55
# P(pass test | survivor) = 0.85
# We know
# p(survivor) = 1 - P(nonsurvivor) = 1 - 0.4 = 0.6
# p(pass_test) = p(pass_test | survivor) * p(survivor) + p(pass_test | nonsurvivor) * p(nonsurvivor)
# 0.55 = (0.85 * 0.6) + p(pass_test | nonsurvivor) * 0.4
p_pass_test_nonsurvivor = (0.55 - (0.85 * 0.6)) / 0.4
cat("P(pass test | nonsurvivor) is", p_pass_test_nonsurvivor)
## P(pass test | nonsurvivor) is 0.1
A. P(pass test | nonsurvivor) is 0.1
# p(survivor | pass test) = [p (pass test | survivor) / p(pass test)] * p(survivor)
p <- (0.85 * 0.6) / 0.55
cat("The probability that a company is a survivor, given that it passes the test is", p)
## The probability that a company is a survivor, given that it passes the test is 0.9272727
B. The probability that a company is a survivor, given that it passes the test is 0.9272727
# p(nonsurvivor | fail test) = ?
# p(fail test) = 1 - p(pass test)
# p(fail test) = 1 - 0.55 = 0.45
# p(fail test) = p(fail test | nonsurvivor) * p(nonsurvivor) + p(fail test | survivor) * p(survivor)
# 0.45 = p(fail test | nonsurvivor) * 0.4 + 0.15 * 0.6
p_failtest_nonsurvivor <- (0.45 - (0.6 * 0.15)) / 0.4
# Bayes formula
# p(nonsurvivor | fail test) = [p(fail test | nonsurvivor) / p(fail test)] * p(nonsurvivor)
p_nonsurvivro_ftest <- p_failtest_nonsurvivor / 0.45 * 0.4
cat("The probability that a company is a nonsurvivor, given that it fails the test is", p_nonsurvivro_ftest)
## The probability that a company is a nonsurvivor, given that it fails the test is 0.8
C. The probability that a company is a nonsurvivor, given that it fails the test is 0.8
D. Test appears to be useful since, the company that passes the test has 92% survival rate and company that fails the test has 80% non survival rate.
Problem 6
In probability theory, exhaustive events are best described as events:
- A with a probability of zero.
- B that are mutually exclusive.
- C that include all potential outcomes.
C. that include all potential outcomes.
Problem 7
Which probability estimate most likely varies greatly between people?
- A An a priori probability
- B An empirical probability
- C A subjective probability
C. A subjective probability
Problem 8
If the probability that Zolaf Company sales exceed last year’s sales is 0.167, the odds for exceeding sales are closest to:
- A 1 to 5.
- B 1 to 6.
- C 5 to 1.
A. 1 to 5
Problem 9
The probability of an event given that another event has occurred is a:
- A joint probability.
- B marginal probability.
- C conditional probability.
C. conditional probability.
Problem 10
After estimating the probability that an investment manager will exceed his benchmark return in each of the next two quarters, an analyst wants to forecast the probability that the investment manager will exceed his benchmark return over the two- quarter period in total. Assuming that each quarter’s performance is independent of the other, which probability rule should the analyst select?
- A Addition rule
- B Multiplication rule
- C Total probability rule
B. Multiplication rule
Problem 11
Which of the following is a property of two dependent events?
- A The two events must occur simultaneously.
- B The probability of one event influences the probability of the other event.
- C The probability of the two events occurring is the product of each event’s probability
B. The probability of one event influences the probability of the other event.
Problem 12
Which of the following best describes how an analyst would estimate the expected value of a firm under the scenarios of bankruptcy and survivorship? The analyst would use:
- A the addition rule.
- B conditional expected values.
- C the total probability rule for expected value.
C. the total probability rule for expected value.
Problem 13
An analyst developed two scenarios with respect to the recovery of $100,000 principal from defaulted loans:
Scenario | Probabilityof Scenario (%) | AmountRecovered ($) | Probabilityof Amount (%) |
---|---|---|---|
1 | 40 | 50000 | 60 |
1 | 40 | 30000 | 40 |
2 | 60 | 80000 | 90 |
2 | 60 | 60000 | 10 |
The amount of the expected recovery is closest to:
- A $36,400.
- B $63,600.
- C $81,600.
# This is a expected total probability problem
# Scenario 1
s1 <- (0.4 * 0.6 * 50000) + (0.4 * 0.4 * 30000)
s2 <- (0.6 * 0.9 * 80000) + (0.6 * 0.1 * 60000)
s <- s1 + s2
cat("The amount of the expected recovery is closest to", s)
## The amount of the expected recovery is closest to 63600
B. The amount of the expected recovery is closest to 63600
Problem 14
US and Spanish bonds have return standard deviations of 0.64 and 0.56, respectively. If the correlation between the two bonds is 0.24, the covariance of returns is closest to:
- A 0.086.
- B 0.670.
- C 0.781.
# Cov(US bond returns, Spanish bond returns) = σ(US bonds) × σ(Spanish bonds) × ρ(US bond returns, Spanish bond returns)
0.64 * 0.56 * 0.24
## [1] 0.086016
A. 0.086
Problem 15
The covariance of returns is positive when the returns on two assets tend to:
- A have the same expected values.
- B be above their expected value at different times.
- C be on the same side of their expected value at the same time.
C. be on the same side of their expected value at the same time.
Problem 16
Which of the following correlation coefficients indicates the weakest linear relationship between two variables?
- A –0.67
- B –0.24
- C 0.33
B. –0.24
Problem 17
An analyst develops the following covariance matrix of returns:
Index | Hedge Fund | Market Index |
---|---|---|
Hedge fund | 256 | 110 |
Market index | 110 | 81 |
The correlation of returns between the hedge fund and the market index is closest to:
- A 0.005.
- B 0.073.
- C 0.764.
# ρ(Ri,Rj) = Cov(Ri,Rj)/[σ(Ri)σ(Rj)]
110 / (sqrt(256) * sqrt(81))
## [1] 0.7638889
C. 0.764
Problem 18
All else being equal, as the correlation between two assets approaches +1.0, the diversification benefits:
- A decrease.
- B stay the same.
- C increase.
A. decrease
Problem 19
Given a portfolio of five stocks, how many unique covariance terms, excluding variances, are required to calculate the portfolio return variance?
- A 10
- B 20
- C 25
A. 10
Problem 20
The probability distribution for a company’s sales is:
Probability | Sales ($ millions) |
---|---|
0.05 | 70 |
0.70 | 40 |
0.25 | 25 |
The standard deviation of sales is closest to:
- A $9.81 million.
- B $12.20 million.
- C $32.40 million
# Calculate the expected sales
expected_sales <- df %>%
mutate(e = Probability * `Sales ($ millions)`) %>%
summarise(m = sum(e)) %>%
.[[1]]
# Calculate SD
s <- df %>%
mutate(v = Probability * (`Sales ($ millions)` - expected_sales)^2) %>%
summarise(s = sqrt(sum(v))) %>%
.[[1]]
cat("The standard deviation of sales is closest to", s)
## The standard deviation of sales is closest to 9.807523
A. $9.81
Problem 21
Which of the following statements is most accurate? If the covariance of returns between two assets is 0.0023, then:
- A the assets’ risk is near zero.
- B the asset returns are unrelated.
- C the asset returns have a positive relationship.
C. the asset returns have a positive relationship.
Problem 22
An analyst produces the following joint probability function for a foreign index (FI) and a domestic index (DI).
FI | RDI = 30% | RDI = 25% | RDI = 15% |
---|---|---|---|
RFI = 25% | 0.25 | ||
RFI = 15% | 0.50 | ||
RFI = 10% | 0.25 |
The covariance of returns on the foreign index and the returns on the domestic index is closest to:
- A 26.39.
- B 26.56.
- C 28.12
# Calculate the Expected returns
er_fi <- (0.25 * 25) + (0.5 * 15) + (0.25 * 10)
er_di <- (0.25 * 30) + (0.5 * 25) + (0.25 * 15)
cov_fi_di <- (0.25 * (25 - er_fi) * (30 - er_di)) + (0.5 * (15 - er_fi) * (25 - er_di)) + (0.25 * (10 - er_fi) * (15 - er_di))
cat("The covariance of returns on the foreign index and the returns on the domestic index is closest to", cov_fi_di)
## The covariance of returns on the foreign index and the returns on the domestic index is closest to 26.5625
B. 26.56
Problem 23
A manager will select 20 bonds out of his universe of 100 bonds to construct a portfolio. Which formula provides the number of possible portfolios?
- A Permutation formula
- B Multinomial formula
- C Combination formula
C. Combination formula
Problem 24
A firm will select two of four vice presidents to be added to the investment committee. How many different groups of two are possible?
- A 6
- B 12
- C 24
# nCr
# n! / (n-r)!r!
n = 4
r = 2
factorial(n) / (factorial(n - r) * factorial(r))
## [1] 6
A. 6
Problem 25
From an approved list of 25 funds, a portfolio manager wants to rank 4 mutual funds from most recommended to least recommended. Which formula is most appropriateto calculate the number of possible ways the funds could be ranked?
- A Permutation formula
- B Multinomial formula
- C Combination formula
A. Permutation formula