ranaroussi/yfinance
65.2
Adequate · 18 September 2026
24.2k
lines of production code
Python
primary language
1
measurement over time
What this system is
yfinance is a Python library for retrieving and analyzing financial market data from Yahoo Finance, featuring a modular architecture for handling price history, fundamentals, and market status. It provides tools for filtering stocks and funds via a structured Screener API, accessing sector and industry data, and streaming live quotes. The system emphasizes data integrity through robust price repair algorithms and supports modern networking requirements with configurable proxies and asynchronous capabilities.
How it got here
2017–2019 — Rebranding and architectural modernization
4 changes.
The project underwent a comprehensive rebranding from fix-yahoo-finance to yfinance, accompanied by a license migration and the removal of deprecated Selenium-based scraping modules. This period focused on modernizing the codebase through a modular architecture, migrating to pyproject.toml, and upgrading dependencies like curl\_cffi and peewee to support new features such as a configuration system and a stock screener API.
2021–2024 — Modular architecture and comprehensive testing
9 changes.
The project underwent a major architectural refactoring, replacing monolithic modules with dedicated, lazy-loaded scrapers to improve data retrieval efficiency and reliability. This structural overhaul was accompanied by the introduction of a comprehensive test suite to ensure data integrity across authentication, price repair, and concurrent operations. Additionally, new domain objects and a screener API were added to standardize access to market data, supported by the establishment of formal Sphinx documentation.
Features
Added Sphinx documentation build infrastructure
The project now includes the necessary build scripts (Makefile and make.bat) to generate documentation using Sphinx. This enables users and contributors to build the documentation locally by running 'make html' (or 'make.bat html' on Windows), provided Sphinx is installed, facilitating the automated deployment and maintenance of project docs.
doc · high confidence
Initial Sphinx-based documentation structure
The project now includes a new Sphinx documentation configuration and index page, replacing the previous documentation setup. This change introduces a structured documentation source using reStructuredText, configured with the PyData Sphinx theme, autodoc extensions for API reference generation, and static assets like logos. Users can now access a formally built documentation site that includes installation instructions, quick-start examples, and links to advanced and reference sections.
doc/source · high confidence
New Screener API for filtering stocks, funds, and ETFs
Introduces a new \yfinance.screener\ module that allows users to filter financial instruments using a structured query language. The module exposes \EquityQuery\, \FundQuery\, and \ETFQuery\ classes for building custom filters (e.g., by sector, market cap, or performance metrics) and a \screen()\ function to execute them. It also includes a set of predefined screener queries (such as 'day\_gainers' and 'undervalued\_growth\_stocks') for quick access to popular Yahoo Finance lists.
yfinance/screener · high confidence
New documentation examples for expanded API capabilities
The documentation now includes reference examples for several new and existing features, demonstrating how to use the Auth class for login and subscription tier checks, the Calendars module for earnings and IPO data, the Lookup module for searching securities, and the Search module for quotes and news. It also covers Market status and summary, Sector and Industry data, Funds data, and WebSocket support for both synchronous and asynchronous live data streaming. Additional examples illustrate proxy usage and bulk ticker operations.
doc/source/reference/examples · high confidence
New domain objects for Market, Sector, and Industry data
Users can now access structured financial data through new domain classes: \Market\ provides regional market status and summary data with validation for supported regions (US, GB, ASIA, EUROPE, etc.); \Sector\ allows retrieval of top ETFs, top mutual funds, and a list of industries within a specific sector, scoped by region; \Industry\ provides details on top performing and top growth companies within an industry, including their sector affiliation. These objects standardize access to Yahoo Finance's sector/industry/market endpoints, replacing ad-hoc queries with typed, lazy-loaded properties.
yfinance/domain · high confidence
yfinance v1.8.0: New modular architecture, config system, and screener
This release introduces a major architectural overhaul of the yfinance library. The codebase has been reorganized into a modular structure with dedicated files for HTTP backends (\_http.py), caching (cache.py), configuration (config.py), and data handling (data.py). A new configuration system (YfConfig) is exposed via yf.config, allowing users to set network proxy, retries, debug, and locale settings. The library now supports a new Screener API (EquityQuery, FundQuery, ETFQuery, screen) for filtering stocks. Additionally, the timezone cache has been migrated from CSV to a thread-safe SQLite database using the peewee ORM, and the HTTP backend now prefers curl\_cffi for browser-like TLS impersonation with a graceful fallback to requests.
yfinance · high confidence
Removals
Removal of deprecated Selenium-based Yahoo Finance data fetching module
The \fix\_yahoo\_finance\ package, which previously provided a \get\_data\_yahoo\ function to override pandas-datareader, has been completely removed. This module relied on Selenium and a headless Chrome browser to scrape Yahoo Finance, a method that is no longer supported or maintained. Users relying on this specific override for historical data retrieval will need to migrate to alternative data sources or updated libraries, as the functionality is no longer present in the codebase.
_fix\_yahoo\finance · high confidence
Architecture
Major refactoring of data retrieval into modular scrapers
The \yfinance/scrapers\ package has been restructured to replace the previous monolithic \quote.py\ and \fundamentals.py\ modules with a set of dedicated, lazy-loaded classes: \Analysis\ (for earnings estimates, price targets, and growth trends), \Fundamentals\ (for income, balance sheet, and cash-flow time series), \FundsData\ (for ETF and mutual fund holdings and profiles), \History\ (for price history and dividend/split repair), \Holders\ (for institutional and insider ownership), and \FastInfo\ (for quick access to key quote metrics). This change moves data fetching from HTML scraping to the Yahoo Finance API where possible, introduces chunked requests for financials to handle proxy limitations, and deprecates the legacy \Ticker.earnings\ property in favor of \Ticker.income\_stmt\.
yfinance/scrapers · high confidence
Behavioural changes
Custom styling for documentation navigation
A new CSS file (yfinance.css) has been added to the documentation static assets to hide the "Section Navigation" title in the sidebar, providing a cleaner look for the documentation interface.
_doc/source/\static · high confidence
Project rebranding from fix-yahoo-finance to yfinance and license migration
The library has been renamed from fix-yahoo-finance to yfinance, accompanied by a migration of the license from the GNU Lesser General Public License v3 (LGPL) to the Apache License 2.0. This change includes the removal of the legacy setup.py and README.rst files, the addition of a new README.md, and the introduction of a Code of Conduct and Contributing guidelines to support the rebranded open-source project.
(repo-wide) · high confidence
Test coverage
Added test fixtures for bad dividend repair; Comprehensive test suite for authentication, data handling, and price repair.
Dependencies
Migrate packaging to pyproject.toml and update dependencies
The project has migrated its build configuration from a legacy requirements.txt to a modern pyproject.toml file, aligning with current Python packaging standards. This change introduces several dependency updates: curl\_cffi is now required (version \>=0.15) to replace older HTTP handling, requests is bumped to \>=2.31, and pandas is raised to \>=1.3.0. Additionally, the deprecated appdirs package has been replaced with platformdirs, and peewee is added for thread-safe database operations. The old requirements.txt, which included selenium and pyvirtualdisplay, has been removed.
(dependencies) · high confidence
Written by watchdog.canine.dev from the codebase's own history, inside the signed delivery this page is composed from.
How this codebase got here
Baseline
- First survey — no prior run to compare against. CAI 65.
Lenses
- Code Health 77
- Architecture 97
- Maturity 53
- Readiness 72
- Security 72
- Domain Modelling 100
Changes since last survey
- 300 commits — 195 feature/other, 105 fixes
By area
- (repo) — 110 commits
- (root) — 89 commits
- yfinance/scrapers — 23 commits
- doc/source — 10 commits
- tests/test_ticker.py — 9 commits
- tests/test_price_repair.py — 8 commits
- .github/workflows — 7 commits
- tests/data — 7 commits
- yfinance/const.py — 6 commits
- tests/test_prices.py — 4 commits
- tests/test_utils.py — 3 commits
- yfinance/domain — 3 commits
- tests/test_auth.py — 2 commits
- tests/test_chart_none_guard.py — 2 commits
- tests/test_data.py — 2 commits
- yfinance/calendars.py — 2 commits
- yfinance/multi.py — 2 commits
- yfinance/screener — 2 commits
- .github/dependabot.yml — 1 commit
- tests/context.py — 1 commit
Notable commits
- fix: Another fix for PR #2843
- fix: Docs for capital-gains repair; Fix warnings in price-repair
- fix: Fix 'Ticker.dividends' type to be Series
- fix: Fix 'Ticker.dividends' type to be Series - fixes for tests
- fix: Fix 404 Developer Guide link in CONTRIBUTING.md
- fix: Fix AttributeError in Lookup error handling
- fix: Fix Market API docs reference link
- fix: Fix NoneType crash when data['chart'] is None (issue #2670)
- fix: Fix PD not parsing Adj Close to float
- fix: Fix Python 3.9 compatibility regression in calendars.py
- fix: Fix Saudi Arabia MIC Code
- fix: Fix TypeError comparing Timedelta to relativedelta for multi-day intervals
- fix: Fix _fetch_info handling of None responses
- fix: Fix broken LICENSE.txt link in PyPI documentation
- fix: Fix broken contributing link in PyPI documentation
- fix: Fix bug in #2695
- fix: Fix bug in volume-validation of stock-split-repair, that was wrongly blocking some repairs
- fix: Fix deprecation for PR ##2860
- fix: Fix dividends error on unlisted tickers
- fix: Fix error messages showing internal 15m interval for 30m requests
- …and 280 more
Written by watchdog.canine.dev from the codebase's own history, inside the signed delivery this page is composed from.
Survey your own repository
ranaroussi/yfinance was measured the same way every project in this corpus was: the same rubric, at a pinned commit, with the result published in full. Point a surveyor at a repository you know and see whether you agree with it.
About this page
- The score is its most recent published measurement, taken on 18 September 2026 at a pinned commit. It is not a live figure and does not change until the project is measured again.
- Measured at commit 3d9d2f0cacb662bff689874cd6113bae3a30a885 — the exact code this score is about.
- Scored under rubric-2026.09.15 — the same rubric and the same method as every other entry in this index.
- Measured by watchdog.canine.dev using codehealth-analyzer preprod-5d04157a340d.