stock_data: Get a CFM Stock Historical Data

Description Usage Arguments Value Note Examples

Description

Given a valid stock name listed in CFM, this function returns the corresponding financial data for the specified period (start_date until end_date). The returned dataframe includes Session, Reference price, Last price, +Intraday high, + Intraday low Number of shares traded and Capitalisation columns

Usage

1
stock_data(stock_name, start_date, end_date)

Arguments

stock_name

A character vector of length one. Use get_stocks() to list all valid stocks names listed in CFM

start_date

A character vector of length one matching the format 'dd/mm/yyyy'

end_date

A character vector of length one matching the format 'dd/mm/yyyy'

Value

An R data.frame

Note

The difference between end_date and start_date should be less than or equal 3 years.

Examples

1
2
## Not run: stock_data('COSUMAR', '01/01/2014', '31/12/2016')
## Not run: stock_data('ATLANTA', '01/01/2017', '30/06/2017')

blnash508/cfm documentation built on May 30, 2019, 4:31 p.m.