I’m happy to report that package GetFREData is now available in CRAN. This R package serves as an interface to all corporate datasets available in the FRE system, a vast and official repository of information about many different corporate events. All companies listed at B3 – Brazilian stock exchange – must report to FRE any significant change in their corporate structure. You can find more details about what is available in FRE in its web interface.
The R package fetches data from the CVM ftp, downloads and parses the xml files, and output several tables as a list.
Back in 2017 I wrote the first version of package GetDFPData, along with a paper describing the code and providing an empirical application.
However, maintaining the package over the years has been frustrating. The code is becoming increasingly complex, much due to the fact that it handles FRE and DFP data in a single package. Execution speed for large scale importation – many years and many companies – is not reasonable. In top of that, B3’s website is unstable as a source of data and it seems it will stay like that for a long time.