All Projects → thypad → Bovespa

thypad / Bovespa

Licence: mit
Python package that reads the historical quote files from BM&FBovespa (Brazillian Stock Exchange)

Programming Languages

python
139335 projects - #7 most used programming language

Projects that are alternatives of or similar to Bovespa

Fooltrader
quant framework for stock
Stars: ✭ 960 (+788.89%)
Mutual labels:  stock-market
Stocksight
Stock market analyzer and predictor using Elasticsearch, Twitter, News headlines and Python natural language processing and sentiment analysis
Stars: ✭ 1,037 (+860.19%)
Mutual labels:  stock-market
Technicalindicators
A javascript technical indicators written in typescript with pattern recognition right in the browser
Stars: ✭ 1,328 (+1129.63%)
Mutual labels:  stock-market
Robin stocks
This is a library to use with Robinhood Financial App. It currently supports trading crypto-currencies, options, and stocks. In addition, it can be used to get real time ticker information, assess the performance of your portfolio, and can also get tax documents, total dividends paid, and more. More info at
Stars: ✭ 967 (+795.37%)
Mutual labels:  stock-market
Stocktrace
stock market analysis
Stars: ✭ 36 (-66.67%)
Mutual labels:  stock-market
Alice blue
Official Python library for Alice Blue API trading
Stars: ✭ 60 (-44.44%)
Mutual labels:  stock-market
Awesome Ai In Finance
🔬 A curated list of awesome machine learning strategies & tools in financial market.
Stars: ✭ 910 (+742.59%)
Mutual labels:  stock-market
Tradingbot
Autonomous stocks trading script
Stars: ✭ 99 (-8.33%)
Mutual labels:  stock-market
Netsci Project
Network Analysis for Financial Markets
Stars: ✭ 39 (-63.89%)
Mutual labels:  stock-market
Algobot
A C++ stock market algorithmic trading bot
Stars: ✭ 78 (-27.78%)
Mutual labels:  stock-market
Py Sec Edgar
Python application used to download, parse, and extract filings from the SEC Edgar Database (including 10-K, 10-Q, 13-D, S-1, 8-K, etc.)
Stars: ✭ 35 (-67.59%)
Mutual labels:  stock-market
Pandas Ta
Technical Analysis Indicators - Pandas TA is an easy to use Python 3 Pandas Extension with 130+ Indicators
Stars: ✭ 962 (+790.74%)
Mutual labels:  stock-market
Foobugs Dashboard
various dashing dashboard jobs
Stars: ✭ 64 (-40.74%)
Mutual labels:  stock-market
Sibyl
Platform for backtesting and live-trading intraday Stock/ETF/ELW using recurrent neural networks
Stars: ✭ 32 (-70.37%)
Mutual labels:  stock-market
Robinhood Playground
Stars: ✭ 96 (-11.11%)
Mutual labels:  stock-market
Intrinio Realtime Node Sdk
Intrinio NodeJS SDK for Real-Time Stock & Crypto Prices
Stars: ✭ 30 (-72.22%)
Mutual labels:  stock-market
Stock Market Sentiment Analysis
Identification of trends in the stock prices of a company by performing fundamental analysis of the company. News articles were provided as training data-sets to the model which classified the articles as positive or neutral. Sentiment score was computed by calculating the difference between positive and negative words present in the news article. Comparisons were made between the actual stock prices and the sentiment scores. Naive Bayes, OneR and Random Forest algorithms were used to observe the results of the model using Weka
Stars: ✭ 56 (-48.15%)
Mutual labels:  stock-market
Stockrecommendsystem
An intelligent recommender system for stock analyzing, predicting and trading
Stars: ✭ 106 (-1.85%)
Mutual labels:  stock-market
Stock Market Prediction Web App Using Machine Learning And Sentiment Analysis
Stock Market Prediction Web App based on Machine Learning and Sentiment Analysis of Tweets (API keys included in code). The front end of the Web App is based on Flask and Wordpress. The App forecasts stock prices of the next seven days for any given stock under NASDAQ or NSE as input by the user. Predictions are made using three algorithms: ARIMA, LSTM, Linear Regression. The Web App combines the predicted prices of the next seven days with the sentiment analysis of tweets to give recommendation whether the price is going to rise or fall
Stars: ✭ 101 (-6.48%)
Mutual labels:  stock-market
Tradestation
EasyLanguage indicators and systems for TradeStation
Stars: ✭ 65 (-39.81%)
Mutual labels:  stock-market

bovespa


Introduction

This package reads the historical stock quote files made available by BM&FBovespa at:

http://www.bmfbovespa.com.br/pt_br/servicos/market-data/historico/mercado-a-vista/cotacoes-historicas/

The historical quotes can be downloaded for a whole year or for specific days, with that said, any historical quote files you download from the link above is a simple text file that has a specified layout, also available in the link above.

Installation

To install this package, do::

pip install bovespa

Usage

To use this package to read historical quote files and print the records, do::

import bovespa

bf = bovespa.File(<path to file>)
for rec in bf.query():
    print(rec)

Right now, the File class is very simple, and the query() method accepts only one parameter specifying one stock symbol to look for in the file, like this::

import bovespa

bf = bovespa.File(<path to file>)
for rec in bf.query(stock='PETR3'):
    print(rec)

The bf.query() method does not create a list of Records in memory, it yields the next record as necessary.

The Record object represents a record that is defined in the documentation of the file format (already cited here), each file has one header record, which is the first record in the file, and one trailer record, which is the last record in the file. The other records are stockquote records, and carry various information on daily stock trading.

Some of the information in the stockquote records (and how it's usually called in portuguese) are:

  • date ("data do pregão")
  • stock symbol ("símbolo da ação")
  • open price ("preço de abertura")
  • high price ("preço máximo")
  • low price ("preço mínimo")
  • close price ("preço de fechamento")
  • volume ("quantidade total")
  • financial volume ("volume total")

To print the date, stock symbol and close price of each record in the file, you can do this::

import bovespa

bf = bovespa.File(<path to file>)
for rec in bf.query(stock='PETR3'):
    print('<{}, {}, {}>'.format(rec.date, rec.stock_symbol, rec.price_close))

Warning:

The main motivation of the development of this package is to create a way to go from the historical stock quotes given by bovespa, to the adjusted quotes you get in big stock websites, which take into account splits, dividends and so on. Performance is not a big issue here, rather than fast, this package should be complete, that is, it should allow someone to do whatever they want to do with the information present in the bovespa historical stock quotes files. One other objective is to store the data that we obtain from other places in simple formats, maybe csv, so that anyone can use that data, even if they don't know python.

So, summing up, this package wants to be given a bovespa historical stock quote file as input, and it will create a simple interface to extract information present in it, so you can store it in pandas, or in a database of your choice, AND in the future, it will also adjust the stock price history for splits, dividends, etc.

Beware that since the historic stock quote prices given by bovespa are not adjusted for things like splits, dividends and so on, if you compare the prices obtained with these files with the prices in well-known stock quote websites, there will be differences. If you want to check if the code does indeed get correct prices, just use a recent date (few days ago), that should be safe. I plan to adjust the prices for the historical data, but that is a big project, because I'll need dividend history and other such things, so for now, it is what it is.

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].