Q1. Ford Motor Company for the period of 2014-01-01 - 2017-12-31 from Yahoo
Q2. US Total Nonfarm Payrolls (monthly seasonally adjusted) from FRED
Q3. Foreign exchange rate, Japanese yen per US dollar from Oanda.com (Hint: Oanda.com only reports data for the past 180 days)
Q4. You are interested in past performance of four tech giants - Microsoft, Apple, Tesla and Amazon for the period of 2014-01-01 - 2017-12-31. Load the stocks; extract the Adjusted Close column from each of the three stocks; and merge them into one object.
# Create a new environment
data_env <- new.env()
getSymbols(c("MSFT", "AAPL", "TSLA", "AMZN"), from = "2014-01-01",to = "2017-12-31" , env = data_env, auto.assign = TRUE)
## [1] "MSFT" "AAPL" "TSLA" "AMZN"
adjusted_list <- lapply(data_env, Cl)
adjusted <- do.call(merge, adjusted_list)
head(adjusted)
## TSLA.Close AAPL.Close AMZN.Close MSFT.Close
## 2014-01-02 150.10 79.01857 397.97 37.16
## 2014-01-03 149.56 77.28286 396.44 36.91
## 2014-01-06 147.00 77.70428 393.63 36.13
## 2014-01-07 149.36 77.14857 398.03 36.41
## 2014-01-08 151.28 77.63715 401.92 35.76
## 2014-01-09 147.53 76.64571 401.01 35.53
Q5. Add an argument to the code below to turn on status of retrieval. What is the status of retrieval reported? Hint: One way to find more information about a package and a function within it is a user manual that is available on CRAN. Google the package name; select CRAN from the list; click on Reference manual; and search the function in the document.
getSymbols("KRW/USD", src = "oanda", auto.assign = FALSE, verbose = T)
## downloading KRW/USD .....done.
## KRW.USD
## 2018-04-08 0.000934
## 2018-04-09 0.000936
## 2018-04-10 0.000938
## 2018-04-11 0.000938
## 2018-04-12 0.000934
## 2018-04-13 0.000934
## 2018-04-14 0.000934
## 2018-04-15 0.000934
## 2018-04-16 0.000932
## 2018-04-17 0.000936
## 2018-04-18 0.000938
## 2018-04-19 0.000940
## 2018-04-20 0.000935
## 2018-04-21 0.000934
## 2018-04-22 0.000934
## 2018-04-23 0.000930
## 2018-04-24 0.000928
## 2018-04-25 0.000924
## 2018-04-26 0.000928
## 2018-04-27 0.000934
## 2018-04-28 0.000936
## 2018-04-29 0.000936
## 2018-04-30 0.000936
## 2018-05-01 0.000932
## 2018-05-02 0.000929
## 2018-05-03 0.000930
## 2018-05-04 0.000930
## 2018-05-05 0.000931
## 2018-05-06 0.000931
## 2018-05-07 0.000928
## 2018-05-08 0.000928
## 2018-05-09 0.000926
## 2018-05-10 0.000934
## 2018-05-11 0.000936
## 2018-05-12 0.000936
## 2018-05-13 0.000936
## 2018-05-14 0.000936
## 2018-05-15 0.000930
## 2018-05-16 0.000928
## 2018-05-17 0.000926
## 2018-05-18 0.000926
## 2018-05-19 0.000925
## 2018-05-20 0.000925
## 2018-05-21 0.000924
## 2018-05-22 0.000930
## 2018-05-23 0.000926
## 2018-05-24 0.000926
## 2018-05-25 0.000928
## 2018-05-26 0.000928
## 2018-05-27 0.000928
## 2018-05-28 0.000932
## 2018-05-29 0.000926
## 2018-05-30 0.000926
## 2018-05-31 0.000928
## 2018-06-01 0.000932
## 2018-06-02 0.000933
## 2018-06-03 0.000934
## 2018-06-04 0.000934
## 2018-06-05 0.000934
## 2018-06-06 0.000937
## 2018-06-07 0.000935
## 2018-06-08 0.000930
## 2018-06-09 0.000930
## 2018-06-10 0.000930
## 2018-06-11 0.000930
## 2018-06-12 0.000928
## 2018-06-13 0.000922
## 2018-06-14 0.000922
## 2018-06-15 0.000911
## 2018-06-16 0.000906
## 2018-06-17 0.000906
## 2018-06-18 0.000905
## 2018-06-19 0.000900
## 2018-06-20 0.000902
## 2018-06-21 0.000900
## 2018-06-22 0.000900
## 2018-06-23 0.000900
## 2018-06-24 0.000900
## 2018-06-25 0.000896
## 2018-06-26 0.000896
## 2018-06-27 0.000892
## 2018-06-28 0.000892
## 2018-06-29 0.000898
## 2018-06-30 0.000898
## 2018-07-01 0.000898
## 2018-07-02 0.000894
## 2018-07-03 0.000896
## 2018-07-04 0.000896
## 2018-07-05 0.000894
## 2018-07-06 0.000896
## 2018-07-07 0.000896
## 2018-07-08 0.000896
## 2018-07-09 0.000900
## 2018-07-10 0.000898
## 2018-07-11 0.000890
## 2018-07-12 0.000888
## 2018-07-13 0.000886
## 2018-07-14 0.000886
## 2018-07-15 0.000886
## 2018-07-16 0.000886
## 2018-07-17 0.000888
## 2018-07-18 0.000884
## 2018-07-19 0.000880
## 2018-07-20 0.000884
## 2018-07-21 0.000887
## 2018-07-22 0.000887
## 2018-07-23 0.000882
## 2018-07-24 0.000884
## 2018-07-25 0.000890
## 2018-07-26 0.000892
## 2018-07-27 0.000894
## 2018-07-28 0.000896
## 2018-07-29 0.000896
## 2018-07-30 0.000895
## 2018-07-31 0.000896
## 2018-08-01 0.000894
## 2018-08-02 0.000888
## 2018-08-03 0.000888
## 2018-08-04 0.000890
## 2018-08-05 0.000890
## 2018-08-06 0.000888
## 2018-08-07 0.000892
## 2018-08-08 0.000894
## 2018-08-09 0.000894
## 2018-08-10 0.000886
## 2018-08-11 0.000886
## 2018-08-12 0.000885
## 2018-08-13 0.000882
## 2018-08-14 0.000886
## 2018-08-15 0.000882
## 2018-08-16 0.000886
## 2018-08-17 0.000890
## 2018-08-18 0.000894
## 2018-08-19 0.000894
## 2018-08-20 0.000892
## 2018-08-21 0.000895
## 2018-08-22 0.000894
## 2018-08-23 0.000890
## 2018-08-24 0.000896
## 2018-08-25 0.000898
## 2018-08-26 0.000898
## 2018-08-27 0.000900
## 2018-08-28 0.000902
## 2018-08-29 0.000900
## 2018-08-30 0.000900
## 2018-08-31 0.000896
## 2018-09-01 0.000896
## 2018-09-02 0.000896
## 2018-09-03 0.000898
## 2018-09-04 0.000895
## 2018-09-05 0.000892
## 2018-09-06 0.000892
## 2018-09-07 0.000890
## 2018-09-08 0.000888
## 2018-09-09 0.000888
## 2018-09-10 0.000886
## 2018-09-11 0.000888
## 2018-09-12 0.000888
## 2018-09-13 0.000892
## 2018-09-14 0.000893
## 2018-09-15 0.000892
## 2018-09-16 0.000892
## 2018-09-17 0.000888
## 2018-09-18 0.000890
## 2018-09-19 0.000892
## 2018-09-20 0.000894
## 2018-09-21 0.000896
## 2018-09-22 0.000898
## 2018-09-23 0.000898
## 2018-09-24 0.000894
## 2018-09-25 0.000894
## 2018-09-26 0.000896
## 2018-09-27 0.000898
## 2018-09-28 0.000901
## 2018-09-29 0.000900
## 2018-09-30 0.000901
## 2018-10-01 0.000900
## 2018-10-02 0.000894
## 2018-10-03 0.000892