Description Usage Arguments Value Note References
Retrieves N number of random stocks from the Quandl Dataset.
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)
|
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. |
list(data=dataframe of stocks in portfolio, missingCode=vector of codes that do not satisfy input params)
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.
Also see get.marketData function for additional information.
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.