Datafeed Toolbox    
fetch

Request data from Yahoo

Syntax

data = fetch(Connect, 'Security', 'FromDate', 'ToDate', 'Period')

Arguments

Connect
Yahoo connection object created with the yahoo command.
Security
A MATLAB string or cell array of strings containing the names of a securities in a format recognizable by the Yahoo server.
Fields
A MATLAB string or cell array of strings indicating the data fields for which data is to be retrieved. Possible values are:

Symbol
Last
Date
Time
Change
Open
High
Low
Volume
Date
Date string or serial date number indicating date for the requested data. If today's date is entered, yesterday's data is returned.
FromDate
Beginning date for historical data.
ToDate
End date for historical data.
Period
Period within date range. Period values are:

d    (daily)
w    (weekly)
m    (monthly)
v    (dividends)

Description

data = fetch(Connect, 'Security') returns data for all fields from Yahoo's web site for the indicated securities.

data = fetch(Connect, 'Security', 'Fields') returns data for the specified fields.

data = fetch(Connect, 'Security', 'Date') returns all security data for the requested date.

data = fetch(Connect, 'Security', 'Fields', 'Date') returns security data for the specified fields on the requested date.

data = fetch(Connect, 'Security', 'FromDate', 'ToDate') returns security data for the date range FromDate to ToDate.

data = fetch(Connect, 'Security', 'Fields', 'FromDate', 'ToDate') returns security data for the specified fields for the date range FromDate to ToDate.

data = fetch(Connect, 'Security', 'FromDate', 'ToDate', 'Period') returns security data for the date range FromDate to ToDate with the indicated period.

Examples

Obtain the closing price for Coca Cola on April 6, 2000.

See Also

close, get, isconnection, yahoo (Yahoo functions)


  close get