Azzera filtri
Azzera filtri

Problems with urlread/webread

4 visualizzazioni (ultimi 30 giorni)
Mario Trevino
Mario Trevino il 17 Lug 2020
Modificato: Mario Trevino il 17 Lug 2020
Hi there everyone
Im using a function to download stock prices from yahoo finance. The function works well with most of the tickers but it fails sometimes. Debugging the function, I realized that the problem is localized to line 168, where it calls 'urlread'. It turns out that the URL is correct, and if I place it in a browser, I do see a CSV file with the propper data.... however, the urlead function is failing to bring that info to the workspace.
you can replicate the problem calling the following:
stocks = hist_stock_data(now-100,now,'NVDA','frequency','d');
(you can debug the function in line 168, and see how the url works fine in a webbrowser)
and, for example, it works with
stocks = hist_stock_data(now-100,now,'SPY','frequency','d')
my guess is that it should be something very simple with respect to urlread / webread. Maybe some expert can help me with this.
thanks in advance

Risposte (0)

Community Treasure Hunt

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

Start Hunting!

Translated by