Using R to download high frequency trade data diretcly from Bovespa
Using package GetHFData
Recently, Bovespa, the Brazilian financial exchange company, allowed external access to its ftp site. In this address one can find several information regarding the Brazilian financial system, including datasets with high frequency (tick by tick) trading data for three different markets: equity, options and BMF.
Downloading and processing these files, however, can be exausting. The dataset is composed of zip files with the whole trading data, separated by day and market. These files are huge in size and processing or aggregating them in a usefull manner requires specific knowledge for the structure of the dataset.
The package GetHFData make is easy to access this dataset directly by allowing the easy importation and aggregations of it. Based on this package the user can:
- Access the contents of the Bovespa ftp using function function
- Get the list of available ticker in the trading data using
- Download individual files using
- Download and process a batch of dates and assets codes with
More details can be found in my SSRN paper.