Description Usage Arguments Details Value Note Author(s) Examples
Get investment data from the internet.
1 2 3 4 5 |
symbol |
Yahoo! Finance instrument symbol. |
start |
Numeric; first date of desired data, in YYYYMMDD format. Default is first date of series. |
end |
Numeric; last date of desired data, in YYYYMMDD format. Default is last date of series. |
freq |
Desired data frequency. One of
|
type |
Type of data to return. One of
|
adjust |
Logical; if |
quiet |
Logical; if |
exchange |
Character vector of exchange names on which desired instrument symbols are traded. |
sort.by |
Character vector of columns by which
returned data will be sorted. Must be one or more of
|
getYahooData
fetches individual stock data from
the Yahoo! Finance website. It also adjusts price for
splits and dividends, and volume for splits.
stockSymbols
fetches instrument symbols from the
nasdaq.com website, and adjusts the symbols to be
compatible with the Yahoo! Finance website.
getYahooData
returns an xts object containing the
columns:
stockSymbols
returns a character vector containing
all the listed symbols for the given exchanges.
Trade date, in CCYYMMDD format.
Open price.
High price.
Low price.
Close price.
Volume.
The symbols returned by stockSymbols
may not be in
the format necessary to retrieve data using
getYahooData
.
getYahooData
has only been tested on daily data.
It isn't known if the function correctly adjusts data for
any other frequency.
Joshua Ulrich
1 2 3 4 5 | ### Note: you must have a working internet
### connection for these examples to work!
ibm <- getYahooData("IBM", 19990404, 20050607)
nyse.symbols <- stockSymbols("NYSE")
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.