-
大小: 1019B文件類型: .m金幣: 1下載: 0 次發(fā)布日期: 2021-01-06
- 語言: Matlab
- 標(biāo)簽: 股票??新浪財(cái)經(jīng)??
資源簡介
抓取新浪財(cái)經(jīng)上股票數(shù)據(jù)的matlab代碼
代碼片段和文件信息
a=tic;
url=‘http://biz.finance.sina.com.cn/stock/flash_hq/kline_data.php‘;
rand_num=num2str(randi(10000));
symbol=‘sz000415‘;
begin_date=‘20130701‘;
end_date=‘20130730‘;
type=‘plain‘;
filename=[symbol‘.txt‘];
%%
str=urlread(url‘get‘{‘rand‘rand_num
????...
????‘symbol‘symbol...
????‘end_date‘end_date...
????‘begin_date‘begin_date...
????‘type‘type});
dlmwrite(filename?str‘‘)
%%
tic
%[dohclv]?=?strread(str‘%s%f%f%f%f%f‘‘delimiter‘?‘‘);
%candle(hlco‘r‘)
C=?
評(píng)論
共有 條評(píng)論