{"id":16383622,"url":"https://github.com/danielfsousa/magic-formula-b3","last_synced_at":"2026-06-14T23:33:29.722Z","repository":{"id":98935538,"uuid":"471750231","full_name":"danielfsousa/magic-formula-b3","owner":"danielfsousa","description":"A CLI to scrape and calculate Joel Greenblatt's magic formula from Brazil's stock market (B3)","archived":false,"fork":false,"pushed_at":"2022-03-26T20:26:08.000Z","size":18,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":3,"default_branch":"main","last_synced_at":"2025-02-21T22:30:28.997Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/danielfsousa.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2022-03-19T16:26:01.000Z","updated_at":"2024-01-10T03:43:37.000Z","dependencies_parsed_at":null,"dependency_job_id":"d6c59650-f9b0-4a9a-82ae-f480238984ca","html_url":"https://github.com/danielfsousa/magic-formula-b3","commit_stats":{"total_commits":4,"total_committers":1,"mean_commits":4.0,"dds":0.0,"last_synced_commit":"08babeed2cd91e21294808083c9980e20843e48a"},"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/danielfsousa/magic-formula-b3","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/danielfsousa%2Fmagic-formula-b3","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/danielfsousa%2Fmagic-formula-b3/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/danielfsousa%2Fmagic-formula-b3/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/danielfsousa%2Fmagic-formula-b3/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/danielfsousa","download_url":"https://codeload.github.com/danielfsousa/magic-formula-b3/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/danielfsousa%2Fmagic-formula-b3/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":34342089,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-05-26T15:22:16.424Z","status":"online","status_checked_at":"2026-06-14T02:00:07.365Z","response_time":62,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2024-10-11T04:09:15.545Z","updated_at":"2026-06-14T23:33:29.698Z","avatar_url":"https://github.com/danielfsousa.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"# magic-formula-b3\n\nA CLI to scrape and calculate Joel Greenblatt's magic formula from Brazil's stock market (B3)\n\n## Dependencies\n\n- Python 3.10\n- [PDM](https://pdm.fming.dev)\n\n## Getting Started\n\n1. Install dependencies\n\n```bash\n$ pdm install\n```\n\n2. See all the available options\n\n```bash\n$ pdm run cli --help\n```\n\n3. Scrape, calculate magic formula and write results\n\n```bash\n$ pdm run cli\n```\n\n4. A csv file named with the current date will be created on `data` folder.\n\n5. Print top stocks\n\n```bash\n$ head data/2022-03-26_status_invest.csv | column -t -s,\n\nticker  ev_ebit  roic   ev_ebit_rank  roic_rank  magic_formula\nAZEV4   1.13     2.596  4             1          5\nBRKM3   2.25     0.534  11            3          14\nG2DI33  0.86     0.363  1             13         14\nBRKM5   2.25     0.534  12            4          16\nFHER3   2.58     0.724  15            2          17\nBRAP3   1.89     0.365  9             11         20\nSYNE3   1.21     0.352  5             15         20\nBRAP4   1.89     0.365  10            12         22\nETER3   2.49     0.446  14            9          23\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdanielfsousa%2Fmagic-formula-b3","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fdanielfsousa%2Fmagic-formula-b3","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdanielfsousa%2Fmagic-formula-b3/lists"}