Main Content

factors

Retrieve factor information

Description

example

d = factors(c) returns a list of factors using an IHS Markit® connection.

example

d = factors(c,code) returns factor information for the specified factor code or group name.

example

d = factors(c,code,requesttype) returns factor information based on the type of request.

example

d = factors(c,code,'HistoryDetail',universeid) returns the historical data for the specified factor within the specified universe using the HistoryDetail request.

Examples

collapse all

Using an IHS Markit connection, retrieve a list of factors.

Create an IHS Markit connection using your user name and password. c is an ihsmarkitrs object.

username = 'ABCDEF';
password = 'ABC123';
c = ihsmarkitrs(username,password);

Retrieve a list of factors using the IHS Markit connection. d is a table that contains the list of factors.

d = factors(c);

Display the first three variables to view the information for the first three factors.

d(1:3,1:3)
ans =

  3×3 table

     id        code                           name                     
    ____    __________    _____________________________________________

    7403    '3MChgGPA'    'Quarterly Change in Gross Profit to Assets' 
    7404    '3MChgGPM'    'Quarterly Change in Gross Profit Margin'    
       1    'ABR'         'Abnormal Return around QTR Earnings Release'

The variables are:

  • id — Identification number of the factor

  • code — Factor code

  • name — Factor name

Using an IHS Markit connection, retrieve information for a specific factor by using the factor code.

Create an IHS Markit connection using your user name and password. c is an ihsmarkitrs object.

username = 'ABCDEF';
password = 'ABC123';
c = ihsmarkitrs(username,password);

Retrieve information for the factor with the code ABR using the IHS Markit connection. The factors function returns d as a table that contains the information for the specified factor.

code = 'ABR';
d = factors(c,code);

Display the first three variables of the table.

d(1,1:3)
ans =

  1×3 table

    id    code                         name                     
    __    _____    _____________________________________________

    1     'ABR'    'Abnormal Return around QTR Earnings Release'

The variables are:

  • id — Identification number of the factor

  • code — Factor code

  • name — Factor name

Using an IHS Markit connection, retrieve information for a specific factor by using the factor code. Also, specify the Mapping request.

Create an IHS Markit connection using your user name and password. c is an ihsmarkitrs object.

username = 'ABCDEF';
password = 'ABC123';
c = ihsmarkitrs(username,password);

Retrieve information for the factor with the code ABR using the IHS Markit connection. Specify the Mapping type for the request. d is a table that has one variable, which lists the names of the universes that contain the specified factor.

code = 'ABR';
requesttype = 'Mapping';
d = factors(c,code,requesttype)
d =

  5×1 table

              universe           
    _____________________________

    'QSG Bank Universe'          
    'Markit US Large Cap'        
    'Markit US Small Cap'        
    'Markit US Total Cap'        
    'US Total Cap Highly Shorted'

Using an IHS Markit connection, retrieve information for a specific factor by using the factor code. Also, specify the HistoryDetail request.

Create an IHS Markit connection using your user name and password. c is an ihsmarkitrs object.

username = 'ABCDEF';
password = 'ABC123';
c = ihsmarkitrs(username,password);

Retrieve information for the factor with the code ACI using the IHS Markit connection. Specify the HistoryDetail type for the request and the QSG World universe. d is a table that contains the historical information for the specified factor.

code = 'ACI';
universeid = 'QSG World';
d = factors(c,code,'HistoryDetail',universeid)
d =

  4×8 table

    code     factorId    universeId      dataType       universe      freqType      startDate        endDate   
    _____    ________    __________    ____________    ___________    _________    ____________    ____________

    'ACI'       2           133        'Percentile'    'QSG World'    'Daily'      '10/01/2009'    '02/06/2018'
    'ACI'       2           133        'Percentile'    'QSG World'    'Monthly'    '12/30/1988'    '09/30/2009'
    'ACI'       2           133        'Rawratio'      'QSG World'    'Daily'      '10/01/2009'    '02/06/2018'
    'ACI'       2           133        'Rawratio'      'QSG World'    'Monthly'    '12/30/1988'    '09/30/2009'

d is a table with these variables:

  • code — Factor code

  • factorId — Identification number for the factor code

  • universeId — Identification number for the universe

  • dataType — Data reporting format

  • universe — Universe name

  • freqType — Frequency (periodicity)

  • startDate — Start date of the factor in the universe

  • endDate — End date of the factor in the universe

Input Arguments

collapse all

IHS Markit connection, specified as an ihsmarkitrs object.

Factor code or group name, specified as a character vector or string scalar.

Example: "ABR"

Data Types: char | string

Request type, specified as the value 'ModelStructure' or 'Mapping'. Use the 'ModelStructure' value to return a list of the composite factors that constitute the factor specified by the code input argument. Use the 'Mapping' value to return a list of the names of universes that contain the specified factor.

You can specify each value as a character vector or string scalar.

Universe name, specified as a character vector or string scalar. Use universeid only with the 'HistoryDetail' syntax.

Example: 'QSG World'

Data Types: char | string

Output Arguments

collapse all

Factor information, returned as a table. The following table describes the variables in the returned data. Depending on the request type specified in the requesttype input argument or the 'HistoryDetail' syntax, the returned table contains a subset of these variables.

Variable NameDescriptionData Type

id

Identification number of the factor

double

code

Factor code

cell array of character vectors

name

Factor name

cell array of character vectors

description

Factor description

cell array of character vectors

dIntl

Localized factor description

cell array of character vectors

type

Factor type

cell array of character vectors

parentCode

Factor parent code

cell array of character vectors

rankingOrder

Rank order (descending or ascending)

cell array of character vectors

isRankAvailable

Whether rank data is available for the factor

logical

isZscoreAvailable

Whether z-score data is available for the factor

logical

isRawRatioAvailable

Whether raw ratio data is available for the factor

logical

modelType

Model type of the factor

cell array of character vectors

groupId

Group identifier of the factor

double

groupName

Name of the factor group

cell array of character vectors

factorId

Factor identifier

double

universe

Universe name

cell array of character vectors

universeId

Identification number of the universe

double

dataType

Reporting format of the data

cell array of character vectors

freqType

Frequency (or periodicity) of the data

cell array of character vectors

startDate

Start date of the factor in the universe

cell array of character vectors

endDate

End date of the factor in the universe

cell array of character vectors

childId

Code of the factor within the composite factor

double

childCode

Name of the factor within the composite factor

cell array of character vectors

weight

Weight of the factor within the composite factor

double

data

Country code

cell array of character vectors

Version History

Introduced in R2018b