`
isiqi
  • 浏览: 16042800 次
  • 性别: Icon_minigender_1
  • 来自: 济南
社区版块
存档分类
最新评论

matlab提取A股市场数据

阅读更多

可以用matlab计算:如下

>> clear
>> c=yahoo

c =

url: 'http://finance.yahoo.com'
ip: []
port: []

>> D=fetch(c,'601006.ss','Close','03/01/08','04/01/08');%获得大秦铁路3月份收盘价
>> p=D(:,2)

p =

16.8000
17.3000
17.7700
16.7400
17.0100
17.1900
17.4800
17.5000
16.5600
15.8000
16.5400
17.1000
18.0400
18.8400
18.2600
19.6000
19.4500
18.6100
19.4600
20.0800

>> length(find(diff(p)>0))%计算上涨天数

ans =

13

分享到:
评论

相关推荐

Global site tag (gtag.js) - Google Analytics