Great Deal! Get Instant $10 FREE in Account on First Order + 10% Cashback on Every Order Order Now

Project 3 Rubric For all questions, you will lose full credits if XXXXXXXXXXthere are neither codes nor results or XXXXXXXXXXthe results do not match the codes. 1. Did not properly prepare the data...

1 answer below »
Project 3 Ru
ic

For all questions, you will lose full credits if
XXXXXXXXXXthere are neither codes nor results
or
XXXXXXXXXXthe results do not match the codes.
1. Did not properly prepare the data set ‘myportfolio’: -8 pts
a) Inco
ect answer or no highlight on the answer: -2 pts
b) Did not find co
ect efficient frontier: -4 pts
XXXXXXXXXXThe plot is not legible (including unreasonable x lim and y lim): -2 pts
XXXXXXXXXXThe plot does not make sense in terms of the portfolio theory: -3 pts
2.
XXXXXXXXXXDid not create a function (that is, no function at all): -6 pts
XXXXXXXXXXa) Inco
ect function: -1 pt to -4 pts
XXXXXXXXXXb) Did not use your own function: -1 pt
XXXXXXXXXXDid not create a function (that is, no function at all): -6 pts
XXXXXXXXXXa) Inco
ect function: -1 pt to -4 pts
XXXXXXXXXXb) Did not use your own function: -1 pt
3. Did not create a function (that is, no function at all): -7 pts
a) Inco
ect function: -1 pt to -5 pts
b) Did not use your own function: -1 pt


This material is only for the use of students enrolled in MBA 728 for purposes associated with the course and may not
e retained or further disseminated. All information in this material is proprietary to Dr. Sung Ik Kim. Scanning,
copying, posting to a website or reproducing and sharing in any form is strictly prohibited.
THIS CONTENT IS PROTECTED AND MAY NOT BE SHARED, UPLOADED OR DISTRIBUTED.
MBA 728 – Fall AP1 2021
Project 3
Due: Sunday, October 10, 11:59 PM CST
※ Using the R script, answer the following questions. Please show all works for full credit.
1. Please use the following instructions.
1) Find 19 stocks you want to research. You can find ticker symbols from Google, Yahoo! Finance, MSN
money, and so on (i.e. The ticker symbol of Apple Inc. is “AAPL”).
2) Run the following steps.
i. Use the following li
aries:
li
ary(quantmod)
li
ary(tseries)
li
ary(xts)
ii. From Yahoo! Finance, download daily prices of stocks (from Jan. 1, 2012 to Dec. 31, 2019) you
selected to research. i.e. Suppose that you want to download daily stock prices of Apple Inc.
whose ticker symbol is “AAPL”. Then, run as follows:
getSymbols("AAPL", src="yahoo", from=' XXXXXXXXXX', to=' XXXXXXXXXX')
iii. Obtain monthly log stock returns for each stock. For example, if you downloaded daily stock
prices of Apple, Inc. and Microsoft Corporation, then you will need to run the following:
AAPL.rtn <- monthlyReturn(AAPL$AAPL.Adjusted, subset=NULL, type='log',
leading=TRUE)
MSFT.rtn <- monthlyReturn(MSFT$MSFT.Adjusted, subset=NULL, type='log',
leading=TRUE)
iv. Prepare your data containing all monthly log stock returns of 19 stocks, and assign the name
'myportfolio' (Please refer to p. 11 on Ch 6 course material to see how 'myportfolio'
should look like.)
3) Using 'myportfolio' containing monthly log stock returns of 19 stocks,
a) [5 points] Find the weights of mean-variance efficient portfolio (you can set your own target return.).
Please highlight your answer.
) [10 points] Find (plot) efficient frontier.
※ The plot of efficient frontier should be LEGIBLE (as fancy as possible).
※ Extra Credit (5 points: NO PARTIAL CREDITS) – By your OWN research
Suppose you want to invest in 17 stocks you selected above. Then, you obtained the weights of
mean-variance efficient portfolio in 3) for your portfolio. If you construct your portfolio in 2020
according to those weights, how your investment performance would be in 2020?
This material is only for the use of students enrolled in MBA 728 for purposes associated with the course and may not
e retained or further disseminated. All information in this material is proprietary to Dr. Sung Ik Kim. Scanning,
copying, posting to a website or reproducing and sharing in any form is strictly prohibited.
2. A bond price is the present value of all future cash flows (coupon interest every year and par value at time to
maturity) as shown in Ch 7 course material. That is,
Bond Price = ∑
??? × ?_????
(1 + ?)?
?
?=1
+
???
(1 + ?)?
,
where
???: par value of the bond
?_????: annual coupon rate
?: time to maturity
?: bond yield
A function to calculate a bond price is presented on p. 5 in Ch 7 course material. As you can see, the
function exactly illustrates the equation above.
1) Suppose you have to find coupon rate when you know all other variables, such as the bond price, par
value, time to maturity, and yield. To find coupon rate instead of bond price, you can use the following
formula (if you solve the equation above for c_rate, you can easily obtain this formula.).
c_rate =
???? ????? −
???
(1 + ?)?


