GetBCBData

Risk and return for B3

One of the subjects that I teach in my undergraduate finance class is the relationship between risk and expected returns. In short, the riskier the investment, more returns should be expected by the investor. It is not a difficult argument to make. All that you need to understand is to remember that people are not naive in financial markets. Whenever they make a big gamble, the rewards should also be large. Rational investors, on theory, would not invest in risky stocks that are likelly to yield low returns. Going further, one the arguments I make to support this idea is looking at historical data.

New package: GetBCBData

The Central Bank of Brazil (BCB) offers access to the SGS system (sistema gerenciador de series temporais) with a official API available here. Over time, I find myself using more and more of the available datasets in my regular research and studies. Last weekend I decided to write my own API package that would make my life (and others) a lot easier. Package GetBCBData can fetch data efficiently and rapidly: Use of a caching system with package memoise to speed up repeated requests of data; Users can utilize all cores of the machine (parallel computing) when fetching a large batch of time series; Allows the choice for format output: long (row oriented, tidy data) or wide (column oriented) Error handling internally.