factors
Retrieve factor information
Syntax
Description
returns factor information based on the type of request.d
= factors(c
,code
,requesttype
)
returns the historical data for the specified factor within the specified universe using the
d
= factors(c
,code
,'HistoryDetail',universeid
)HistoryDetail
request.
Examples
Retrieve List of Factors
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 factorcode
— Factor codename
— Factor name
Retrieve Factor Information for Specific Factor Code
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 factorcode
— Factor codename
— Factor name
Retrieve Factor Information for Mapping
Request
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'
Retrieve Factor Information for HistoryDetail
Request
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 codefactorId
— Identification number for the factor codeuniverseId
— Identification number for the universedataType
— Data reporting formatuniverse
— Universe namefreqType
— Frequency (periodicity)startDate
— Start date of the factor in the universeendDate
— End date of the factor in the universe
Input Arguments
c
— IHS Markit connection
ihsmarkitrs
object
IHS Markit connection, specified as an ihsmarkitrs
object.
code
— Factor code
character vector | string scalar
Factor code or group name, specified as a character vector or string scalar.
Example: "ABR"
Data Types: char
| string
requesttype
— Request type
character vector | string scalar
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.
universeid
— Universe name
character vector | 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
d
— Factor information
table
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 Name | Description | Data Type |
---|---|---|
| Identification number of the factor |
|
| Factor code | cell array of character vectors |
| Factor name | cell array of character vectors |
| Factor description | cell array of character vectors |
| Localized factor description | cell array of character vectors |
| Factor type | cell array of character vectors |
| Factor parent code | cell array of character vectors |
| Rank order (descending or ascending) | cell array of character vectors |
| Whether rank data is available for the factor |
|
| Whether z-score data is available for the factor |
|
| Whether raw ratio data is available for the factor |
|
| Model type of the factor | cell array of character vectors |
| Group identifier of the factor |
|
| Name of the factor group | cell array of character vectors |
| Factor identifier |
|
| Universe name | cell array of character vectors |
| Identification number of the universe |
|
| Reporting format of the data | cell array of character vectors |
| Frequency (or periodicity) of the data | cell array of character vectors |
| Start date of the factor in the universe | cell array of character vectors |
| End date of the factor in the universe | cell array of character vectors |
| Code of the factor within the composite factor |
|
| Name of the factor within the composite factor | cell array of character vectors |
| Weight of the factor within the composite factor |
|
| Country code | cell array of character vectors |
Version History
Introduced in R2018b
MATLAB Command
You clicked a link that corresponds to this MATLAB command:
Run the command by entering it in the MATLAB Command Window. Web browsers do not support MATLAB commands.
Select a Web Site
Choose a web site to get translated content where available and see local events and offers. Based on your location, we recommend that you select: .
You can also select a web site from the following list
How to Get Best Site Performance
Select the China site (in Chinese or English) for best site performance. Other MathWorks country sites are not optimized for visits from your location.
Americas
- América Latina (Español)
- Canada (English)
- United States (English)
Europe
- Belgium (English)
- Denmark (English)
- Deutschland (Deutsch)
- España (Español)
- Finland (English)
- France (Français)
- Ireland (English)
- Italia (Italiano)
- Luxembourg (English)
- Netherlands (English)
- Norway (English)
- Österreich (Deutsch)
- Portugal (English)
- Sweden (English)
- Switzerland
- United Kingdom (English)
Asia Pacific
- Australia (English)
- India (English)
- New Zealand (English)
- 中国
- 日本Japanese (日本語)
- 한국Korean (한국어)