???
(1 + ?)?
?
?=1
Therefore, if you invest in a bond that has $1, XXXXXXXXXXof cu
ent bond price, $1,200 of par value, 4 years
to maturity, and 5% of yield, you can calculate coupon rate as follows:
# Create time t
t <- seq(1, 4, 1)

# Create present value factor
pv_factor <- 1 / XXXXXXXXXX)^t

# Cu
ent bond price
ond_value < XXXXXXXXXX

# Par value
c_rate < XXXXXXXXXX – 1200 / XXXXXXXXXX)^4) / (1200*sum(pv_factor))

c_rate
[1] XXXXXXXXXX
This material is only for the use of students enrolled in MBA 728 for purposes associated with the course and may not
e retained or further disseminated. All information in this material is proprietary to Dr. Sung Ik Kim. Scanning,
copying, posting to a website or reproducing and sharing in any form is strictly prohibited.
a) [8 points] Refe
ing to the codes above, create your own function to calculate coupon rate. That is,
you have to complete the body of the following function (bond_value: cu
ent bond price, par: par
value, ttm: time to maturity, and y: yield).

c_rate <- function (bond_value, par, ttm, y) {

COMPLETE THIS PART

}
) [2 points] Using your own function created in part a), calculate coupon rate of the bond with
ond_value = $1,172.61
par = $1,000
ttm = 10 years
y = 6%
2) Suppose you have to find par value when you know all other variables, such as the bond price, coupon
ate, time to maturity, and yield. To find par value instead of bond price, you can use the following
formula (if you solve the equation above for Par, you can easily obtain this formula.).
Par = Bond Price ×
1

?
(1 + ?)?
+
1
(1 + ?)?
?
?=1
Therefore, if you invest in a bond that has $1, XXXXXXXXXXof cu
ent bond price, 7% of annual coupon rate,
4 years to maturity, and 5% of yield, you can calculate par value as follows:
# Create time t
t <- seq(1, 4, 1)

# Create present value factor
pv_factor <- 1 / XXXXXXXXXX)^t

# Coupon rate times pv_factor
c_pv_factor <- 0.07 * pv_factor

# Cu
ent bond price
ond_value < XXXXXXXXXX

# Par value
par <- bond_value / (sum(c_pv_factor) + (1 / XXXXXXXXXX)^4))
par
[1] 1000
This material is only for the use of students enrolled in MBA 728 for purposes associated with the course and may not
e retained or further disseminated. All information in this material is proprietary to Dr. Sung Ik Kim. Scanning,
copying, posting to a website or reproducing and sharing in any form is strictly prohibited.
a) [8 points] Refe
ing to the codes above, create your own function to calculate par value. That is, you
have to complete the body of the following function (bond_value: cu
ent bond price, c_rate:
coupon rate, ttm: time to maturity, and y: yield).

