library(magrittr) knitr::opts_chunk$set( collapse = TRUE, comment = "#>", fig.path = "README-" )
The goal of CSE (Casablanca Stock Exchange) is to simplify financial programming workflow with Casablanca stock exchange data.
Currently, it implements 3 mains functions:
listed_symbols
: Returns all listed symbols (stocks, indexes, or both) in Casablanca stock exchange.
get_symbol
: Returns a symbol historical data corresponding to a specific date range.
ipo_date
: Returns a symbol IPO (Initial Public Offering) date.
You can install CSE from github with:
# install.packages("devtools") devtools::install_github("blnash508/CSE", build_vignettes = TRUE)
A detailled documentation can be found in the package vignette.
vignette("cse_vignette", package = "CSE")
This is a basic example which shows you how to use CSE:
listed_stocks <- CSE::listed_symbols(type = "stock") available_indexes <- CSE::listed_symbols(type = "index") head(listed_stocks) head(available_indexes)
cosumar_data <- CSE::get_symbol(symbol = "COSUMAR", from = "2018-01-01", to = "2018-06-30", type = "stock") masi_data <- CSE::get_symbol(symbol = "MASI", from = "2018-01-01", to = "2018-06-30", type = "index") head(cosumar_data) head(masi_data)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.