factset

FactSet connection

Description

The factset function creates a factset object. The factset object represents a FactSet® connection.

After you create a factset object, you can use the object functions to retrieve current and historical data for securities. Retrieve data for various fields within formula libraries. For credentials, contact FactSet Research Systems.

Creation

Syntax

c = factset(username,serialnumber,password,customerid)

Description

example

c = factset(username,serialnumber,password,customerid) creates a FactSet connection using a user name, serial number, password, and customer identifier.

Input Arguments

expand all

FactSet user name, specified as a character vector or string scalar. To find your user name, contact FactSet Research Systems.

Example: 'ABCD_EFGH_IJKL'

Data Types: char | string

FactSet serial number, specified as a character vector or string scalar. To find the serial number, contact FactSet Research Systems.

Example: 'ABCDEFG'

Data Types: char | string

FactSet password, specified as a character vector or string scalar. To find your password, contact FactSet Research Systems.

Example: 'XXXXXXXX'

Data Types: char | string

Customer identifier, specified as a character vector or string scalar. To find your customer identifier, contact FactSet Research Systems.

Example: 'CUSTOMERID1'

Data Types: char | string

Properties

expand all

FactSet user name, specified as a character vector. For details, contact FactSet Research Systems.

The factset function sets this property using the username input argument.

Example: 'ABCD_EFGH_IJKL'

Data Types: char

FactSet serial number, specified as a character vector. For details, contact FactSet Research Systems.

The factset function sets this property using the serialnumber input argument.

Example: 'ABCDEFG'

Data Types: char

FactSet password, specified as a character vector. For details, contact FactSet Research Systems.

The factset function sets this property using the password input argument.

Example: 'XXXXXXXX'

Data Types: char

Customer identifier, specified as a character vector. For details, contact FactSet Research Systems.

The factset function sets this property using the customerid input argument.

Example: 'CUSTOMERID1'

Data Types: char

Object Functions

fetchRequest data from FactSet
getRetrieve properties of FactSet connection object
isconnectionDetermine if connections to FactSet are valid
closeClose connection to FactSet

Examples

collapse all

Create a FactSet connection. Then, retrieve current data for a security. The current data you see when completing this example can differ from the output data shown.

Connect to FactSet using a user name, serial number, password, and customer identifier. c is a factset object.

username = 'ABCD_EFGH_IJKL';
serialnumber = 'ABCDEFG';
password = 'XXXXXXXX';
customerid = 'CUSTOMERID1'

c = factset(username,serialnumber,password,customerid)
c = 

  factset with properties:

        user: 'ABCD_EFGH_IJKL'
      serial: 'ABCDEFG'
    password: 'XXXXXXXX'
         cid: 'CUSTOMERID1'

Retrieve the last price of the IBM® security using the FactSet connection. Use a string to specify the field name.

s = 'IBM';
f = "price";
d = fetch(c,s,f)
d = 

  struct with fields:

       Id: {'IBM'}
     Date: 736890.00
    price: 153.63

d is a structure that contains the current data. The fields are:

  • Id — Security name

  • Date — MATLAB® date number

  • price — Last price

Close the FactSet connection.

close(c)

See Also

External Websites

Introduced before R2006a