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

BBS36 FT Data Analytics for Finance

Group assignment

2022

Q1 (Challenge question)

There are two  assets A  and B are frontier portfolios whose returns  are jointly normally distributed. The expected return on A, rA = 0. 1, the standard deviation A = 0. 1, the expected return on B, rB = 0.2, the standard deviation B = 0.2, and the correlation coefficient, ρAB = 0.

a.   Determine the expected return on a portfolio that assigns weight (w) on asset A and weight (1-w) on asset B.

(2 marks)

b.   Determine the variance of the returns on a portfolio that assigns weight (w) on asset A and weight (1-w) on asset B.

(3 marks)

c.    Determine weight w that  minimises the variance  of the  portfolio  in  (b).  Find the expected return and standard deviation associated with this w.

(8 marks)

Q2 Time value of money

1.    Find the value, in 12 years’ time, of €3400 invested at 4% interest compounded annually.  (2 marks)

2.   A bank offers a return of 5% interest compounded annually. Find the future value of a   principal of €4800 after 7 years. What is the overall percentage rise over this period? (2 marks)

3.   A department store has its own credit card facilities, for which it charges interest at a rate of 2.5% each month. Explain briefly why this is not the same as an annual rate of 30%. What is  the annual percentage rate? (2 marks)

4.    Find the present value of €275 000 which is due in ten years if the interest rate is 4% per year compounded annually. (2 marks)

5.    If $1,200 is borrowed for half a year at a simple interest rate of 8% per year, what amount must be repaid at the end of the half-year? (2 marks)

6.    Suppose that you will receive annual payments of $11,000 for a period of 10 years. The first payment will be made 4 years from now. If the interest rate is 6%, what is the present value of this stream of payments? (10 marks)

(20 marks)

Q3 Regression analysis using R

(You are expected to submit a concise report with inserted figures/ pieces of code to illustrate your responses. You might include an appendix which contains your code in full or details the software instructions you have used.)

a)    Read the babies_non_na dataset into your computer and named it as babies_non_na. Tip: R has a command called read.csv2 which usage can be checked using ??read.csv2. (3 marks)

b)   check the structure of the dataset with the command str(babies_non_na) (3 marks)

c)    plot the numerical variables of the dataset: baby_wgt, height_mom and weight_mom week (weeks of gestation). Calculate the means of each of these variables (3 marks)

d)   Create a scatterplot where Y is the babies weight and X is the mom weight (3 marks)

e)   Calculate the correlation between these two variables (3 marks)

repeat d and e for Y = weight of the baby and X = the number of weeks of gestation (3 marks)

f)    Create again the scatter plot with Y=baby_wgt and X= week of gestation (3 marks)

g)    Plot a regression line in the scatterplot using ggplot and geom_smooth command to set a linear model method (3 marks)

h)   Create a linear regression model to express the relationship between the weight of the baby when born and the number of weeks of gestation (3 marks)

i)     Evaluate the values of the parameters of the model from h. What is the value of intercept and the β coefficient associated to week? (3 marks)

j)     Modify the command predict(f,data.frame(Height=c(40,71,72))) to help you calculate the predicted values of wight of babies born after 32, 34 and 49 weeks (3 marks)

(30 marks)

Q4 Stock return analysis using R or Excel

1.   You are required to download stock price series for two companies (of your own choosing) from finance.yahoo.com for the period of 01.01.2017 to 31.12.2021. Use daily frequency.  Save your data in a csv or excel format and read into R.

Instructions: https://help.yahoo.com/kb/download-historical-data-yahoo-finance- sln2311.html

Provide a brief description of both firms (not more than a short paragraph).

(10 marks)

2.    Graph the price series, provide a brief comment on the trend.  (5 marks)

3.    Calculate log returns for both series. Graph the log returns series, comment on the largest  fluctuations. What events might have affected stock returns of those companies? (5 marks)

4.    Calculate the mean return and standard deviation of both series. Comment on the                difference between the summary statistics for the companies in your sample. Calculate the correlation between the two series. (5 marks)

(25 marks)

Q5 Probability

1.   Assume that the two stock indices in your sample have a 17% and 31% chance of rising on a given day (I’m going to refer to them as Company A and Company B, respectively). Calculate the following:

i.       The probability of both the Company A and Company B rising on the same day, assuming the indices are independent. (1 mark)

ii.       The probability of either the Company A and Company B rising on the same day, assuming there is a 22% chance that both indices may rise together. (2 marks)

iii.       Given a 22% chance that both indices may rise together over the next time period,  what is the probability that the Company A has risen given the information that the Company B has risen? (2 marks)

Q6 Matrices

1.    Use matrices to solve the following pair of simultaneous equations: x + 3( = 8 and 4x ( = 6

(7 marks)