On 01/09/2017 7:37 PM, Yingrui Liu wrote:
Dear Sir/Madam,
How to use getSymbols() to get annual data? For example, I need the annual
stock price of APPLE from the year 2000 to 2016. How to write the command? I
only know how to get the daily data. It is:
getSymbols("AAPL",from="2000-01-01",t
Reading ?getSymbols, why do think you can get yearly data if the src --
"yahoo" by default -- only contains daily data? And if you can get the
daily data, why can't you just pick a day from each year to make it yearly?
Note: I'm not a quantmod user, so apologies if I just don't get it.
Cheers,
Be
I suppose that might depend what you mean by "annual data".
?yearlyReturn
or
###
library(quantmod)
#> Loading required package: xts
#> Loading required package: zoo
#>
#> Attaching package: 'zoo'
#> The following objects are masked from 'package:base':
#>
#> as.Date, as.Date.numeric
#> Load
Dear Sir/Madam,
How to use getSymbols() to get annual data? For example, I need the annual
stock price of APPLE from the year 2000 to 2016. How to write the command? I
only know how to get the daily data. It is:
getSymbols("AAPL",from="2000-01-01",to="2016-12-31")
Thank you very much.
Hav
4 matches
Mail list logo