GithubHelp home page GithubHelp logo

pybacen's Introduction

Pybacen

This library was developed for economic analysis in the Brazilian scenario (Investments, micro and macroeconomic indicators)

Installation

Install using pip

pip install pybacen

Usage

Time Series Bacen

from pybacen.bacen import time_series # Source: SGS - Sistema Gerenciador de Séries Temporais - v2.1 (Bacen - Banco Central)

# To consult the Bacen code, use it as a parameter when consulting the time series
list_code_bacen = time_series.read_bacen_code(search_text='%CDI%ANUALIZADA%252%', period= 'D', unit= '% a.a.')

list_code_bacen
COD_BACEN NM_SERIE UNIDADE PERIODICIDADE FONTE ESPECIAL
4015 4389 Taxa de juros - CDI anualizada base 252 % a.a. D BCB-Demab N
ts = time_series.read_time_series(bacen_code= 4389, start='2021-11-04', end='2021-11-04', as_index=True)

ts
valor
date
2021-11-04 7.65

Stock Quote - Yahoo Finance

from pybacen.yahoo_finance import stocks # Source: Yahoo Finance - Stock Quote

# Ibovespa - 2021-11-05
sq = stocks.read_stock_quote(stock_code='^BVSP', start= '2021-11-05', end= '2021-11-05', as_index= True)

sq
open high low close volume adjclose
date
2021-11-05 103412.0 105555.0 103412.0 104824.0 12595000.0 104824.0

Requirements

Using pandas datareader requires the following packages:

  • pandas>=1.0
  • requests>=2.19.0

Install latest development version

python -m pip install pip install pybacen

or

git clone https://github.com/RPCastro07/pybacen.git
cd pybacen
python setup.py install

pybacen's People

Contributors

rpcastro07 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.