O objetivo é rankear ações por fórmulas já consagradas no mercado.
Conseguimos extrair os indicadores fundamentalistas pelo site statusinvest.com.br, o que elimina boa parte do trabalho de transformação de dados.
Fórmulas já implementadas:
- Joel Greenblatt (Little book of valuation).
- Benjamin Graham (Security Analysis / Intelligent Investor).
Outras Funcionalidades:
- DRE: Demonstrativo contabil de resultados de empresas por ano.
A ideia no futuro é adicionar fórmulas mais avançadas, que dependem de input de dados projetados:
- Valuation por fluxo de caixa descontado
- Modelo de Gordon
Versão utilizada: 3.9.1
Comandos para executar utilizando pipenv
pip install pipenv
# Create and select venv
pipenv shell
# install modules first time
pipenv install -r requirements.txt
# Start application
pipenv run python ./flask_app/app.py
# exit venv
exit
Comandos para executar utilizando venv:
- Windows cmd:
# Create venv
py -m venv bstonks-venv
# Activate venv
bstonks-env/Scripts/activate.bat
# Install modules
pip install -r requirements.txt
# Start app
py ./flask_app/app.py
# Deactivate
bstonks-env/Scripts/deactivate.bat
- Windows cygwin:
# Create venv
py -m venv bstonks-venv
# First convert "activate" file EOL format from CR/LF to LF
dos2unix ./bstonks-venv/Scripts/activate
# Activate venv
source ./bstonks-venv/Scripts/activate
# Install modules
pip install -r requirements.txt
# Start app
py ./flask_app/app.py
# Deactivate venv
deactivate
https://pypi.org/project/yfinance/
https://algotrading101.com/learn/yfinance-guide/
https://towardsdatascience.com/pipenv-to-heroku-easy-app-deployment-1c60b0e50996
https://statusinvest.com.br/acao/payoutresult?companyName=paoacucar&type=2
https://statusinvest.com.br/acao/getbsactivepassivechart?companyName=paoacucar&type=2
https://statusinvest.com.br/category/advancedsearchresult?search={"Sector":""}&CategoryType=1
https://statusinvest.com.br/category/tickerprice?ticker=ABEV3&type=0
https://statusinvest.com.br/home/mainsearchquery?q=abev3
https://github.com/jasondavindev/greenblatt-crawler
https://bootstrap-flask.readthedocs.io/en/stable/migrate.html
https://getbootstrap.com/docs/4.0/components/list-group/
https://getbootstrap.com/docs/5.0/content/tables/
https://code.visualstudio.com/docs/python/tutorial-flask
https://www.fullstackpython.com/flask.html
https://flask.palletsprojects.com/en/1.1.x/tutorial/layout/
https://github.com/marketplace/actions/deploy-to-heroku#deploy-with-docker
https://realpython.com/offline-python-deployments-with-docker/
https://semaphoreci.com/community/tutorials/dockerizing-a-python-django-web-application
https://realpython.com/flask-by-example-part-1-project-setup/#project-setup https://cirolini.medium.com/docker-flask-e-uwsgi-d10e58c56489
https://www.programiz.com/python-programming/json
find = self.driver.find_element_by_xpath(
'//[@data-tooltip="Clique para fazer a busca com base nos valores informados"]')
find.click()
time.sleep(1)
Necessaria a instalação manual do Modulo twisted no windows para o Scrapy funcionar
https://www.lfd.uci.edu/~gohlke/pythonlibs/#twisted
https://shinesolutions.com/2018/09/13/running-a-web-crawler-in-a-docker-container/
https://testdriven.io/blog/dockerizing-flask-with-postgres-gunicorn-and-nginx/
https://code.visualstudio.com/docs/containers/quickstart-python