Skip to content

A CLI to scrape and calculate Joel Greenblatt's magic formula from Brazil's stock market (B3)

License

Notifications You must be signed in to change notification settings

danielfsousa/magic-formula-b3

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

4 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

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

Getting Started

  1. Install dependencies
$ pdm install
  1. See all the available options
$ pdm run cli --help
  1. Scrape, calculate magic formula and write results
$ pdm run cli
  1. A csv file named with the current date will be created on data folder.

  2. Print top stocks

$ 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

About

A CLI to scrape and calculate Joel Greenblatt's magic formula from Brazil's stock market (B3)

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages