get.marketData.random: Random end of day US Stock prices

Description Usage Arguments Value Note References

Description

Retrieves N number of random stocks from the Quandl Dataset.

Usage

1
2
3
get.marketData.random(nassets, start_date, end_date,
  collapse = c("daily", "weekly", "monthly", "quarterly", "annual"),
  api_key, excludedCodes = NULL, skipNA = TRUE, recursive = FALSE)

Arguments

nassets

An integer, number of stock in a portfolio

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

A string, authentication toket for a Quandl user.

excludedCodes

A string or list of strings, stock codes that should be excluded from random sampling.

skipNA

Boolean, if skipNA=TRUE, an assert that has NA in its date range is excluded.

recursive

Boolean, if recursive=TRUE, a function will execute until exact predefined number of stocks is found.

Value

list(data=dataframe of stocks in portfolio, missingCode=vector of codes that do not satisfy input params)

Note

If recursive=TRUE & skipNA=TRUE, a function will search for N asserts that satisfy start_date, end_date and collapse arguments. Therefore, eventually, it may go out of requests allowed by Quandle.

References

Also see get.marketData function for additional information.


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