Datafeed problem - yahoo finance cant find stock ?
1 vue (au cours des 30 derniers jours)
Afficher commentaires plus anciens
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 commentaire
Kevin Connor
le 7 Nov 2013
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.
Réponses (1)
Kawee Numpacharoen
le 2 Nov 2016
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');
0 commentaires
Voir également
Catégories
En savoir plus sur Web Services dans Help Center et File Exchange
Produits
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!