The Brazilian Yield Curve

An update to package GetTDData

The latest version of GetTDData offers function get.yield.curve to download the current Brazilian yield curve directly from Anbima. The yield curve is a financial tool that, based on current prices of fixed income instruments, shows how the market perceives the future real, nominal and inflation returns. You can find more details regarding the use and definition of a yield curve in Investopedia.

Unfortunately, function get.yield.curve only downloads the current yield curve from the website. Data for historical curves over five business days are not available in Anbima website.

The new version of GetTDData is available in github and CRAN:

#from CRAN
install.packages('GetTDData')

# From github
devtools::install_github('msperlin/GetTDData')

The current Brazilian yield curve

Downloading the yield curve is easy, all you need is to di us call function get.yield.curve without any argument:

library(GetTDData)

df.yield <- get.yield.curve()  
str(df.yield)
## 'data.frame':    111 obs. of  5 variables:
##  $ n.biz.days  : num  126 252 378 504 630 ...
##  $ type        : chr  "real_return" "real_return" "real_return" "real_return" ...
##  $ value       : num  3.89 2.05 1.98 2.28 2.6 ...
##  $ ref.date    : Date, format: "2020-08-31" "2021-01-04" ...
##  $ current.date: Date, format: "2020-04-27" "2020-04-27" ...

The result is a dataframe in the long format containing data for the yield curve of real, nominal and inflation returns. Let’s plot it!

library(ggplot2)

p <- ggplot(df.yield, aes(x=ref.date, y = value) ) +
  geom_line(size=1) + geom_point() + facet_grid(~type, scales = 'free') + 
  labs(title = paste0('The current Brazilian Yield Curve '),
       subtitle = paste0('Date: ', df.yield$current.date[1]))     

print(p)  

The expected inflation in Brazil seems to be stable. Market expectation is for an inflation around 5% a year in 2024. This level is quite low when compared to our history. As for future nominal interest rate, market expects another drop in the interest rate level in 2019. This is in line with the latest report from COPOM, the Brazilian comittee of monetary policy. Real returns also seems to be stable and low, around 5%. Again, this is one of the lowest levels of real returns in our economy.

I’m very optimistic (and very biased as I love my country!) regarding the future of the Brazilian economy. I hope we can keep these low levels of interest rate and inflation in order to foment comsumption, jobs and overall economic well-being.

Marcelo S. Perlin
Marcelo S. Perlin
Associate Professor

My research interests include data analysis, finance and cientometrics.

comments powered by Disqus