Last chance! 50% off unlimited learning
Sale ends in
Download, or download and append stock split data from Yahoo! Finance.
getSplits(Symbol,
from = "1970-01-01",
to = Sys.Date(),
env = parent.frame(),
src = "yahoo",
auto.assign = FALSE,
auto.update = FALSE,
verbose = FALSE,
...,
curl.options = list())
If auto.assign is TRUE, the symbol will be written
to the environment specified in env
with a
.div appended to the name.
If auto.update is TRUE and the object is of class
xts
, the dividends will be included as an
attribute of the original object and be reassigned
to the environment specified by env
.
All other cases will return the split data
as an xts
object. NA
is returned if there
is no split data.
The Yahoo! stock symbol
date from in CCYY-MM-DD format
date to in CCYY-MM-DD format
where to create object
data source (only yahoo is valid at present)
should results be loaded to env
automatically add split to data object
display status of retrieval
currently unused
options passed to curl::curl
Josh Ulrich
Eventually destined to be a wrapper function along the lines
of getSymbols
to different sources - this currently
only support Yahoo data.
Yahoo! Finance: https://finance.yahoo.com
getSymbols
, getDividends
if (FALSE) {
getSymbols("MSFT")
getSplits("MSFT")
getSplits(MSFT)
}
Run the code above in your browser using DataLab