stock_data | R Documentation |
Contains daily high, low, open, close, and volume histories, plus dividend and split events, for 10 (somewhat randomly) selected stocks collected from public sources.
stock_data
A list in which each element is another list, and is named using the identifier of the asset to which its constituent data corresponds (e.g., the element named "AAPL" contains data for Apple, Inc.).
Each of the constituent lists elements contains the following elements:
dividends
:An xts object having a single column – DividendAmount
– giving
the total value of any and all dividends that went ex-div on the date
given by the index of the xts.
OHLCV
:A 5-column xts object having column names High
, Low
,
Open
, Close
, Volume
. Each element is the daily
historical price (or volume) recorded for the day specified by the index.
splits
:A 2-column xts object having column names Denominator
, and
Numerator
, where Denominator
refers to equivalent stock
AFTER split, and Numerator
refers to stock BEFORE split; e.g, a
"2-for-1" split would show Denominator
= 2, Numerator
= 1.
The index of the xts object corresponds to the ex-date of the split
described by Denominator
and Numerator
.
Absolutely no promise, guarantee, or representation is made by the authors of FinancieR concerning the accuracy or reliability of stock_data, or any other data in the FinancieR package.
## Daily low prices for Chubb from 01 June 2014 to the end of 2015 chubb_low <- stock_data$CB$prices$Low["2014-06-01/2015"] tail(chubb_low) ## All prices data for Pepsico for 2012 pep_2012 <- stock_data$PEP$prices["2012"] tail(pep_2012) ## High & Low prices for GD for March 2017 gd_high_and_low <- stock_data$GD$prices["2017-03", c("High", "Low")] tail(gd_high_and_low) ## Dividends paid by Johnson & Johnson in 2017 stock_data$JNJ$dividends["2017"] ## Stock splits for AAPL stock_data$AAPL$splits
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.