Data Analysis Project [15 marks] Due date: 5pm, 29 April 2020 Requirement: Pls finish the tasks according to the requirements. All the tasks need to be finished by using R. Pls present your results in...

1 answer below »
I have attached the details


Data Analysis Project [15 marks] Due date: 5pm, 29 April 2020 Requirement: Pls finish the tasks according to the requirements. All the tasks need to be finished by using R. Pls present your results in the word file, copy all your R code in the end of this word file, and then submit your word file via the Turnitin link in iLearn. Task 1: Stock Return and Portfolio Analysis In the file named as “Stock.csv”, you have been provided with the daily prices of three stocks from 2012 to 2018. a. Plot and present the stock prices in time series with appropriate labels. [1 mark] b. Calculate the log returns of all the three stocks and express them in percentages. Pls report the descriptive statistics of log returns of three stocks in Table 1. Pls change the names in Table 1 to the stock names in your file. [1 mark] Table 1: Summary Statistics Variable Stock 1 Stock 2 Stock 3 Min Max Mean Median SD Skewness Kurtosis N c. Pls report the correlation matrix of log returns of three stocks in Table 1. Pls change the names in Table 1 to the stock names in your file. [1 mark] Table 2: Correlation Matrix Variable Stock 1 Stock 2 Stock 3 Stock 1 Stock 2 Stock 3 d. There is a file named as “FF3factors.csv” in your folder. Merge your stock data with the Fama French three factors data, which are all in percentages. Pls create a new variable Stock.Rf for all the three stocks, which equals to the difference between log return of each stock and RF (available in the FF3factors.csv), and run a regression of : . Report the regression results for all the three stocks in tables (you can use only one table to summarize all the results or three separate tables). [1 mark] e. Pls run regressions of: . Report the regression results for all the three stocks in tables (you can use only one table to summarize all the results or three separate tables). [1 mark] f. Pls make your comments by comparing the results in d and e [1 mark]. g. If an investor would like to form a portfolio with a targeted expected return of 0.11% and achieve the minimized standard deviation by investing in these three stocks in the “Stock.csv” file. If the daily risk free rate is 0.02%, what is the Sharpe ratio of this optimal portfolio, given there is no short sale constraint? [1 mark] [hint: can use the library of “quadprog”] [pls provide your R code used to form the optimal portfolio in the end of the word file]. h. If an investor would like to form a portfolio with a targeted expected return of 0.11% and achieve the minimized standard deviation by investing in these three stocks. If the daily risk free rate is 0.02%, what is the Sharpe ratio of this optimal portfolio, given there is short sale constraint (i.e., you cannot short sell the stocks)? [1 mark] [hint: can use the library of “quadprog”] i. By comparing your answer in g) and h), is there any difference in their Sharpe ratios? Why that’s the case? [1 mark] j. Given there is no short sale constraint, pls draw an efficient frontier that satisfies the following conditions: 1. The range of the mean return of the portfolio is from 0.75*min of the mean return of three stocks to 1.25*max of the mean return of three stocks; 2. Pls create 500 optimal portfolios in this range; 3 Then pls plot all the risk-return combination of the 500 optimal portfolios (i.e., the efficient frontier). [1 mark] [Pls provide your R code in the end of word file] Task 2: Stock Market Reaction to FOMC Announcement US monetary policy can be measured by changes in the Federal funds rate[footnoteRef:1], which are announced by the Federal Open Market Committee (FOMC) meetings. Given the importance of monetary policy to the whole economy, investors pay special attention to the FOMC announcements. In the attached dataset (“Event Study.csv”), we have collected data on FOMC announcements from 1989 to 2007 and the aggregate stock market reactions to it.[footnoteRef:2] [1: https://en.wikipedia.org/wiki/Federal_funds_rate] [2: Bernanke and Kuttner (2005) attached is a good reference. ] Here is a list of variables: · Date: FOMC announcement date · Return: S&P 500 index return on the announcement date (in percentage) · Total change: change of Federal fund rate (in bps) · Expected: investors’ expected change of Federal fund rate, which is estimated based on the futures contracts written on the Federal fund rate (in bps) · Surprise: the difference between Total change and Expected, which measures the change that is out of expectation of investors (in bps) · Scheduled: equals to 1 if the FOMC is scheduled, and 0 if not. a) Run three regressions and report the estimation results according. [Note: please report the coefficient and t-statistics, indicate significance with difference levels, and the adjusted R-squared of the regression.] (1.5 marks) [pls provide your R code in the end of word file] In the first regression, Y is Return, X is Total change; In the second regression, Y is Return, X is Expected; In the third regression, Y is Return, X is Surprise. b) Comparing the three regression results, which X variable explains Y the best? (0.5 mark) Why that is the case? [Note: you may link it with market efficiency and event study] (1 mark) c) Create a variable which equals to Scheduled*Surprise, and then run a regression in which Y is Return, the first X variable is Surprise, and the second X variable is Scheduled*Surprise. Report the regression results. (1 mark) [pls provide your R code] d) Based on the results, is the effect of Surprise on Return dependent on whether the FOMC meeting is scheduled or not? Please explain. (1 mark) R code:
Answered Same DayApr 28, 2021

Answer To: Data Analysis Project [15 marks] Due date: 5pm, 29 April 2020 Requirement: Pls finish the tasks...

Naveen answered on Apr 29 2021
157 Votes
Data Analysis Project [15 marks]
Due date: 5pm, 29April 2020
Requirement: Pls finish the tasks according to the requirements. All the tasks need to be finished by using R. Pls present your results in the word file, copy all your R code in the end of this word file, and then submit your word file via the Turnitin link in iLearn.
Task 1: Stock Return and Portfolio Analysis
In the file named as “Stock.csv”, you have been provided with the daily prices of three stocks from 2012 to 2018.
a. Plot and present the stock prices in time series with appropriate labels. [1 mark]
b.
Calculate the log returns of all the three stocks and express them in percentages.
Pls report the descriptive statistics of log returns of three stocks in Table 1. Pls change the names in Table 1 to the stock names in your file. [1 mark]
Table 1: Summary Statistics
    Variable
    Stock 1
    Stock 2
    Stock 3
    Min
    -0.0954
    -0.0479
    -0.1165
    Max
    0.1003
    0.074
    0.1462
    Mean
    0.0005
    0.0004
    0.0012
    Median
    0.0007
    0.0005
    0.0009
    SD
    0.0149
    0.0104
    0.0191
    Skewness
    -0.0553
    0.0265
    0.4093
    Kurtosis
    5.1067
    2.8366
    9.0696
    N
    1759
    1759
    1759
c. Pls report the correlation matrix of log returns of three stocks in Table 1. Pls change the names in Table 1 to the stock names in your file. [1 mark]
Table 2: Correlation Matrix
    Variable
    GOOG
    MMM
    AMZN
    GOOG
    1
    0.437571
    0.55568
    MMM
    0.437571
    1
    0.348167
    AMZN
    0.55568
    0.348167
    1
d. There is a file named as “FF3factors.csv” in your folder. Merge your stock data with the Fama French three factors data, which are all in percentages. Pls create a new variable Stock.Rf for all the three stocks, which equals to the difference between log return of each stock and RF (available in the FF3factors.csv), and run a regression of :
.
Report the regression results for all the three stocks in tables (you can use only one table to summarize all the results or three separate tables). [1 mark]
Call:
lm(formula = Stock.Rf ~ Mkt.RF, data = Stock_FF3)
Residuals:
Min 1Q Median 3Q Max
-0.03489 -0.00358 -0.00016 0.00334 0.05668
Coefficients:
Estimate Std. Error t value Pr(>|t|)
(Intercept) 0.000212 0.000165 1.28 0.2
Mkt.RF 0.009839 0.000198 49.64<2e-16 ***
---
Signif. codes: 0 ‘***’ 0.001 ‘**’ 0.01 ‘*’ 0.05 ‘.’ 0.1 ‘ ’ 1
Residual standard error: 0.0069 on 1756 degrees of freedom
Multiple R-squared: 0.584,    Adjusted R-squared: 0.584
F-statistic: 2.46e+03 on 1 and 1756 DF, p-value: <2e-16
Call:
lm(formula = Stock.Rf ~ INTC + VZ + AMZN, data = Stock_FF3)
Residuals:
Min 1Q Median 3Q Max
-2.64e-16 -5.00e-19 9.00e-20 5.40e-19 1.88e-16
Coefficients:
Estimate Std. Error t value Pr(>|t|)
(Intercept) 4.14e-20 1.96e-19 2.10e-01 0.83
INTC 3.33e-01 1.43e-17 2.33e+16<2e-16 ***
VZ 3.33e-01 1.96e-17 1.70e+16<2e-16 ***
AMZN 3.33e-01 1.09e-17 3.07e+16<2e-16 ***
---
Signif. codes: 0 ‘***’ 0.001 ‘**’ 0.01 ‘*’ 0.05 ‘.’ 0.1 ‘ ’ 1
Residual standard error: 8.21e-18 on 1754 degrees of freedom
Multiple R-squared: 1,    Adjusted R-squared: 1
F-statistic: 9.95e+32 on 3 and 1754 DF, p-value: <2e-16
e. Pls run regressions of:
.
Report the regression results for all the three stocks in tables (you can use only one table to summarize all the results or three separate tables). [1 mark]
Call:
lm(formula = Stock.Rf ~ Mkt.RF + SMB + HML, data = Stock_FF3)
Residuals:
Min 1Q Median 3Q Max
-0.03388 -0.00359 -0.00014 0.00332 0.05299
Coefficients:
Estimate Std. Error t value Pr(>|t|)
(Intercept) 0.000183 0.000159 1.15 0.25
Mkt.RF 0.010030 0.000194 51.60< 2e-16 ***
SMB -0.002629 0.000332 -7.92 4.3e-15 ***
HML -0.003419 0.000336 -10.16< 2e-16 ***
---
Signif. codes: 0 ‘***’ 0.001 ‘**’ 0.01 ‘*’ 0.05 ‘.’ 0.1 ‘ ’ 1
Residual standard error: 0.00664 on 1754 degrees of freedom
Multiple R-squared: 0.616,    Adjusted R-squared: 0.615
F-statistic: 936 on 3 and 1754 DF, p-value: <2e-16
f. Pls make your comments by comparing the results in d and e[1 mark].
Ans: To compare the results in D and E we need certain criteria like probability values in the summary statistics or compare the accuracy of the model built, The probability values explain the significance of each variable in the model, while accuracy tells the performance level. Hence comparing accuracy we get that model constructed using stock.Rf on INTC, VZ, AMZN is better than the model built on STock.RF on Mkt.Rf, SMB and HML.
g. If an investor would like to form a portfolio with a targeted expected return of 0.11% and achieve the minimized standard deviation by investing in these three stocks in the “Stock.csv” file. If the daily risk free rate is 0.02%, what is the Sharpe ratio of this optimal portfolio, given there is no short sale constraint? [1 mark] [hint: can use the library of “quadprog”] [pls provide your R code used to form the optimal portfolio in the end of the word file].
    > mean
INTC VZ AMZN
29.69 40.01 661.93
    
        
> covar
INTC VZ AMZN
INTC 90.03 47.07 4192
VZ 47.07 37.75 2413
AMZN 4192.49 2412.77 227942
> var
INTC VZ AMZN
90.03 37.75 227942.42
> stdev
INTC VZ AMZN
9.488 6.144 477.433
    
> ratios
INTC VZ AMZN
1.1835 2.4783 0.5364
    
        > mean.n
INTC VZ AMZN
4.454 6.002 99.289
> cov.n
INTC VZ AMZN
INTC 13.50 7.060 628.9
VZ 7.06 5.662 361.9
AMZN 628.87 361.915 34191.4
> print(weights.n)
stock weight
1 INTC 0
2 VZ 1
3 AMZN 0
> print(final)
stock weight
2 VZ 1
>...
SOLUTION.PDF

Answer To This Question Is Available To Download

Related Questions & Answers

More Questions »

Submit New Assignment

Copy and Paste Your Assignment Here