Datafeed problem - yahoo finance cant find stock ?

조회 수: 3 (최근 30일)
DoVile Last Name:
DoVile Last Name: 2013년 3월 18일
답변: Kawee Numpacharoen 2016년 11월 2일
I am trying to get data on a bunch of danish stocks, fx. the Ap Moeller Maersk B stock. I am using the code
C = yahoo;
name = 'MAERSK-B.CO';
Price.(name) = fetch(C,name,'Adj Close',startDate,endDate,'d');
But am receiving an error, the problem i think is with the name, though i found it on the yahoo finance webpage it seems odd when compared to the tickers i have that does work (like 'CABGY' for carlsberg fx.)
  댓글 수: 1
Kevin Connor
Kevin Connor 2013년 11월 7일
dftool statement will enable a GUI from which these stocks an be downloaded. I have same issue with Australian stocks ( eg BHP.AX ) where the fetch statement appears not to recognize a stock ticker with a ".xx" type extension.

댓글을 달려면 로그인하십시오.

답변 (1개)

Kawee Numpacharoen
Kawee Numpacharoen 2016년 11월 2일
The problem is not in the fetch function, but in the struct's name. You can easily fix it here:
C = yahoo;
name = 'MAERSK-B.CO';
name2 = strrep(name, '.', '_')
name2 = strrep(name2, '-', '_')
Price.(name2) = fetch(C,name,'Adj Close',today-10,today,'d');

카테고리

Help CenterFile Exchange에서 Web Services에 대해 자세히 알아보기

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by