Adj Close is read incorrectly by urlread

16 vues (au cours des 30 derniers jours)
arsham shahlari
arsham shahlari le 29 Avr 2020
Commenté : arsham shahlari le 29 Avr 2020
When I go to
'https://query1.finance.yahoo.com/v7/finance/download/mo?period1=641347200&period2=1588118400&interval=1d&events=history'
in my browesr, I get an excelsheet with multiple columns including close and adj close (the two columns are different for this stock)
But when I use MATLAB and type:
url= 'https://query1.finance.yahoo.com/v7/finance/download/mo?period1=641347200&period2=1588118400&interval=1d&events=history';
[temp, status] = urlread(url,'get',{'matlabstockdata@yahoo.com', 'historical stock'});
The close and adj close columns are identical (i.e. the adj close column is missing and the close column is repeated in its place).
This problem does not occur for all stocks. For example it works fine for
'https://query1.finance.yahoo.com/v7/finance/download/ba?period1=641347200&period2=1588118400&interval=1d&events=history'
but it does not work for
'https://query1.finance.yahoo.com/v7/finance/download/agnc?period1=641347200&period2=1588118400&interval=1d&events=history'
and
'https://query1.finance.yahoo.com/v7/finance/download/mo?period1=641347200&period2=1588118400&interval=1d&events=history'
  2 commentaires
arsham shahlari
arsham shahlari le 29 Avr 2020
Can anyone let me know why this started happening?
Or if you know of a solutiuon.
arsham shahlari
arsham shahlari le 29 Avr 2020
And for stocks like IBM and CVS nothing comes back with the MATLAB command (although if you just type the url address to your browser, you will get an spreadsheet with the data).

Connectez-vous pour commenter.

Réponses (0)

Catégories

En savoir plus sur Financial Toolbox dans Help Center et File Exchange

Community Treasure Hunt

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

Start Hunting!

Translated by