Question: Explain the function of each step in Python, what does the code attempts to achieve? import pandas as pd import seaborn as sns import numpy

  1. Explain the function of each step in Python, what does the code attempts to achieve?

import pandas as pd

import seaborn as sns

import numpy as np

import matplotlib.pyplot as plt

df = pd.read_csv('/Users/qidong/loansmall.csv', low_memory=False)

df.head()

sns.distplot(loan_amount)

2. The expected return for stock A is 10%, and stock B is 5%, the volatility (standard deviation) of return of stock A is 10%, and stock B is 5%, the covariance between Stock A and Stock B is 25%.

What is the return variance for Stock A and Stock B?

What is the covariance covariance matrix of Stock A and B?

Part A Use mathematics and number calculation without EXCEL

Assume that the investor wants to minimize the variance of the portfolio. Use optimization (first order derivative of objective function =0) to calculate the weight for minimum variance portfolio.

Assume that the investor wants to maximize the expected return of the portfolio. How much money should he should put in Stock A and Stock B?

Assume that the investor wants to maximize the risk adjusted expected return of the portfolio, and the risk adjusted return for the investor is equal to the epected return minus the variance. How much money should he should put in Stock A and Stock B?

Part B Use EXCEL to answer the following questions:

Assume that the investor wants to minimize the variance of the portfolio. Use optimization (first order derivative of objective function =0) to calculate the weight for minimum variance portfolio.

Assume that the investor wants to maximize the expected return of the portfolio. How much money should he should put in Stock A and Stock B?

Assume that the investor wants to maximize the risk adjusted expected return of the portfolio, and the risk adjusted return for the investor is equal to the epected return minus the variance. How much money should he should put in Stock A and Stock B?

3. For a perpetual bond, derive the relationship between change of discount rate and the change of price using Taylar Approximation.

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Finance Questions!