WhooL !

Fantastic World 数量投资 程序交易 以及 市场动态

WhooL  ! header image 2

matlab 和Google yahoo finance的数据获得

十一月 25th, 2009 by Crews

这些天做了一个Project,基本思路是用matlab的openStream函数链接到google和yahoo的网页,通过获取页面编码的办法,得到股票的一些数值。
得到的数值包括:
last_trade,  day_open,  day-low,  day_high,
year_low  ,year_high,  day_vol,  year_vol,
market-cap,  pe,  eps
通过matlab和数据库的conn函数,把得到的数值存储在数据库中,由于google的机器人程序的限制,获取数据的周期为5分钟。
程序中的stocklist用的是在美国上市的中国公司代码,可以替换为其他代码,得到需要的数据。
该成程序现在只适用于得到股票数据,ETF的数据因为页面格式不一样,没有在stocklist中。
程序运行速度和网络条件有关,如果需要测试,请保证你的网络速度。
以下是程序截图和程序代码:

pic1

pic2 pic3 pic4

看看Whool!更多的文章,把 Whool!加入到你的订阅吧!

你感兴趣的.....

  • 发现自己走错了 (0)
    一个误区,matlab本身就提供时间序列的函数,而且有内置的yahoo数据端口,与其花时间倒腾数据库,还不如好好淘腾下matlab,笨死了...
  • 一个和谐的世界,what the fuck (0)
    说是google想要退出中国了,开始的时候觉得是他只是想放弃google。cn这个鸡肋,后来看了下,好像中国根本就不能上google。com,然后很有兴趣找了下被禁言的网站的名单,当然很多网站我也不上的,只是说影响自己的一些网站罢了。 bing twitter live blogger blogspot flickr youtube hk.yahoo.com 还有google。...
  • 从google到yahoo (0)
    本来想着用google的数据,不过看起来还是要试试yahoo的。不知道yahoo会不会出现一样的情况。...
  • How to Get a Stock Quote Using Matlab(luminouslogic) (0)
    While a previous article covered how to use Matlab to retrieve certain stock statistics from Yahoo! Finance, I thought I should post a separate script that just retrieves the price at which the stock ...

Tags:   · · No Comments

Leave a Comment

0 responses so far ↓

There are no comments yet...Kick things off by filling out the form below.