0

From the function getYahooDailyData (available on:)

http://www.mathworks.com/matlabcentral/fileexchange/43627-download-daily-data-from-google-and-yahoo--finance/content/getYahooDailyData.m

I try the following code.

symbols = {'000001.SZ', '000002.SZ'}
data = getYahooDailyData(symbols, '01/01/2004', '05/11/2014', 'dd/mm/yyyy')  

data is created as a struct object.

data = 

    x000001x2ESZ: [480x7 dataset]
    x000002x2ESZ: [480x7 dataset]

In my case my struct object contains 2 dataset (000001.SZ and 000002.SZ).

Each dataset contains 7 column : the first col is the date the last is the adjusted price.

I would like to know how to create a new matrice with 3 column:

  1. Date (which is the same for 000001.sz and 000002.sz)
  2. Adj price of 000001.sz
  3. Adj price of 000002.sz

And of course if I add more equities in symbols I would like to get the same kind of matrix...

PS: here is the matlab environement https://www.dropbox.com/s/vqujbs9utixcfeb/dataprices.mat?dl=0

Suever
  • 64,497
  • 14
  • 82
  • 101
S12000
  • 3,345
  • 12
  • 35
  • 51
  • It was complaining of this - `Error using getYahooDailyData Too many input arguments.` after trying to run the code. – Divakar Nov 08 '14 at 18:40
  • I dont get this error maybe use small letters in getyahoodailydata. Otherwise I just uploaded the post with a dropbox link containing the environement. – S12000 Nov 08 '14 at 19:14
  • How about this - `[data.x0003330x2ESZ.Date data.x0003330x2ESZ.AdjClose data.x0006230x2ESZ.AdjClose]`? Not sure if it could be this easy. – Divakar Nov 08 '14 at 19:59
  • @Divakar Error using horzcat CAT arguments dimensions are not consistent. Error in YahooTest (line 6) [data.x0003330x2ESZ.Date data.x0003330x2ESZ.AdjClose data.x0006230x2ESZ.AdjClose] – S12000 Nov 09 '14 at 02:32
  • Well I have used the `.mat` linked in the question. Could you run it on that data? – Divakar Nov 09 '14 at 04:37

0 Answers0