Chinaunix首页 | 论坛 | 博客
  • 博客访问: 772724
  • 博文数量: 217
  • 博客积分: 2401
  • 博客等级: 大尉
  • 技术积分: 2030
  • 用 户 组: 普通用户
  • 注册时间: 2008-03-16 06:58
个人简介

怎么介绍?

文章分类

全部博文(217)

文章存档

2023年(2)

2022年(3)

2021年(29)

2020年(12)

2019年(5)

2018年(5)

2017年(5)

2016年(3)

2015年(6)

2014年(12)

2013年(16)

2012年(9)

2011年(6)

2010年(15)

2009年(30)

2008年(59)

我的朋友

分类:

2010-05-11 00:18:58

Downloading Stock Quote and Historical Data from Yahoo

1. Stock Quote
Here is a convenient way to download Yahoo stock data into CSV format.

Below is the base URL:
[stock-symbols]&f=[special-tags]

Parameters
[stock-symbols]: stock symbols separated by “+”
[special-tags]: tag codes to determine resulting columns

Special Tags

a Ask l Last Trade (With Time)
a2 Average Daily Volume l1 Last Trade (Price Only)
a5 Ask Size l2 High Limit
b Bid l3 Low Limit
b2 Ask (Real-time) m Day’s Range
b3 Bid (Real-time) m2 Day’s Range (Real-time)
b4 Book Value m3 50-day Moving Average
b6 Bid Size m4 200-day Moving Average
c Change & Percent Change m5 Change From 200-day Moving Average
c1 Change m6 Percent Change From 200-day Moving Average
c3 Commission m7 Change From 50-day Moving Average
c6 Change (Real-time) m8 Percent Change From 50-day Moving Average
c8 After Hours Change (Real-time) n Name
d Dividend/Share n4 Notes
d1 Last Trade Date o Open
d2 Trade Date p Previous Close
e Earnings/Share p1 Price Paid
e1 Error Indication (returned for symbol changed / invalid) p2 Change in Percent
e7 EPS Estimate Current Year p5 Price/Sales
e8 EPS Estimate Next Year p6 Price/Book
e9 EPS Estimate Next Quarter q Ex-Dividend Date
f6 Float Shares r P/E Ratio

g Day’s Low r1 Dividend Pay Date
h Day’s High r2 P/E Ratio (Real-time)
j 52-week Low r5 PEG Ratio
k 52-week High r6 Price/EPS Estimate Current Year
g1 Holdings Gain Percent r7 Price/EPS Estimate Next Year
g3 Annualized Gain s Symbol
g4 Holdings Gain s1 Shares Owned
g5 Holdings Gain Percent (Real-time) s7 Short Ratio
g6 Holdings Gain (Real-time) t1 Last Trade Time
i More Info t6 Trade Links
i5 Order Book (Real-time) t7 Ticker Trend
j1 Market Capitalization t8 1 yr Target Price
j3 Market Cap (Real-time) v Volume
j4 EBITDA v1 Holdings Value
j5 Change From 52-week Low v7 Holdings Value (Real-time)
j6 Percent Change From 52-week Low w 52-week Range
k1 Last Trade (Real-time) With Time w1 Day’s Value Change
k2 Change Percent (Real-time) w4 Day’s Value Change (Real-time)
k3 Last Trade Size x Stock Exchange
k4 Change From 52-week High y Dividend Yield
k5 Percebt Change From 52-week High

for example, if you copy and paste this URL into your browser address:
^JKSE+BBCA.JK&f=snd1l1yr

you’ll get something which looks like:
“^JKSE”,”Composite Index”,”11/13/2008″,1251.009,N/A,N/A
“BBCA.JK”,”Bank Central Asia”,”11/13/2008″,2725,1.91,N/A

2. Historical Data
You can also download Yahoo historical price data using this URL:
[stock-symbol]&a=[month-start]&b=[date-start]&c=[year-start]&d=[month-end]&e=[date-end]&f=[year-end]&g=[interval]&ignore=.csv

Parameters
[stock-symbol]: stock symbol you want to download
[date-start]: start date
[month-start]: start month (0=Jan, 1=Feb, 2=Mar, …, 11=Dec)
[year-start]: start year
[date-end]: end date
[month-end]: end month (0=Jan, 1=Feb, 2=Mar, …, 11=Dec)
[year-end]: end year
[interval]: d=daily, w=weekly, m=monthly, v=dividends only

for example
^JKSE&a=06&b=1&c=1997&d=10&e=13&f=2008&g=m&ignore=.csv
will display monthly price of JKSE, starting from Jul 1st, 1997 to Nov 13th, 2008 looks like below:

Date,Open,High,Low,Close,Volume,Adj Close
2008-11-03,1281.51,1430.72,1270.60,1326.62,258512700,1326.62
2008-10-06,1766.94,1766.94,1089.34,1256.70,199721600,1256.70
2008-09-01,2157.02,2168.80,1592.24,1832.51,310863800,1832.51
2008-08-01,2283.02,2283.02,2035.59,2165.94,716255500,2165.94
2008-07-01,2361.48,2394.17,2129.40,2304.51,266418800,2304.51

阅读(2084) | 评论(0) | 转发(0) |
0

上一篇:判断栈的增长

下一篇:install module

给主人留下些什么吧!~~