{"id":28208800,"url":"https://github.com/geodoo/stock-screener","last_synced_at":"2025-10-11T05:08:15.630Z","repository":{"id":288073232,"uuid":"964655953","full_name":"GeoDoo/stock-screener","owner":"GeoDoo","description":null,"archived":false,"fork":false,"pushed_at":"2025-04-16T08:42:53.000Z","size":12,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-08-07T15:49:35.600Z","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":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/GeoDoo.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"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,"zenodo":null}},"created_at":"2025-04-11T15:08:40.000Z","updated_at":"2025-04-16T08:42:57.000Z","dependencies_parsed_at":"2025-04-15T12:43:01.257Z","dependency_job_id":"b714da34-b030-41ec-ab91-a3953b8265ff","html_url":"https://github.com/GeoDoo/stock-screener","commit_stats":null,"previous_names":["geodoo/stock-screener"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/GeoDoo/stock-screener","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/GeoDoo%2Fstock-screener","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/GeoDoo%2Fstock-screener/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/GeoDoo%2Fstock-screener/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/GeoDoo%2Fstock-screener/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/GeoDoo","download_url":"https://codeload.github.com/GeoDoo/stock-screener/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/GeoDoo%2Fstock-screener/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":279006339,"owners_count":26084083,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","status":"online","status_checked_at":"2025-10-11T02:00:06.511Z","response_time":55,"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":"2025-05-17T15:12:46.340Z","updated_at":"2025-10-11T05:08:15.623Z","avatar_url":"https://github.com/GeoDoo.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Magic Formula Stock Screener\n\nThis project implements Joel Greenblatt's Magic Formula investing strategy using SimFin data. The screener ranks stocks based on a combination of:\n- Return on Capital (ROC)\n- Earnings Yield (EY)\n\n## Implementation Notes\n\nThis is a simplified implementation of the Magic Formula strategy. For the most accurate results, consider using the official Magic Formula website which uses Compustat Point-in-Time (PIT) data.\n\n### Key Differences from Official Implementation\n\n1. Data Source:\n   - This implementation: Uses SimFin data (current/restated values)\n   - Official website: Uses Compustat PIT data (historical point-in-time values)\n\n2. Data Quality:\n   - This implementation: Uses current financial statements\n   - Official website: Uses historical data as it was reported\n   - Impact: May include look-ahead bias in backtesting\n\n3. Data Freshness:\n   - This implementation: Uses latest available quarterly/annual data\n   - Official website: Uses PIT data with proper historical context\n\n## Requirements\n\n- Python 3.7+\n- SimFin data files in `simfin_data` directory:\n  - `us-companies.csv`\n  - `us-income-annual.csv`\n  - `us-balance-annual.csv`\n  - `us-shareprices-daily.csv`\n- Required Python packages (see requirements.txt)\n\n## Setup\n\n1. Create and activate a virtual environment:\n```bash\npython -m venv venv\nsource venv/bin/activate  # On Windows: venv\\Scripts\\activate\n```\n\n2. Install dependencies:\n```bash\npip install -r requirements.txt\n```\n\n3. Place SimFin data files in the `simfin_data` directory\n\n## Usage\n\nRun the screener:\n```bash\npython magic_formula.py\n```\n\nThe script will:\n1. Load financial data from local SimFin CSV files\n2. Calculate ROC and Earnings Yield for each stock\n3. Apply filters:\n   - Market cap \u003e $50M\n   - Positive EBIT\n   - Positive Invested Capital\n   - Positive Enterprise Value\n   - Data within last 2 years\n4. Rank stocks based on combined metrics\n5. Output top 50 stocks to console and CSV file\n\n## Data Sources\n\nThis implementation uses SimFin data files for:\n- Company information\n- Annual financial statements\n- Daily share prices\n\nFor more accurate results, consider:\n1. Using Compustat PIT data (requires academic/professional access)\n2. Implementing SEC EDGAR data parsing\n3. Using multiple data sources for validation\n\n## Limitations\n\n1. No Point-in-Time Data:\n   - Uses current/restated values\n   - May include look-ahead bias\n   - Less accurate for historical analysis\n\n2. Data Freshness:\n   - Depends on SimFin data updates\n   - May lag behind market data\n   - Uses annual data instead of quarterly\n\n3. Filtering:\n   - Basic implementation of Greenblatt's criteria\n   - May miss some edge cases\n   - Limited to available data fields\n\n## Future Improvements\n\n1. Data Sources:\n   - Implement SEC EDGAR data parsing\n   - Add multiple data source validation\n   - Track data revisions\n\n2. Calculations:\n   - Add more sophisticated filtering\n   - Implement industry-specific adjustments\n   - Add risk metrics\n\n3. Output:\n   - Add more detailed analysis\n   - Include historical performance\n   - Add visualization tools\n\n## ⚠️ WARNING\n\n**This app is not using Compustat PIT data. Use at your own risk!**\n\nThe results may differ significantly from the official Magic Formula website due to:\n- Lack of point-in-time data\n- Potential look-ahead bias\n- Different data sources and calculations\n- Missing historical revisions and restatements\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fgeodoo%2Fstock-screener","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fgeodoo%2Fstock-screener","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fgeodoo%2Fstock-screener/lists"}