R Code

Over time, I developed many packages publicly distributed in CRAN (R repository of packages). You can find names and descriptions below. Most of them are also hosted at Github.

PkgsFromFiles - Functions for finding and installing R packages by finding its use from local R scripts and Rmarkdown/Sweave files. See blog post for details.

GetDFPData - Reads annual financial reports including assets, liabilities, dividends history, stockholder composition and much more from Bovespa’s DFP, FRE and FCA systems http://www.bmfbovespa.com.br/en_us/products/listed-equities-and-derivatives/equities/listed-companies.htm. These are web based interfaces for all financial reports of companies traded at Bovespa. The package is especially designed for large scale data importation, keeping a tabular (long) structure for easier processing.

GetHFData - Downloads and aggregates high frequency trading data for Brazilian instruments directly from Bovespa ftp site ftp://ftp.bmf.com.br/MarketData/.

BatchGetSymbols - Makes it easy to download a large number of trade data from Yahoo or Google Finance.

GetTDData - Downloads and aggregates data for Brazilian government issued bonds directly from the website of Tesouro Direto http://www.tesouro.fazenda.gov.br/tesouro-direto-balanco-e-estatisticas.

GetLattesData - A simple API for downloading and reading xml data directly from Lattes http://lattes.cnpq.br/.

RndTexExams - Using as input a ‘LaTeX’ file with a multiple choice exam, this package will produce several versions with randomized contents of the same exam. Functions for grading and testing for cheating are also available.

fMarkovSwitching - This package provides functions for estimation, simulation and forecasting of a general markov switching regression. You can install it directly from R: install.packages("fMarkovSwitching", repos="http://R-Forge.R-project.org")