Getting today's Open price from Yahoo Finance using GetStockData

Asked by Amira Roula on 9 Nov 2011
Latest activity Answered by Amira Roula on 19 Aug 2012

I have tried to tweek Peter Webb's matlab function GetStockData ( http://www.mathworks.com/matlabcentral/fileexchange/1880-display-stock-data/content/GetStockData.m) to download today's Open price from yahoo finance.

I have however not succeded with this; i tried to change the code from:

query = ['?s=' num2str(symbol) '&a=' num2str(startMonth-1) '&b=' num2str(startDay) '&c=' num2str(startYear) ...
'&d=' num2str(endMonth-1)   '&e=' num2str(endDay)   '&f=' num2str(endYear) '&g=' num2str(frequency) ]

To:

query = ['?s=' num2str(symbol) '&ql=1'];

It did not work however ... any thoughts?

0 Comments

Amira Roula

Products

No products are associated with this question.

1 Answer

Answer by Amira Roula on 19 Aug 2012
Accepted answer

Problem solved, see code below:

server = 'http://table.finance.yahoo.com/table.csv';

query = ['?s=' num2str(symbol) '&a=' num2str(startMonth-1) '&b=' num2str(startDay) '&c=' num2str(startYear) ... '&d=' num2str(endMonth-1) '&e=' num2str(endDay) '&f=' num2str(endYear) '&g=' num2str(frequency) ];

0 Comments

Amira Roula

Contact us