Yahoo Data Download
Yahoo Data Download
Yahoo Data Download
1/6 www.gumm-stuff.org/Yahoo-data.htm
Downloading Yahoo data
thanks to M.Kishinevsky and M. Higgs
Here's a neat way to download stock data Irom Yahoo, perhaps into a spreadsheet (so you can play with the data):
http://finance.yahoo.com/d/quotes.csv?s a BUNCH of STOCK SYMBOLS separated b "+" &fa bunch of special tags
for eample: http://finance.ahoo.com/d/quotes.csv?s=XOM+BBDb.TO+JNJ+MSFT&f=snd1l1r
where some special tags are (thanks to Mike):
a Ak 2 Aeage Dail Volme 5 Ak Sie
Bid 2 Ak (Real-ime) 3 Bid (Real-ime)
4 Book Vale 6 Bid Sie Change & Pecen Change
1 Change 3 Commiion 6 Change (Real-ime)
8 Afe Ho Change (Real-ime) Diidend/Shae 1 La Tade Dae
2 Tade Dae Eaning/Shae 1 Eo Indicaion (ened fo mbol changed / inalid)
7 EPS Eimae Cen Yea 8 EPS Eimae Ne Yea 9 EPS Eimae Ne Qae
6 Floa Shae Da' Lo Da' High
52-eek Lo 52-eek High 1 Holding Gain Pecen
3 Annalied Gain 4 Holding Gain 5 Holding Gain Pecen (Real-ime)
6 Holding Gain (Real-ime) Moe Info 5 Ode Book (Real-ime)
1 Make Capialiaion 3 Make Cap (Real-ime) 4 EBITDA
5 Change Fom 52-eek Lo 6 Pecen Change Fom 52-eek Lo 1 La Tade (Real-ime) Wih Time
2 Change Pecen (Real-ime) 3 La Tade Sie 4 Change Fom 52-eek High
5 Peceb Change Fom 52-eek High La Tade (Wih Time) 1 La Tade (Pice Onl)
2 High Limi 3 Lo Limi Da' Range
2 Da' Range (Real-ime) 3 50-da Moing Aeage 4 200-da Moing Aeage
5 Change Fom 200-da Moing Aeage 6 Pecen Change Fom 200-da Moing Aeage 7 Change Fom 50-da Moing Aeage
8 Pecen Change Fom 50-da Moing Aeage Name 4 Noe
Open Peio Cloe 1 Pice Paid
2 Change in Pecen 5 Pice/Sale 6 Pice/Book
E-Diidend Dae P/E Raio 1 Diidend Pa Dae
2 P/E Raio (Real-ime) 5 PEG Raio 6 Pice/EPS Eimae Cen Yea
7 Pice/EPS Eimae Ne Yea Smbol 1 Shae Oned
7 Sho Raio 1 La Tade Time 6 Tade Link
7 Ticke Tend 8 1 Tage Pice Volme
1 Holding Vale 7 Holding Vale (Real-ime) 52-eek Range
1 Da' Vale Change 4 Da' Vale Change (Real-ime) Sock Echange
Diidend Yield
For example, iI y'all copy and paste this URL into your browser address:
://..//.?=BBDB.TO+NT.TO+GE+MSFT&=111
you'll get something which looks like:
and
://..//.?=GE&=1954
gives this:
"GENERAL ELEC CO",32.98,"Jn 26","21.30 - 32.98","NYSE",2.66,"Jl 25",28.55,"Jl 3","-0.21%"
whereas, to get the data already in a spreadsheet (so you can play it), you can use (Ior example):
http://Iinance.yahoo.com/d/quotes.csv?sXOMEKJNJMSFT&Isnd1t1l1ohgvwdyr
3/9/12 Yahoo data download
2/6 www.gumm-stuff.org/Yahoo-data.htm
Here's a spreadsheet that'll download the Yahoo data according to the tags that you speciIy:
You just Iollow steps , , then (click the button).
~And all that inIo gets ...?
Gets downloaded into the spreadsheet. You just have to identiIy the Yahoo Symbols, stick in the Yahoo Tags that deIine the inIo you want,
what you're getting), then click the Download Data button. You will also want to reIormat the columns so that prices don't display as dates
To download the spreadsheet, click on the picture above.
See also PortIolio spreadsheet.
Note:
Data is downloaded in .csv format ... that's comma-separated-values.
Some stock names include commas.
The data associated with such a stock won't look good ... things gets shiIted to the right. ^#$!&?
Solution? (as suggested by Azamul K.)
Put the name LAST ... in the right-most column.
II you'd like to play with the 500 S&P stocks, you can use the spreadsheet described here. It also uses some oI these tags.
Yahoo URL Changes
It's now Feb, 2004 and Yahoo has changed the pertinent URL
Irom
http://finance.yahoo.com/d/quotes.csv?s
to
http://quote.yahoo.com/d/quotes.csv?s
A
A
R
GH!
It's now Mar, 2007 and Yahoo has changed the pertinent URL again ... to
3/9/12 Yahoo data download
3/6 www.gumm-stuff.org/Yahoo-data.htm
It's now Mar, 2007 and Yahoo has changed the pertinent URL again ... to
http://finance.yahoo.com/d/quotes.csv?s
A
A
R
GH!
To make the change you can try this:
1. Right-click on the Download button that calls the macro
2. Choose Assign macro then Edit
3. Look Ior a statement containing the phrase: qurl = "http://quote.ahoo.com/d/quotes.csv?s="
4. Change it to read: qurl = "http://finance.ahoo.com/d/quotes.csv?s="
5. Exit the macro, pray
``
... then try the modiIied spreadsheet.
``
That's the most important part oI the ritual.
Note: Any time Yahoo changes youcan try that ritual.
Downloading Yahoo Option stuff
AIter getting e-mail Irom R.K., I discover that Yahoo has option data, too
So, there's a spreadsheet that looks like this:
Click on the picture to download
Of course, ya gotta know the Yahoo option symbols !!
Downloading a BUNCH!
Since Yahoo has a limit on the number oI stock symbols you can use, there's another spreadsheet (Yahoo2.xls) here that gets around that limitation.
It puts up to 200 stock symbols on each oI several sheets and you download to each sheet in turn.
There's another spreadsheet (Yahoo3.xls) here that downloads data Ior up to 1000 symbols and 10 tags to a single sheet.
Sorting stuff
motivated by e-mail Irom Scott S.
Note:
The spreadsheets (above & below) will download data Irom all the stock symbols until it reaches a blank
Indeed, iI the macro that collects data reaches a blank, it gets quite upset.
Moral?
Don't leave a blank!!
II you wish to delete a symbol somewhere within the list, just type zzz beIore downloadng.
Then the spreadsheet will be quite happy. (Who knows? There may be a stock with that symbol, eh?)
Anyway, having downloaded a bunch oI stuII associated with a gaggle oI stocks, this spreadsheet will sort them: (Click on the picture to download.)
3/9/12 Yahoo data download
4/6 www.gumm-stuff.org/Yahoo-data.htm
You can ask Ior a Iew stock thingies ` (like P/E or PEG ratios, etc. but just those things that are on the Yahoo tag list !!) ``
... then click a button to Download then move a SORT slider to select which to sort on. (In the example, it's the P/E Ratio.)
` They're in cell C2, namely: n and l1 and r and r5 and d and p6 and m8 and m6 and j6 and s7
`` II'n Yahoo ain't got the data, then you won't get it either, eh?
Here's the DOW sorted according to PEG Ratios ... as oI April, 2008
Note that Yahoo ain't got a PEG Ior GM.
I Iorgot to mention that, aIter downloadng, the spreadsheet automatically sorts the list according to the stock symbol.
II you entered a symbol zzz, it'll appear at the bottom oI the sorted list.
3/9/12 Yahoo data download
5/6 www.gumm-stuff.org/Yahoo-data.htm
Historical stuff
motivated by e-mail Irom Richard C..
All oI the above spreadsheets download a single set oI data Ior each stock ... and that's the most recent data!
II you'd like to build a historical data base yourselI (by downloading periodically and saving the downloaded data), you can use this guy:
You download as you'd normally do ... perhaps to check the latest numbers ... THEN, click the Save Data button to save that latest data.
Each stock must have it's own sheet, like so (assuming you'll want to save data to that sheet):
(That's where the data gets saved.)
OI course, each sheet must be created ... but there's an Explain sheet that says:
3/9/12 Yahoo data download
6/6 www.gumm-stuff.org/Yahoo-data.htm
In other words, you may decide which stocks get their data saved, which don't and which added sheets get deleted.