Question
Please solve by R script or R studio Please follow the following instructions. The instructions indicate how to download daily stock price of Amazon, Inc.
Please solve by R script or R studio
Please follow the following instructions.
The instructions indicate how to download daily stock price of Amazon, Inc. from 2019-10-01 to 2019-12-31 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.
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