Fetch Yahoo's Key Statisitics Data?

mikestefff - February 14, 2008 - 14:57
Project:Stock API
Version:5.x-1.0
Component:Code
Category:feature request
Priority:normal
Assigned:Unassigned
Status:active
Description

I've been trying to find a way to fetch all of the data for each symbol's key statistics (the tons of ratios and percentages). Yahoo doesn't seem to offer a downloaded table of these. Do you know if there is a way to accomplish this? Know of any other sites that offer downloadable stats?

Thanks

#1

mikestefff - February 14, 2008 - 15:37

I was thinking that maybe theres a mobile website that provides advanced stock data like what i am looking for. Then maybe the numbers can be taken straight from the source?

#2

mikestefff - February 14, 2008 - 17:46

this could work...i used google to mobilize that yahoo finance page..look below

http://www.google.com/gwt/n?u=http%3A%2F%2Ffinance.yahoo.com%2Fq%2Fks%3F...

is it possible to have the module download the source and pull each data point into a variable?

#3

kbahey - February 15, 2008 - 02:30

Any solution that relies on HTML scraping will be a maintenance nightmare.

If you find a source in a proper structured format (CSV, XML, ...etc.), then we can use it as an alternate to Yahoo.

Otherwise, I am not for the HTML scraping idea.

#4

mikestefff - February 15, 2008 - 15:41

yea i figured that...especially if the site had a thousand people trying to access the data in real-time theres no way the system would hold up...

damm..i guess ill keep searching for a site that provides the data like you said..

any other creative ideas??

thanks for the reply.

#5

mikestefff - February 15, 2008 - 16:28

if i was to find a csv source with all of the extra data, do you think it would be too much work for the module to access and parse the data upon request, like a regular stock quote search like yahoo finance? assuming the site was popular and had thousands of people searching simultaneously..

thanks again

#6

kbahey - February 15, 2008 - 16:57

On a busy site, this would be a no no.

It has to be cached, like we do with quotes.

#7

mikestefff - February 15, 2008 - 17:08

well with the data already being 15-20 minutes delayed from Yahoo, i just fear having a finance site with data delayed anymore than that would be pretty useful. i understand what you are saying though - it would be quite a load - especially with what i have in mind. so how exactly would the cache work? upon search, the module would search the db and if no data is available for the symbol(s) it fetches and stores it? how often would the db be cleared then? cleared via cron? perhaps when retrieving from the db if the data is a certain age it reloads it? i don't mind the ratios and other fundamentals being up to an hour old, i just worry about the quote being too delayed.

thank yet again

#8

mikestefff - February 15, 2008 - 17:15

hm or maybe only fetch the quote on demand but leave all of the other data cached for an hour or two perhaps...?

 
 

Drupal is a registered trademark of Dries Buytaert.