par <- function (bond_value, c_rate, ttm, y) {

COMPLETE THIS PART

}
) [2 points] Using your own function created in part a), calculate par value of the bond with
ond_value = $1, XXXXXXXXXX
c_rate = 5%
ttm = 13 years
y = 4%
3. In Chapter 8, you can find how to calculate call and put option price by using Black-Scholes option pricing
model.
a) [12 points] Create your own function to calculate put option price. That is, you have to complete the
ody of the following function (S0: cu
ent stock price, K: strike price, r: risk-free rate, T: remaining
time to maturity, and sigma: standard deviation of underlying stock price).

put <- function (S0, K, r, T, sigma) {

COMPLETE THIS PART

}
) [3 points] Using your own function created in part a), calculate put option price with
S0 = $1,000
K = $850
= 3%
T = 3 years
sigma = 23%
This material is only for the use of students enrolled in MBA 728 for purposes associated with the course and may not
e retained or further disseminated. All information in this material is proprietary to Dr. Sung Ik Kim. Scanning,
copying, posting to a website or reproducing and sharing in any form is strictly prohibited.

#1
#Question 1
# Calling required packages
Answered 11 days After Sep 28, 2021

Solution

Mohd answered on Oct 10 2021
142 Votes
-
-
Michael Coope
10/9/2021
#1 #Question 1 # Calling required packages
li
ary(quantmod)
li
ary(tseries)
li
ary(xts)
#li
ary(rPortfolio)
#install.packages("SciViews")
li
ary(SciViews)
li
ary(RiskPortfolios)
Question2
#Getting symbols
getSymbols("AAPL", src="yahoo", from='2012-01-01', to='2019-12-31')
## [1] "AAPL"
getSymbols("MSFT", src="yahoo", from='2012-01-01', to='2019-12-31')
## [1] "MSFT"
getSymbols("JPM", src = "yahoo", from='2014-01-01', to='2018-12-31')
## [1] "JPM"
getSymbols("JAZZ", src = "yahoo", from='2014-01-01', to='2018-12-31')
## [1] "JAZZ"
getSymbols("GE", src = "yahoo", from='2014-01-01', to='2018-12-31')
## [1] "GE"
getSymbols("ALNY", src = "yahoo", from='2014-01-01', to='2018-12-31')
## [1] "ALNY"
getSymbols("LULU", src = "yahoo", from='2014-01-01', to='2018-12-31')
## [1] "LULU"
getSymbols("DIS", src = "yahoo", from='2014-01-01', to='2018-12-31')
## [1] "DIS"
getSymbols("SBUX", src = "yahoo", from='2014-01-01', to='2018-12-31')
## [1] "SBUX"
getSymbols("HSY", src = "yahoo", from='2014-01-01', to='2018-12-31')
## [1] "HSY"
getSymbols("PYPL", src = "yahoo", from='2014-01-01', to='2018-12-31')
## [1] "PYPL"
getSymbols("SQ", src = "yahoo", from='2014-01-01', to='2018-12-31')
## [1] "SQ"
getSymbols("BABA", src = "yahoo", from='2014-01-01', to='2018-12-31')
## [1] "BABA"
getSymbols("CROX", src = "yahoo", from='2014-01-01', to='2018-12-31')
## [1] "CROX"
getSymbols("ANET", src = "yahoo", from='2014-01-01', to='2018-12-31')
## [1] "ANET"
getSymbols("CRM", src = "yahoo", from='2014-01-01', to='2018-12-31')
## [1] "CRM"
getSymbols("IAC", src = "yahoo", from='2014-01-01', to='2018-12-31')
## [1] "IAC"
getSymbols("AAPL", src = "yahoo", from='2014-01-01', to='2018-12-31')
## [1] "AAPL"
getSymbols("TWTR", src = "yahoo", from='2014-01-01', to='2018-12-31')
## [1] "TWTR"
getSymbols("TSLA",...
SOLUTION.PDF

Answer To This Question Is Available To Download

Related Questions & Answers

More Questions »

Submit New Assignment

Copy and Paste Your Assignment Here