Documentation

This is machine translation

Translated by Microsoft
Mouseover text to see original. Click the button below to return to the English verison of the page.

Note: This page has been translated by MathWorks. Please click here
To view all translated materals including this page, select Japan from the country navigator on the bottom of this page.

fetch

Request data from FactSet

Syntax

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

Arguments

Connect

FactSet® connection object created with the factset function.

Library

FactSet formula library.

Security

A MATLAB® character vector or cell array of character vectors containing the names of securities in a format recognizable by the FactSet server.

Fields

A MATLAB character vector or cell array of character vectors indicating the data fields for which to retrieve data.

Date

Date character vector or serial date number indicating date for the requested data. If you enter today's date, fetch returns yesterday's data.

FromDate

Beginning date for date range.

    Note:   You can specify dates in any of the formats supported by datestr and datenum that display a year, month, and day.

ToDate

End date for date range.

Period

Period within date range. Period values are:

  • 'd': daily values

  • 'b': business day daily values

  • 'm': monthly values

  • 'mb': beginning monthly values

  • 'me': ending monthly values

  • 'q': quarterly values

  • 'qb': beginning quarterly values

  • 'qe': ending quarterly values

  • 'y': annual values

  • 'yb': beginning annual values

  • 'ye': ending annual values

Description

data = fetch(Connect) returns the names of all available formula libraries.

data = fetch(Connect, 'Library') returns the valid field names for a given formula library.

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

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

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 specified period.

Examples

Retrieving Names of Available Formula Libraries

Obtain the names of available formula libraries:

D = fetch(Connect) 

Retrieving Valid Field Names of a Specified Library

Obtain valid field names of the FactSetSecurityCalcs library:

D = fetch(Connect, 'fs') 

Retrieving the Closing Price of a Specified Security

Obtain the closing price of the security IBM:

D = fetch(Connect, 'IBM', 'price') 

Retrieving the Closing Price of a Specified Security Using Default Date Period

Obtain the closing price for IBM using the default period of the data:

D = fetch(C, 'IBM', 'price', '09/01/07', '09/10/07')

Retrieving the Monthly Closing Prices of a Specified Security for a Given Date Range

Obtain the monthly closing prices for IBM from 09/01/05 to 09/10/07:

D = fetch(C, 'IBM', 'price', '09/01/05', '09/10/07', 'm')

See Also

| |

Was this topic helpful?