Skip to main content

Magic Formula script for companies listed at Bovespa.

Project description

magicformulabr - Script que implementa a magic formula de Joel Greenblatt para empresas listadas na Bovespa.

build PyPI - Python Version codecov GitHub License Code style: black

Detalhes sobre a estratégia Magic Formula pode ser encontrado no livro "The Little Book That Still Beats the Market" escrito por Joel Greenblatt.

O script consulta os dados das empresas no site http://fundamentus.com.br

O magicformulabr foi feito apenas para estudo, não é recomendação de investimento.

Instalação

pip install magicformulabr

Uso

$ magicformulabr -h
usage: magicformulabr [-h] [-d] [-v] [-m {1,2,3}] [-t TOP]

Gera rank de acoes usando a magic formula

optional arguments:
  -h, --help            show this help message and exit
  -d, --debug           debug flag
  -v, --verbose         verbosity level
  -m {1,2,3}, --method {1,2,3}
                        Campos usados para o calculo da magic formula
  -t TOP, --top TOP     Numero de empresas para mostrar no rank

    Methods disponiveis:
        1 - P/L e ROE
        2 - EV/EBIT e ROIC
        3 - EV/EBITDA e ROIC

    Exemplos de uso:
        magicformulabr -h
        magicformulabr -m 1
        magicformulabr -v
        magicformulabr -vv
        magicformulabr -m 3 -vv


$ magicformulabr -t 10 -v
    Papel  Cotação    P/L Div.Yield  EV/EBIT  EV/EBITDA   ROIC      ROE  Rank_earnings_yield  Rank_return_on_capital  Rank_Final
1   PSSA3    47.71   9.14     4,49%     0.33       0.33  56.48   18,83%                  1.0                     3.0         4.0
2   WIZS3     6.61   4.95    10,12%     1.92       1.71  80.94   60,60%                  4.0                     2.0         6.0
3   MRFG3    14.82   4.89     0,00%     3.64       3.11  29.77  223,61%                  5.0                     8.0        13.0
4   MNPR3     6.84  -3.39     0,00%     0.95       0.85  22.68    3,89%                  2.0                    18.0        20.0
5   BEEF3     9.63   6.40     3,11%     5.53       4.74  21.10   67,81%                 13.0                    21.0        34.0
6   GEPA4    38.49  15.04     4,90%     6.35       4.59  27.52   13,64%                 26.0                     9.0        35.0
7   GEPA3    39.00  15.24     4,84%     6.43       4.65  27.52   13,64%                 28.0                     9.0        37.0
8   BOBR4     2.24  15.17     0,00%     6.50       5.52  24.58  -15,94%                 30.0                    14.0        44.0
9   ATOM3     4.16   7.17     0,00%     7.46       7.43  84.60   73,56%                 47.0                     1.0        48.0
10  EQTL3    22.99   8.05     1,39%     6.14       5.47  16.32   29,69%                 18.0                    36.0        54.0

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

magicformulabr-0.1.0.tar.gz (5.8 kB view details)

Uploaded Source

Built Distribution

magicformulabr-0.1.0-py3-none-any.whl (6.9 kB view details)

Uploaded Python 3

File details

Details for the file magicformulabr-0.1.0.tar.gz.

File metadata

  • Download URL: magicformulabr-0.1.0.tar.gz
  • Upload date:
  • Size: 5.8 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.3.0 pkginfo/1.7.0 requests/2.25.1 setuptools/49.2.1 requests-toolbelt/0.9.1 tqdm/4.57.0 CPython/3.9.1

File hashes

Hashes for magicformulabr-0.1.0.tar.gz
Algorithm Hash digest
SHA256 857dffd54da0e0bda72e3d4eda1d2b49227ece2c262bdff49427a8c10dd54afa
MD5 5da417042706b760c0189e9d9bd57be1
BLAKE2b-256 db18427120d24c4c8592adc90dd59dbf81dcc28ddd4240a9a2b13659c681d5af

See more details on using hashes here.

File details

Details for the file magicformulabr-0.1.0-py3-none-any.whl.

File metadata

  • Download URL: magicformulabr-0.1.0-py3-none-any.whl
  • Upload date:
  • Size: 6.9 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.3.0 pkginfo/1.7.0 requests/2.25.1 setuptools/49.2.1 requests-toolbelt/0.9.1 tqdm/4.57.0 CPython/3.9.1

File hashes

Hashes for magicformulabr-0.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 782615fb3f1884a35fc4f50b29682b6eb64f11dc5d9ddb8a788bb540d2d970d5
MD5 f7a0fda7592de5f5120cf232e0420a2b
BLAKE2b-256 ef4c8f3f239250bf11cb45f0a0352486c5ce8a2f1a9674459ad0e964f6e402c9

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page