yc_get | R Documentation |
Downloads yield curve data from B3 website https://www2.bmf.com.br/pages/portal/bmfbovespa/lumis/lum-taxas-referenciais-bmf-ptBR.asp. Particularly, we import data for
DI X Pre (yc_get
)
Cupom limpo (yc_usd_get
)
DI x IPCA (yc_ipca_get
)
yc_mget(
first_date = Sys.Date() - 5,
last_date = Sys.Date(),
by = 1,
cache_folder = cachedir(),
do_cache = TRUE
)
yc_get(refdate = Sys.Date(), cache_folder = cachedir(), do_cache = TRUE)
yc_ipca_mget(
first_date = Sys.Date() - 5,
last_date = Sys.Date(),
by = 1,
cache_folder = cachedir(),
do_cache = TRUE
)
yc_ipca_get(refdate = Sys.Date(), cache_folder = cachedir(), do_cache = TRUE)
yc_usd_mget(
first_date = Sys.Date() - 5,
last_date = Sys.Date(),
by = 1,
cache_folder = cachedir(),
do_cache = TRUE
)
yc_usd_get(refdate = Sys.Date(), cache_folder = cachedir(), do_cache = TRUE)
first_date |
First date ("YYYY-MM-DD") to |
last_date |
Last date ("YYYY-MM-DD") to |
by |
Number of days in between fetched dates (default = 1) in |
cache_folder |
Location of cache folder (default = cachedir()) |
do_cache |
Whether to use cache or not (default = TRUE) |
refdate |
Specific date ("YYYY-MM-DD") to |
See https://www.b3.com.br/data/files/8B/F5/11/68/5391F61043E561F6AC094EA8/Manual_de_Curvas.pdf for more details.
yc_get
returns the yield curve for the given date and yc_mget
returns
multiple yield curves for a given range of dates.
yc_ipca_get
returns the yield curve of real interest rates
for the given date and yc_ipca_mget
returns
multiple yield curves of real interest rates for a given range of dates.
These real interest rates consider IPCA as its inflation index.
yc_usd_get
returns the yield curve of nominal interest rates for USD in
Brazil for the given date and yc_usd_mget
returns
multiple yield curves of nominal interest rates for USD in Brazil for a
given range of dates.
These real interest rates consider IPCA as its inflation index.
A dataframe/tibble with yield curve data
## Not run:
df_yc <- yc_mget(first_date = Sys.Date() - 5, last_date = Sys.Date())
head(df_yc)
## End(Not run)
## Not run:
df_yc <- yc_get(Sys.Date())
head(df_yc)
## End(Not run)
## Not run:
df_yc_ipca <- yc_ipca_mget(
first_date = Sys.Date() - 5,
last_date = Sys.Date()
)
head(df_yc_ipca)
## End(Not run)
## Not run:
df_yc_ipca <- yc_ipca_get(Sys.Date())
head(df_yc_ipca)
## End(Not run)
## Not run:
df_yc_usd <- yc_usd_mget(
first_date = Sys.Date() - 5,
last_date = Sys.Date()
)
head(df_yc_usd)
## End(Not run)
## Not run:
df_yc_usd <- yc_usd_get(Sys.Date())
head(df_yc_usd)
## End(Not run)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.