
Last chance! 50% off unlimited learning
Sale ends in
Symbols
to specified env
from getSymbols(Symbols,src='google')
will in
turn call this method. It is documented for the
sole purpose of highlighting the arguments
accepted, and to serve as a guide to creating
additional getSymbols getSymbols.google(Symbols,
env,
return.class = c("quantmod.OHLC","zoo"),
from = "2007-01-01",
to = Sys.Date(),
...)
Symbol
specified, with class defined
by return.class
. Presently this may be ts
,
its
, zoo
, quantmod.OHLC
, or timeSeries
.getSymbols
(see also).One of a few currently defined methods for loading
data for use with
A word of warning. Google is the home of BETA, and historic data is no exception. There is a BUG in practically all series that include the dates Dec 29,30, and 31 of 2003. The data will show the wrong date and corresponding prices. This essentially makes it useless, but if they ever apply a fix the data is nice(r) than Yahoo, in so much as it is all split adjusted and there is forty years worth to be had. As long as you skip the holiday week of 2003. : )
getSymbols
,
setSymbolLookup
# All 3 getSymbols calls return the same
# MSFT to the global environment
# The last example is what NOT to do!
## Method #1
getSymbols('MSFT',src='google')
## Method #2
setDefaults(getSymbols,src='google')
# OR
setSymbolLookup(MSFT='google')
getSymbols('MSFT')
#########################################
## NOT RECOMMENDED!!!
#########################################
## Method #3
getSymbols.google('MSFT',verbose=TRUE,env=globalenv())
Run the code above in your browser using DataLab