Description Usage Arguments Details Value Examples
View source: R/adjustIntraday.yahoo.R
find or download dividend and split data
1 2 3 |
Symbol |
name of instrument |
force |
if TRUE, data will be downloaded from yahoo even if it already exists in the instrument object. Downloaded data will overwrite data in instrument object, if any. (FALSE) |
silent |
silence warning when instrument is not defined (TRUE) |
get data that is stored in the 'div' or 'spl' slot of an instrument. If none exists there, it will be downloaded from yahoo. If the instrument exists, but it did not have a 'div' or 'spl' slot, the newly downloaded data will be stored there.
If the instrument has an identifier
named "yahoo",
that ticker will be used in the getDividends
or
getSplits
call.
whatever is in the 'div' or 'spl' slot of the instrument. probably xts data
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 | ## Not run:
get_div("SPY", silent=FALSE)
stock("SPY", currency("USD"))
get_div("SPY", silent=FALSE) # will also store in .instrument$SPY$div
getInstrument("SPY")$div
getInstrument("SPY")$
get_div("SPY") # no download...gets data from .instrument envir
get_div("SPY", force=TRUE) # downloads from yahoo
# A non-U.S. stock
# get_div("BMW") # this doesn't work because BMW is not a U.S. stock
stock("BMW", currency("EUR"), identifiers=list(yahoo="BMW.DE"))
get_div("BMW") # uses the yahoo identifier BMW.DE
## End(Not run)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.