Question: 3. [7 points] You start with the following code and then complete the next lines: n

3. [7 points] You start with the following code and then complete the next lines: n <- 10 Print odd numbers from 10 to 24 using repeat loop. Hint. You can use modulo (%%) in Chapter 1.

6. [7 points] Please follow the following instructions. The instructions indicate how to download daily stock price of Amazon, Inc. from 2020-03-01 to 2020-04-30 from Yahoo! Finance. install.packages("quantmod") library(quantmod) getSymbols("AMZN", src = "yahoo", from='2020-03-01', to='2020-04-30') Then, with the following code, you can take the last column in AMZN, which is AMZN.Adjusted only, and assign the name AMZNAdj to the object. AMZNAdj <- AMZN$AMZN.Adjusted Using AMZNAdj, calculate daily log returns and assign the name log_AMZNAdj.

7. Please follow the following instructions. The instructions indicate how to download daily stock price of Apple, Inc. from 2019-01-01 to 2019-12-31 from Yahoo! Finance. library(quantmod) getSymbols("AAPL", src = "yahoo", from='2019-01-01', to='2019-12-31') AAPLAdj <- AAPL$AAPL.Adj a) [7 points] Show whether the series AAPLAdj evolves with time. If it does, show how to remove the evolution with time and comment on the result. b) [7 points] The following code will convert AAPLAdj to monthly log return. monthly.AAPL <- monthlyReturn(AAPLAdj, subset=NULL, type='log', leading=TRUE) Find sample autocorrelation and partial autocorrelation estimates for monthly.AAPL up to lag 10.

These questions from assignment 2 in me FIN740 class. I am completely lost on the last 2 and any help would be appreciated.

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!