Can You Use yfinance Commercially? No — Here's the License Research
Is yfinance data free to use commercially? No — here's the primary-source license research, done before monetizing was ever on the table, plus the 50-KPI stock screener it protects.
I built my own quant stock screener — AI agents wrote most of the code, I made the architecture and review decisions — because every screener I tried either hid the numbers I wanted behind a subscription or computed them in ways I couldn’t audit. It works. I use it daily. I built it as a personal instrument from day one, because I suspected the data license would never allow selling it — but suspecting is not knowing, so before any monetization thought went further I spent an afternoon in the primary sources to pin down exactly what is and isn’t allowed. Both halves of this post are worth your time, but if you’re building on free financial data, the second half might save you months.
Can you legally use yfinance data commercially?
No. The yfinance code is Apache-2.0 — use it freely. The data it fetches is not
yours: the library’s own README says the Yahoo API is “intended for personal use only.”
I read the primary documents so you don’t have to — four of them: the yfinance README and license, Yahoo’s Developer API terms, Yahoo Finance’s help/terms page, and Yahoo’s general Terms of Service. The load-bearing findings:
- Yahoo’s API terms prohibit deriving income from the data — the wording catches subscriptions and ads (“whether for direct commercial or monetary gain or otherwise”).
- Yahoo Finance’s own terms page states, in bold: “You must not redistribute information displayed on or provided by Yahoo Finance.” A free public site is still redistribution — the prohibition isn’t about money.
- The part that ends the discussion: Yahoo doesn’t own most of the data, so it couldn’t license it to you even if it wanted to. The fundamentals, analyst estimates, and ownership data are sublicensed — meaning Yahoo resells data owned by Morningstar, S&P Global, and LSEG, each with their own written-consent requirements sitting upstream.
If you’re checking your own project, the test is three questions: Does the vendor’s license say personal/non-commercial use? Does it prohibit redistribution (money aside)? Is the underlying data sublicensed from a third party with its own terms? For yfinance the answers are yes, yes, and yes — and reading the same documents, I don’t see how any yfinance-based product escapes them. My screener stays a personal instrument; if it ever earns a euro, every byte of market data gets replaced with a commercially licensed feed first. I designed for that swap (the vendor sits behind a single adapter module), but designing for it and pretending it isn’t necessary are different things — plenty of tutorials quietly do the second.
For anything you actually put into production, this is the step you can’t skip:
yfinance is a fine way to prototype and a bad way to ship, and you replace it with a
provider whose license permits what you’re doing. I’ve since compared the main
commercial feeds on coverage, point-in-time history, redistribution rights, and cost,
so if you’re picking one, reach out — I’ll point you at what fits rather than what
advertises hardest.
What QuantScreen does: ~50 KPIs across the S&P 500
The tool itself, briefly — it’s the reason the licensing question mattered at all. ~503 tickers, ~50 metrics computed from raw stored inputs rather than scraped pre-computed:
- Valuation — price-to-earnings and its relatives (P/B, P/S, P/FCF, EV/EBITDA, PEG, Graham number): “what am I paying for a unit of this business?”
- Quality & health — returns on equity/assets/capital, margins, liquidity and debt ratios: “is this business any good, and can it pay its bills?”
- Ownership & positioning — insider and institutional ownership, short interest: “who holds this, and who’s betting against it?”
- Price & risk — momentum across horizons, moving-average distance, and risk-adjusted return measures like Sharpe and Sortino (return per unit of risk taken): “how has it moved, and how violently?”
Every metric is filterable, and each one carries a percentile rank computed two ways — against the whole universe and within the stock’s sector. “Cheap for a tech stock” and “cheap, period” are different facts; a screener should know that.
Three rules make me trust it more than tools I’ve paid for:
Missing data is null, never zero. A company with no earnings has no P/E — not a P/E of 0 — so it drops out of “P/E below 15” screens instead of ranking as the cheapest stock alive.
Point-in-time discipline. Every fundamental carries the date I observed it, and observations are never overwritten when vendors restate. Commercial point-in-time datasets exist (Compustat’s and Sharadar’s, for instance) — what an individual can’t realistically do is retroactively reconstruct this history after building on current-values data, because the pre-restatement numbers are gone by the time you go looking. So mine accumulates from day one.
Recompute from raw. When a formula improves, the entire history re-derives from stored inputs, offline. No re-scraping, no trust-me numbers.
The build itself went through spec reviews and adversarial agent review — the process caught, among other things, a moving-average bug that would have silently averaged the wrong number of bars forever. That workflow is its own write-up.
Verdict
- Worked: a screener whose every number I can audit and re-derive, and a point-in-time archive quietly compounding in the background.
- Cost: one vendor, end-of-day data, S&P 500 only — arguably the most efficiently-priced, heavily-analyzed universe there is, which limits how much edge screening it can yield. Widening to small caps means more and messier data; deliberately deferred.
- Blocked: the screener can never be sold in this form — the license research confirms it beyond argument. Selling it would mean replacing the entire data layer with a commercially licensed feed first (the adapter seam exists for exactly that). The research took one afternoon; I did it before building a business on the answer, and that ordering — licensing research at the top of the checklist, not the bottom — is the actual lesson worth taking from this post.
How the system is architected — one SQLite file between two languages — is covered in its own post.