Description Usage Arguments Details Value
This function is the creator for an S3 class of structured dataset on stocks.
1 2 |
data |
a data frame, the raw data that contains stock prices. |
Names |
a character vector, the symbols of the stocks. |
date.col |
an integer or a character string that specifies the date column in data. |
price.col |
a vector of integers or character strings that specifies the price columns in data. |
rate.col |
an integer or a string that specifies the column for risk free rate. |
divRate.col |
a vector of integers or strings that specifies the columns for dividend rates. |
This function builds a stocks dataset by organizing raw data into a structured form.
If Names==NULL, the stocks will be automatically named as "S1", "S2", and so on.
If the raw data does not have a date column, date.col should be set to NULL,
and the data is regarded as in reverse chronological order.
An object of class stocksData, which stores the structured data of stocks.
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.