Skip to Main Content Skip to Search
Product Documentation

yahoo.builduniverse - Portfolio matrix with total return price data from Yahoo!

Syntax

X = builduniverse(y,s,d1,d2,p)

Description

X = builduniverse(y,s,d1,d2,p) builds a portfolio matrix using Yahoo! data to compute a total return price series. X is an m-by-(n+1) matrix, where m refers to the number of records of data and n refers to the number of securities. Column 1 of the matrix contains MATLAB date numbers and the remaining columns are the total return prices for each security. y is the Yahoo! connection handle, s is a cell array of security identifiers, d1 and d2 are the start and end dates for the data request, and p is the periodicity flag. p can be entered as:

Tips

Examples

Compute a total return price series and convert to daily total returns:

y = yahoo;
%
% Load security list.  
s = {'A', 'B', 'C'};

% Get a daily total return price series for securities.
% (Calculated from prices, splits and dividends.)
Universe = builduniverse(y,s,'1/15/2007',floor(now));

% Convert to daily total returns.
Universe = periodicreturns(Universe,'d');

See Also

yahoo.fetch | yahoo.trpdata

  


Free Interactive Computational Finance CD

View demos and recorded presentations led by industry experts.

Now On Demand
Network with industry peers and learn the latest applications of the leading software product for computational finance.

 © 1984-2012- The MathWorks, Inc.    -   Site Help   -   Patents   -   Trademarks   -   Privacy Policy   -   Preventing Piracy   -   RSS