https://github.com/danielfsousa/magic-formula-b3
A CLI to scrape and calculate Joel Greenblatt's magic formula from Brazil's stock market (B3)
https://github.com/danielfsousa/magic-formula-b3
Last synced: about 2 months ago
JSON representation
A CLI to scrape and calculate Joel Greenblatt's magic formula from Brazil's stock market (B3)
- Host: GitHub
- URL: https://github.com/danielfsousa/magic-formula-b3
- Owner: danielfsousa
- License: mit
- Created: 2022-03-19T16:26:01.000Z (over 4 years ago)
- Default Branch: main
- Last Pushed: 2022-03-26T20:26:08.000Z (over 4 years ago)
- Last Synced: 2025-02-21T22:30:28.997Z (over 1 year ago)
- Language: Python
- Size: 17.6 KB
- Stars: 1
- Watchers: 3
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# magic-formula-b3
A CLI to scrape and calculate Joel Greenblatt's magic formula from Brazil's stock market (B3)
## Dependencies
- Python 3.10
- [PDM](https://pdm.fming.dev)
## Getting Started
1. Install dependencies
```bash
$ pdm install
```
2. See all the available options
```bash
$ pdm run cli --help
```
3. Scrape, calculate magic formula and write results
```bash
$ pdm run cli
```
4. A csv file named with the current date will be created on `data` folder.
5. Print top stocks
```bash
$ head data/2022-03-26_status_invest.csv | column -t -s,
ticker ev_ebit roic ev_ebit_rank roic_rank magic_formula
AZEV4 1.13 2.596 4 1 5
BRKM3 2.25 0.534 11 3 14
G2DI33 0.86 0.363 1 13 14
BRKM5 2.25 0.534 12 4 16
FHER3 2.58 0.724 15 2 17
BRAP3 1.89 0.365 9 11 20
SYNE3 1.21 0.352 5 15 20
BRAP4 1.89 0.365 10 12 22
ETER3 2.49 0.446 14 9 23
```