Description Usage Arguments Value Examples
Function to load and manage historical data of a Symbol listed in Casablanca Stock Exchange. Current available symbol types are "stock" and "index". For stocks, the returned object includes: Date, Open, High, Low, Close, Adjusted, Quantity, Volume, and Capitalisation. For indexes, the returned object includes: Date and Value columns.
1 | get_symbol(symbol, from, to, type, format.as.xts = TRUE)
|
symbol |
a character vector specifying the name of the symbol to be loaded. Use |
from |
a character vector specifying the start date. Should be formatted according to ISO8601 ( |
to |
a character vector specifying the end date. Should be formatted according to ISO8601 ( |
type |
a character vector specifying the symbol type. Current supported types are "stock" and "index" |
format.as.xts |
a boolean value. Set to |
an xts object or a dataframe
1 2 3 | ## Not run: get_symbol('COSUMAR', '2017-01-01', '2017-12-31')
## Not run: get_symbol('COSUMAR', '2017-01-01', '2017-06-30', format.as.xts = TRUE)
## Not run: get_symbol('MASI', '2017-01-01', '2017-12-31', type = 'index')
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.