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
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started