Package: rb3 0.1.0

Wilson Freitas

rb3: Download and Parse Public Data Released by B3 Exchange

Download and parse public files released by B3 and convert them into useful formats and data structures common to data analysis practitioners.

Authors:Wilson Freitas [aut, cre], Marcelo Perlin [aut]

rb3_0.1.0.tar.gz
rb3_0.1.0.zip(r-4.7)rb3_0.1.0.zip(r-4.6)rb3_0.1.0.zip(r-4.5)
rb3_0.1.0.tgz(r-4.6-any)rb3_0.1.0.tgz(r-4.5-any)
rb3_0.1.0.tar.gz(r-4.7-any)rb3_0.1.0.tar.gz(r-4.6-any)
rb3_0.1.0.tgz(r-4.6-emscripten)
manual.pdf |manual.html
DESCRIPTION |NEWS
card.svg |card.png
rb3/json (API)

# Install 'rb3' in R:
install.packages('rb3', repos = c('https://ropensci.r-universe.dev', 'https://cloud.r-project.org'))

Reviews:rOpenSci Software Review #534

Bug tracker:https://github.com/ropensci/rb3/issues

Pkgdown/docs site:https://docs.ropensci.org

On CRAN:

Conda:

brazilexchange-datafinancefinancial-datafinancial-servicesmarket-data

8.10 score 94 stars 89 scripts 526 downloads 39 exports 54 dependencies

Last updated from:ef11508519 (on main). Checks:10 OK. Indexed: yes.

TargetResultTimeFilesSyslog
linux-devel-x86_64OK165
pkgdown docsOK223
source / vignettesOK213
linux-release-x86_64OK149
macos-release-arm64OK104
macos-oldrel-arm64OK112
windows-develOK165
windows-releaseOK139
windows-oldrelOK131
wasm-releaseOK123

Exports:code2monthcotahist_filter_bdrcotahist_filter_equitycotahist_filter_equity_optionscotahist_filter_etfcotahist_filter_fiagrocotahist_filter_fidccotahist_filter_fiicotahist_filter_fund_optionscotahist_filter_indexcotahist_filter_index_optionscotahist_filter_unitcotahist_getcotahist_options_by_symbols_getdownload_marketdatafetch_marketdatafutures_getindexes_composition_getindexes_current_portfolio_getindexes_getindexes_historical_data_getindexes_theoretical_portfolio_getlist_templatesmaturitycode2datemeta_db_connectionrb3_bootstrapread_marketdatatemplate_datasettemplate_meta_create_or_loadtemplate_meta_loadtemplate_meta_newtemplate_retrieveyc_brl_getyc_brl_with_futures_getyc_getyc_ipca_getyc_ipca_with_futures_getyc_usd_getyc_usd_with_futures_get

Dependencies:arrowaskpassassertthatbase64encbitbit64bizdaysblobcachemclicliprcpp11crayoncurlDBIdigestdplyrfastmapgenericsgluehmshttrjsonlitelifecyclelubridatemagrittrmemoisemimeopensslpillarpkgconfigprettyunitsprogresspurrrR.methodsS3R.ooR.utilsR6readrrlangRSQLitestringistringrsystibbletidyselecttimechangetzdbutf8vctrsvroomwithrXMLyaml

Getting Started
Introduction | Downloading Market Data | Templates | Fetching market data | rb3.cachedir folder | Note | Accessing the data | Conclusion

Last update: 2025-04-28
Started: 2025-04-14

How to Compute Historical Rates from B3 Future Prices
Introduction | Fetching historical data | Querying the data | Historical nominal interest rates | Historical real interest rates | Implied inflation | Forward rates | Conclusion

Last update: 2025-04-27
Started: 2022-04-24

Analyzing B3 Index Data
Introduction | Retrieving available indices | Fetching historical index data | Visualizing index performance | Analyzing index composition | Finding stocks in multiple indices | Finding which indices contain a specific stock | Analyzing index weights with the theoretical portfolio | Top constituents by weight | Comparing index concentration | Sector analysis with the current portfolio | Sector composition analysis | Creating helper functions for index analysis | Analyzing index performance metrics | Calculating summary statistics | Conclusion

Last update: 2025-04-14
Started: 2025-04-14

Fetching B3 Yield Curves
Introduction | Fetching the data | Selecting Reference Dates | 2. Fetching and Storing Market Data | PRE Curve (DI rates) | IPCA Curve (DIC curve) | Cupom Limpo (USD - DOC curve) | Break-even Inflation: PRE vs DIC | Conclusion

Last update: 2025-04-14
Started: 2022-04-16

Fetching Historical Equity Data
Introduction | Fetching historical data | Downloading yearly data | Downloading daily data | Accessing the datasets | Filtering by asset type | Equities | ETFs (Exchange Traded Funds) | REITs (FIIs - Fundos Imobiliários) | BDRs (Brazilian Depositary Receipts) | Other asset classes | Analyzing equity data | Top traded equities by volume | ETF market share analysis | Analyzing distribution IDs for price continuity | Working with BDRs | Conclusion

Last update: 2025-04-14
Started: 2025-04-14

Readme and manuals

Help Manual

Help pageTopics
Convert Maturity Code to Corresponding Monthcode2month
Access COTAHIST datasetscotahist_get
Filtering data from COTAHIST datasetscotahist-extracts cotahist_filter_bdr cotahist_filter_equity cotahist_filter_equity_options cotahist_filter_etf cotahist_filter_fiagro cotahist_filter_fidc cotahist_filter_fii cotahist_filter_fund_options cotahist_filter_index cotahist_filter_index_options cotahist_filter_unit
Download Raw Market Data Files from B3download_marketdata
Fetch and process market datafetch_marketdata
Retrieves B3 Futures Settlement Pricesfutures_get
Retrieve Composition of B3 Indexesindexes_composition_get
Get B3 indexes availableindexes_get
Get historical data from B3 indexesindexes_historical_data_get
Retrieve Portfolio of B3 Indexesindexes-portfolio indexes_current_portfolio_get indexes_theoretical_portfolio_get
List Available Templateslist_templates
Convert Maturity Code to Datematuritycode2date
Returns a SQLite Database Connection for the RB3 Package Metadatameta_db_connection
Initialize the rb3 package cache foldersrb3_bootstrap
'rb3.cachedir' Optionrb3.cachedir
Read and parse raw market data files downloaded from the B3 website.read_marketdata
Enhanced Dataset Creationcotahist_options_by_symbols_get superdataset yc_brl_with_futures_get yc_ipca_with_futures_get yc_usd_with_futures_get
Access a Dataset for a Templatetemplate_dataset
Create or Load Template Metadatatemplate_meta_create_or_load template_meta_load template_meta_new
Retrieve a template by its nametemplate_retrieve
Retrieve Yield Curve Datayc_brl_get yc_get yc_ipca_get yc_usd_get yc_xxx_get