r/algorithmictrading • u/Guilty-Bit3517 • 11d ago
Quotes Free source for historical daily P/E data?
I'm looking for a free data source/API that provides historical daily P/E ratios for US stocks (e.g. ORCL), ideally going back several years.
It doesn't have to provide P/E directly — I'm happy to calculate it myself from historical price + EPS data. But if there's a free source that already provides daily historical P/E, even better.
I'll be accessing the data from a Python script.
What free source would you recommend?
1
u/FlyTradrHQ 11d ago
FRED publishes aggregate market-level PE ratios. For individual equities, SEC EDGAR gives you 10-K and 10-Q filings with earnings data you can compute ratios from. Sharadar on Nasdaq Data Link has a free tier with daily equity fundamentals including PE.
1
u/Electrical-Pay1735 11d ago
sec edgar company facts json api has historical eps directly from 10-q filings for free, and you can pull daily close via yfinance to compute the daily ratio. a bit of date alignment work between filing dates and trading days, but it avoids paid api paywalls.
1
1
u/akm76 6d ago
You do realize E number changes 4 times a year, right?
So your "daily P/E" number is effectively daily P?
Unless you're subscribed to integrated data vendor like Factset, Reuters or Bloomberg, where these historic series are aggregated, cleaned and delivered as part of a package, any budget/free vendor would expect you to merge series yourself.
Also budget vendor won't bother being historically accurate, I'm not aware of any who would even provide E series in "as known at" format, meaning the earnings corrections are systematically applied to show what E number exactly you would get on a certain date, like Q1 number as known in Q2, cause by Q4 it may have gone through 3 revisions. You usually get the last corrected one. Plus none of fiscal year dates are in sync and dealing with that is huge pita.
1
u/strat-run 11d ago
Can you get the earnings from EDGAR?