get.marketData: End of day US Stock Prices

Description Usage Arguments Value Note References Examples

Description

Retrieves data from the Quandl Dataset.

Usage

1
2
3
get.marketData(code, start_date, end_date, collapse = c("daily",
  "weekly", "monthly", "quarterly", "annual"), api_key,
  skipNullStocks = FALSE, skipNA = FALSE)

Arguments

code

string or list of strings, code a.k.a ticker symbol on Quandle.

start_date

A Date object, format="YYYY-MM-DD". Retrieve data rows on and after the specified start date.

end_date

A Date object, format="YYYY-MM-DD". Retrieve data rows up to and including the specified end date.

collapse

Change the sampling frequency of the returned data. Default is none; i.e., data is returned in its original granularity.

api_key

Authentication toket for a Quandl user.

skipNA

If FALSE, STOP is a code for a predefined date range is not found, otherwise WARNIGN. Default=FALSE

Value

list(data=dataframe of returns per stock, missingCode=vector of codes that do not satisfy input params)

Note

Due to Quandle database specification, all ".", " " symbols are represented as "_".

References

This R package uses the Quandl API. For more information go to https://www.quandl.com/docs/api. For more help on the package itself go to https://www.quandl.com/help/r.

Examples

1
2
3
4
5
6
7
8
9
## Not run: 
code <- c("AAPL", "FB", "GOOG", "C", "A", "INTC", "T", "WMT", "TXN")
start_date <- "2017-12-31"
end_date <- "2018-12-31"
collapse <- "daily"
api_key <- "User123"
market_date <- get.marketDate (code=code, start_date=start_date, end_date=end_date, collapse=collapse, api_key=api_key)

## End(Not run)

kkhamutou/MarkowitzUW documentation built on June 10, 2019, 8:17 a.m.