factset ondemand tips & techniques manual › hubfs › website_downloads... · factset...

20
FactSet Research Systems Inc. Copyright © 2015 FactSet Research Systems Inc. All rights reserved. www.factset.com FactSet OnDemand Tips & Techniques Manual FactSet Research Systems Version 3.3A

Upload: others

Post on 03-Jul-2020

7 views

Category:

Documents


0 download

TRANSCRIPT

FactSet Research Systems Inc. Copyright © 2015 FactSet Research Systems Inc. All rights reserved. www.factset.com

FactSet OnDemand Tips & Techniques Manual FactSet Research Systems

Version 3.3A

FactSet Research Systems Inc. Copyright © 2015 FactSet Research Systems Inc. All rights reserved. www.factset.com

2 | P a g e

Table of Contents

Chapter 1. Introduction ..........................................................................................................................3 1.1 Overview .......................................................................................................................................3 1.2 OnDemand Q&A ...........................................................................................................................3

1.2.1 OnDemand Interface Questions ...........................................................................................................3 1.2.2 Data Request Questions .......................................................................................................................4

Chapter 2. Extract Data from FactSet .....................................................................................................5 2.1 FactSet Syntax ...............................................................................................................................5

2.1.1 FactSet Query Language (FQL) – Time Series Access ...........................................................................5 2.1.2 Screening Language – Cross Sectional Access ......................................................................................5

2.2 OnDemand Requests and FactSet Syntax .....................................................................................6 2.3 OnDemand Factlet Requests ........................................................................................................6

2.3.1 Standard Factlets .................................................................................................................................6 2.3.2 Specialized Factlets ..............................................................................................................................7 2.3.3 Other FactSet Functions .......................................................................................................................9

2.4 The “Ideal” Data Structure ........................................................................................................ 10 Chapter 3. Speed of OnDemand Data Requests .................................................................................. 11

3.1 Factlet Request .......................................................................................................................... 11 3.1.1 OnDemand factlet request compared to Excel Data Downloading ....................................................11

3.2 Factors Affecting Speed of OnDemand Requests ...................................................................... 12 3.2.1 System Factors on Client’s PC .............................................................................................................12 3.2.2 Fetching and Parsing of Data .............................................................................................................12 3.2.3 ExtractFormulaHistory and ExtractDataSnapshot ............................................................................12

3.3 Tips to make the requests more efficient: ................................................................................ 14 3.3.1 Time-series and static data ................................................................................................................14 3.3.2 Time-series data of different frequencies ...........................................................................................14

Chapter 4. FactSet OnDemand Glossary .............................................................................................. 15 Appendix .............................................................................................................................................. 18 FactSet Consulting Services ................................................................................................................. 20

FactSet Research Systems Inc. Copyright © 2015 FactSet Research Systems Inc. All rights reserved. www.factset.com

3 | P a g e

Chapter 1. Introduction

1.1 Overview FactSet supports the major tasks frequently undertaken in a data mining project, such as data acquisition, data preparation, modeling, and model execution with reporting/graphing. The focus of this manual is to provide an overview of tips and techniques for improving the performance of FactSet OnDemand requests in statistical packages.

1.2 OnDemand Q&A The following are some of the most common troubleshooting questions to consider when installing the OnDemand Interface and setting up data requests.

1.2.1 OnDemand Interface Questions

Are you installing the FactSet OnDemand Interface for MATLAB, R or developer’s toolkit? - For MATLAB you need MATLAB version 2011b or above and a subscription to the

MATALAB DataFeed toolbox.

- For R you need R version 2.1.0 or above. - What language and version are you using for the developer’s toolkit installation1?

Are you installing the plugin in the correct directory?

- For MATLAB and R you will need to select the root directory of the version of the stat package you are using. For example, you cannot install to the MATLAB directory, instead you should install to the MATLAB/R2014A directory.

Is the version of the plugin matching the software version you are using? - If you use a 32 bit software version you should always use the 32 bit plugin version

(regardless if your Windows architecture is 32 bit or 64 bit)

Do you have read and write access to the temp file where the data is first downloaded to? - In some cases (such as running through a server) you might need to change the

directory for the temp file by using:

FactSetOnDemand.setConfigurationItem(int32(16), newDirectory)

Are you using the correct credentials for OnDemand requests? - OnDemand credentials are different from the FactSet Workstation username and

password. If you are getting an error message stating Invalid credentials, verify that OnDemand credentials are being used.

1 Please contact you FactSet representative for further details on supported versions for the different developer’s toolkit languages.

FactSet Research Systems Inc. Copyright © 2015 FactSet Research Systems Inc. All rights reserved. www.factset.com

4 | P a g e

Are you making requests using a pre-release version of the statistical package (such as MATLAB and R)? - Pre-release versions of MATLAB and R are not officially supported by the OnDemand

Plugin. Check with FactSet support.

Are you using your company specific proxy settings?

- In the main configuration dialog box, the user has the option to input their relevant proxy information.

Does your firewall allow web calls to the FactSet servers? - Ensure to whitelist https://*.factset.com on firewalls / URL inspectors / IPS / IDS; - Ensure that https:// (TCP 443) is allowed to FactSet's production destination subnets -

192.234.235.0 (255.255.255.0) and 64.209.89.0 (255.255.255.0)

1.2.2 Data Request Questions

Are you making a time series data request or as of a single date? Are you using the correct function or factlet? - To determine the most effective FactSet data access method and factlet to use, refer to

Chapter 2.

Are you using the date parameter to specify the date range for your request?

- Always include the date parameter in your factlet, this will ensure that the dates are lined up between the code used and the output date in the response.

Are you using the calendar setting?

- The default calendar is set to US, to change please use the calendar parameter.

Is your request too large? How many data items are you trying to download in the request?

- For efficiency reasons there are limitations in number of datapoints requested in FactSet OnDemand. The timeout for requests is set to a maximum of 15 minutes. For an example of how to break up a request, refer to the scripts in Appendix 1.

Are you downloading Fixed Income data with a screening factlet?

- The universe type needs to be specified as debt for fixed income data in screening.

Do you get an error when running the Factlet? What is the error message? Is it the same error for all factlets or do you get the expected data for other requests?

- This Information is important from a troubleshooting perspective.

FactSet Research Systems Inc. Copyright © 2015 FactSet Research Systems Inc. All rights reserved. www.factset.com

5 | P a g e

Chapter 2. Extract Data from FactSet

2.1 FactSet Syntax FactSet stores all of the available data in proprietary database structures on FactSet computers. This allows FactSet to adjust the way data is stored, so that clients can access data as efficiently as possible. Most datasets available on FactSet are stored in two different ways, so as to facilitate two different data access methods. These two options use the FactSet Query Language (FQL) for time-series requests and the FactSet Screening Language (Screening) to efficiently extract data for a large universe of securities as of a single date. Please see Online Assistant page 10410 for further information on the storage methods.

2.1.1 FactSet Query Language (FQL) – Time Series Access

The extraction of a time-series of data from FactSet either for an index or security (e.g. the last 4 quarters of EPS for the S&P 500 or for Exxon) or macroeconomic data (e.g. the last 5 years of industrial production for the BRIC countries) can be done using the FactSet Query Language (FQL). FQL is a proprietary data retrieval language used to access FactSet data. For more information on FQL, see the FactSet Online Assistant page 1961. To request a time-series of data; a start date, end date and frequency needs to be specified. If a date is not specified, data is returned from the most recent time period. The dates can be either absolute dates or relative dates. Some advantages of FQL include:

The ability to specify dates for any database using the same formats. With FQL, date formats are flexible. You can use a number of consistent date formats (defined by FQL) for all databases which makes using and combining data from different databases simple. The ability to iterate items, formulas, and functions at any frequency. With FQL, you can iterate items, formulas, and functions at any frequency. For example, you can request a series of weekly price to earnings ratios.

2.1.2 Screening Language – Cross Sectional Access

Alternatively, the extraction of data for a list of ids for 1 date, both for equity and fixed income securities is best done using the Screening Language. The FactSet Screening Language is a way to efficiently extract data for a large universe of securities as of a single date. By default, the Screening Language does not allow iteration and therefore cannot be used to return a time series of data with a single request code. To request data as of a single historical date, an absolute or relative date can be specified.

Overall, FQL syntax should be used to retrieve data for many data items, or to download time series data. Screening syntax should be used to retrieve data for a large universe for a single point in time.

FactSet Research Systems Inc. Copyright © 2015 FactSet Research Systems Inc. All rights reserved. www.factset.com

6 | P a g e

2.2 OnDemand Requests and FactSet Syntax FactSet OnDemand data requests are done via web requests that retrieve a bundle of FactSet data in a variety of tagged or delimited formats. The OnDemand integration generates a URL that creates an https request. The data request will be transmitted over the internet to FactSet DataDirect Servers. DataDirect uses HTTP basic authentication over Secure Sockets Layer (SSL). The DataDirect servers handle authentication of the user and the permissioning of data sets. The OnDemand integration is designed to provide simple access to FactSet data in reasonably sized blocks through a web service. FactSet has written a number of functions for the FactSet OnDemand plugins that retrieve FactSet data using FQL or Screening syntax by calling stored procedures (factlets) on the FactSet OnDemand servers. Factlets are server-based functions that encapsulate business logic and data collection procedures. A factlet can handle a simple data request or can invoke complex application logic. The data items that are requested, along with an identifier and date, are stored in a structure that is returned. Entities (securities, indices, etc.) and the time dimension are stored in arrays, either separately or combined together into one.

2.3 OnDemand Factlet Requests The following is a list of the factlets available using OnDemand MATLAB, R, Developer’s Toolkit and SAS integrations. Not all factlets are available in all integrations. The description for each factlet also highlights if the factlet should be used with FQL or Screening syntax. The factlets should be chosen depending on the dataset required. There are general factlets using either actual screening or FQL codes as input (to find the correct code please use the FactSet Sidebar look-up dialog) and specialized factlets used for specific datasets.

2.3.1 Standard Factlets

The Standard Factlets below are used for Screening data, Economics data and FQL data. For the exact input syntax, the FactSet Sidebar dialog box can be used.

Factlet FactSet syntax used by factlet

ExtractDataSnapshot Function is used for extracting one or more items for a list of ids for 1 date, both for equity or fixed income securities. Should be used to efficiently extract data for a large universe of securities as of a single date. The data can also be retrieved using a backtest date to avoid look-ahead bias in the analysis. The backtest functionality is available to clients subscribing to one of FactSet’s quantitative applications, such as Alpha Testing or Portfolio Simulation.

Screening

ExtractEconData Function provides access to a broad array of macroeconomic content, interest rates and yields, country indices and various exchange rate measures from both the FactSet Economics and the Standardized Economic databases.

FQL

FactSet Research Systems Inc. Copyright © 2015 FactSet Research Systems Inc. All rights reserved. www.factset.com

7 | P a g e

ExtractFormulaHistory Function is used for extracting one or more items for one security, an index or a list of securities over time.

FQL

2.3.2 Specialized Factlets

The specialized Factlets are developed for different content sets or specialized data structures. These factlets have been developed to simplify and standardize the data retrieval of more complex data structures.

Factlet FactSet syntax used by factlet

CorporateActionsDividends Function is used for extracting stock dividend information.

FQL

CorporateActionsSplits Function is used for extracting stock split information.

FQL

EstimatesOnDemand Function provides access to FactSet sourced company level estimates data. The data is accessed through the following reports that are available with this function: Actuals, BrokerDetail, BrokerSnapshot, Consensus, Guidance, Surprise, Detailed Recommendations and Consensus Recommendations.

FQL

ExtractAlphaTestingSnapshot Function provides access to data from AlphaTesting model results. Alpha Testing is a tool available in the FactSet workstation used to assess the relationship between one or more variables and subsequent returns over time. A subscription to Alpha Testing in FactSet is necessary to extract this data in the stat packages.

FQL

ExtractBenchmarkDetail Function is used for extracting multiple data items for a benchmark. Benchmark data can be retrieved using other functions, such as with ExtractFormulaHistory, but the ExtractBenchmarkDetail function allows a user to retrieve a more comprehensive overview of the index constituent data, without additional codes or calculations. In the default output, identifiers are sorted in descending order by weight in the index and each row shows the index id, company id, date, ticker, and weight. Additional items are displayed at the end.

Screening Note: The Extract-BenchmarkDetail function by default uses Screening codes entered in the items argument of the syntax. If using an FQL code, enter an _ before the FQL items code.

FactSet Research Systems Inc. Copyright © 2015 FactSet Research Systems Inc. All rights reserved. www.factset.com

8 | P a g e

ExtractOFDBItem Function provides access to a list of securities and multiple data items for a range of dates uploaded into a single Open FactSet Database (OFDB).

Screening

Note: The Extract-OFDBItem function by default uses Screening. FQL should be used when using ids with spaces or short positions, indicated in the OFDB with an _S.

ExtractOFDBUniverse Function provides access to a list of securities belonging to a single Open FactSet Database (OFDB) file as of a single date.

FQL

ExtractScreenUniverse Function used for extracting a list of Identifiers stored in a single FactSet screen. In the FactSet workstation, a user can screen for securities based on specified criteria and store the result using FactSet Universal Screening for equity or debt securities.

Screening

ExtractOptionsSnapshot Function is used for extracting options data for one or more conditions from the FactSet-Options Derived Values database.

FQL

ExtractSPARData Function is used for displaying SPAR data for specified funds from databases that includes S&P, Lipper, Morningstar, Russell, eVestment, Nelson, Rogerscasey, and PSN. A subscription to SPAR in FactSet is necessary to be able to extract this data in stat packages.

FQL

ExtractVectorFormula ExtractVectorFormula function is used for extracting FactSet data that is stored in a vector data format, where the data array does not have a predefined size and is organized by the vector position. A vector can be thought of as a list that has one dimension, a row of data. A vector position allows for a particular element of the array to be accessed. ExtractVectorFormula handles non-sequential data with support for matrix or vector output. The nature of the data determines if the output is a matrix or vector, it is not specified in the function to choose which format the data is returned in. This type of data includes corresponding geographic or product segment breakdowns for a company or detailed broker snapshot or history estimates/analyst information.

FQL

FactSet Research Systems Inc. Copyright © 2015 FactSet Research Systems Inc. All rights reserved. www.factset.com

9 | P a g e

LSD_Ownership FactSet Ownership database collects global equity ownership data for institutions, mutual fund portfolios, and insiders/stake holders. Detailed ownership data can be extracted by company or by holder (institution, mutual fund, and insider/stake). The LSD_Ownership function is used for extracting one or more data items from the FactSet Ownership database for one or multiple securities or holders.

FQL

2.3.3 Other FactSet Functions

The Standard Factlets below are used for Screening data, Economics data and FQL data. For the exact input syntax, the FactSet Sidebar dialog box can be used.

Factlet FactSet syntax used by factlet

TickHistory TickHistory is used for extracting real-time trading details for a specific security. The data comes from FactSet’s Time and Sales database, which provides history of quotes and trades for a trailing 60 days, or up to 1 year with an additional subscription.

FQL

Streaming Realtime Exchange Data Requires an additional subscription and FactSet plugin version 3.0+ for MATLAB and 3.1+ for R/Developer’s Toolkit The realtime function is used to stream realtime exchange data and will update with each trade.

FQL

Documents Requires an additional subscription and FactSet plugin version 3.1+ The Documents service provides access for the retrieval of news stories, investment research reports, filings, and transcripts. When requested, summary information of the documents will be returned, including an http URL to access the resulting documents.

FQL

Snapshot Requires an additional subscription and FactSet plugin version 3.1+ The Snapshot service provides access to streaming exchange data and allows the “snap” of real-time prices at the user’s request. When the command is run, a list of all available exchange data items will be returned by default.

FQL

F.Cancel() Requires FactSet plugin version 3.2+ The F.Cancel() function allows the user to manually cancel all requests on the backend, which will allow for another request to be made.

FactSet Research Systems Inc. Copyright © 2015 FactSet Research Systems Inc. All rights reserved. www.factset.com

10 | P a g e

Please consider Chapter 2.1 regarding FQL vs Screening when selecting an individual factlet to retrieve data.

2.4 The “Ideal” Data Structure There is no “ideal” data structure, but there are some general guidelines that will help the user. When making OnDemand data requests using a factlet, it is important to consider memory limitation of any statistical package storing data. FactSet defines one data request as a request that generates a response limited to 1 million data points. A large data request that is beyond the 1 million data points would need to be broken down into smaller pieces in order to move it and then store it permanently. Requests that are too large take too long to satisfy and performance suffer. The Scripts in the Appendix provides an example of breaking down a request, with comments added to explain each line of the script. The OnDemand MATLAB User Guide is available in Online Assistant page 15262 and the OnDemand R User Guide is available in Online Assistant page 15239 for further examples.

FactSet Research Systems Inc. Copyright © 2015 FactSet Research Systems Inc. All rights reserved. www.factset.com

11 | P a g e

Chapter 3. Speed of OnDemand Data Requests This chapter provides a breakdown of the steps involved in making an OnDemand data request using factlets. Each step is described in delivering the FactSet data to the statistical package and factors that may be affecting the speed of those requests.

3.1 Factlet Request The OnDemand factlet data requests are made via theInternet. When a request is created from the client’s application, using the FactSet DataDirect technology a URL call is made, which goes to the FactSet OnDemand API.

The client’s request is sent over the Internet as an HTTPS request to the FactSet OnDemand servers. Then the request is sent to the FactSet databases, which include the wide range of data, such as Fundamentals, Estimates, Ownership, Economics, or Ownership. The fetched data is then returned and parsed along the same path to the client’s application. The following are the steps involved in delivering data from FactSet, when making an OnDemand request in a statistical package:

1. Local function in the statistical package takes the request and forms a URL POST request upload document.

2. The HTTPS POST request is made by the FactSet API (Kratos.dll) to the OnDemand servers.

3. The FactSet OnDemand servers analyze the request and collects data from various databases.

4. The data returned in step 3 is analyzed to ensure that the dates and identifiers are aligned across the various datasets downloaded.

5. The response to the POST request is downloaded to a local stat package function. It takes a response document and parses it into a native statistical package data structure.

3.1.1 OnDemand factlet request compared to Excel Data Downloading

The OnDemand factlet request and Excel Data Downloading take very different approaches but fundamentally rely on the same FQL engine to retrieve data. It is important to note that the OnDemand plugin was developed to simplify data downloading directly into a third party application and may have speed differences compared to Excel data downloading.

Excel Data Downloading lets you create customized spreadsheet reports that display information from databases on FactSet. The template is a spreadsheet in which you specify companies or securities, request the exact information from FactSet that you want displayed for the companies.

FactSet Research Systems Inc. Copyright © 2015 FactSet Research Systems Inc. All rights reserved. www.factset.com

12 | P a g e

OnDemand Factlet Request

• Called programmatically by calling a function with arguments.

• Interact with statistical package to make data requests.

• Factlet reports are used for retrieving FactSet data.

• Uses internet to hit the DataDirect servers.

• Retrieved data parsed into stat package data structure.

Excel Data Downloading

• Called by entering formula into an Excel template.

• Template is used to create a report that includes all the data and formatting you requested or specified in your template.

• Data delivered as an XLS file.

• Fetches data from mainframe using internet or WAN)

Please note the additional step of parsing the data into a statistical package friendly format can create differences in retrieval times between the two methods.

3.2 Factors Affecting Speed of OnDemand Requests There are a number of factors that affect the speed of retrieving OnDemand data requests.

3.2.1 System Factors on Client’s PC

Components within your computer, such as system load, internet bandwidth, application memory and computer configuration variables are some of the system factors that affect the speed of retrieving and parsing OnDemand data requests.

3.2.2 Fetching and Parsing of Data

During the factlet request process, the primary allocation of time for the data transfer takes place in two operations: fetch (data collection and alignment by FactSet server) and parsing into native data structure (in stat package on local PC). System load on the FactSet servers is determined by the number of users and time of day, and can have a significant effect on the time it takes to fetch data. The following examples provide a breakdown of the difference in time using different combinations of splitting up a sample request.

3.2.3 ExtractFormulaHistory and ExtractDataSnapshot In this example using the ExtractFormulaHistory factlet; price and trading volume for the constituents of STOXX 600 over the last three years are being extracted. F.ExtractFormulaHistory(ids,'p_price,p_volume_day','0:-3y:d')

The ids variable is the constituents of STOXX 600 split up in different numbers of iterations, where 1 iteration means that all 600 ids are requested at once, 4 means that 150 ids are requested in each call etc.

13 | Copyright © FactSet Research Systems Inc. All rights reserved

Number of Iterations Total Time (s)2

1 123.09358

4 116.99985

6 112.32798

10 122.26546

As seen in the table it is more efficient, to a certain point, to split up a request rather than requesting all data in one call. The optimal number of iterations is dependent on number of items, length of history and other factlet specific parameters. The same trend can be noticed for ExtractDataSnapshot requests split up on dates. In the below example using ExtractDataSnapshot the constituents of STOXX and their price, volume and market value is requested over the last 18 months on a daily frequency. F.ExtractDataSnapshot(ids,'p_price,p_volume_day','sd:ed:frq')

Iterations in this case is made on dates, 1 iteration means the full 18 months of data in one request, 2 iterations means 9 months data in one call etc.

Number of Iterations Total Time (s)

1 323.549

2 313.377

3 309.340

6 314.215

For large requests it will be more efficient to split the request in multiple smaller calls. For ExtractFormulaHistory it is best to iterate over IDs. For ExtractDataSnapshot it is more efficient to iterate over dates.

As noted above, there are no hard and fast rules, so once you start to work on the efficiency of you application, its best to try a few approaches and map the results to see which works the best.

2 Based on average numbers

14 | Copyright © FactSet Research Systems Inc. All rights reserved

3.3 Tips to make the requests more efficient:

3.3.1 Time-series and static data

If both time-series data (such as price) and static data (such as company name) are needed, consider splitting up the request to not request static data as a time-series. In the below example price, volume and company name is requested for 3 years on a daily basis. If the static filed is broken out in a separate call the combined time will be quicker. This gets more important the more history is requested. F.ExtractFormulaHistory(ids,'p_name,p_price,p_volume_day','0:-3ay:d')

The above example takes longer than the two requests below combined where the static name field is broken out in a separate request. F.ExtractFormulaHistory(ids,'p_price,p_volume_day','0:-3ay:d') F.ExtractFormulaHistory(ids,'p_name','0')

3.3.2 Time-series data of different frequencies

If the requested data is of mixed frequencies it will be more efficient to break up the call to use one request per frequency: F.ExtractFormulaHistory(ids,'p_price,ff_sales,ff_eps','0:-3ay:d')

Instead of requesting all data items on daily basis as above it is more efficient to divide the items in different requests depending on the items’ frequency as in the below examples. F.ExtractFormulaHistory(ids,'p_price','0:-3ay:d') F.ExtractFormulaHistory(ids,'ff_sales,ff_eps','0:-3ay:y')

15 | Copyright © FactSet Research Systems Inc. All rights reserved

Chapter 4. FactSet OnDemand Glossary Factlet Factlets are server-based functions that encapsulate business logic and data

collection procedures. A factlet can handle a simple data request or can invoke complex application logic.

Request Result The data items that are requested, along with an identifier and date, are

stored in a structure that is returned. Entities (securities, indices, etc.) and the time dimension are stored in arrays, either separately or combined together into one.

Interface Function A function in the stat package that takes the parameters specified by the

client makes the call to the factlet and returns the results as a data object. FactSet OnDemand FactSet OnDemand provides synchronous access to FactSet factlets via the

standard HTTPS protocol. Data can be returned in a number of formats, such as XML or CSV file. There are many reports and services available. A user can make custom requests by changing the request URL to contain the needed parameters.

FQL FQL (FactSet Query Language) is a proprietary data retrieval language used

to access FactSet data. Requesting data with FQL is powerful, flexible, and versatile. Some advantages of FQL include:

The ability to specify dates for any database using the same formats. With FQL, date formats are flexible. You can use a number of consistent date formats (defined by FQL) for all databases which makes using and combining data from different databases easier than ever. The ability to iterate items, formulas, and functions at any frequency. With FQL, you can iterate items, formulas, and functions at any frequency. For example, you can request a series of weekly price to earnings ratios

To download the Introduction to FQL manual see the FactSet Online Assistant page 1961.

FactSet Workstation FactSet platform that is installed on a client’s desktop and provides an

interface to access content and analytical tools to easily examine a range of data, including prices, financials, estimates, research reports, news, and a client’s proprietary data. The same data that is accessible in a workstation can be extracted in the statistical package using the factlet reports.

Analytical tools include an interface for performing company analysis, viewing market data in real time, generating investment ideas, and managing portfolios.

16 | Copyright © FactSet Research Systems Inc. All rights reserved

Online Assistant Online Assistant is a utility available in the FactSet workstation and is a rich information network designed to provide a one-stop source for comprehensive documentation on all of FactSet's applications and databases.

Screening Language The FactSet Screening language is way to efficiently extract data for a large

universe of securities for one date. By default, the Screening syntax does not allow iteration through multiple dates and therefore cannot be used to return a time series of data with a single request code. To request data as of a single historical date, a date must be specified. If a date is not specified, data is returned from the most recent time period.

Relative Dates Relative dates represent a date relative to the most recently updated

period. For example, 0 (zero) represents the most recently updated period; -1 represents the time period prior to the most recently updated.

The "zero date" is determined by the default time period or the natural

frequency of the data being requested. Zero (0), when used with monthly data, indicates the most recent month-end. Negative one (-1), when used with annual data, indicates one fiscal year prior to the most recently-updated fiscal year.

There are many options for adjusting the periods associated with relative dates. Simply add one of the following characters to the relative date:

D 0D is the most recent trading day, -1D is one trading day prior

AW 0AW is the most recent trading day, -1AW is the one actual week (7 days) prior to the most recent trading day

W 0W is the last day of the most recent trading week (usually Friday), -1W is the last trading day of the prior week

AM 0AM is the most recent trading day, -1AM is the same day, one actual month prior

M 0M is the last trading day of the most recent month, -1M is the last trading day of the prior month

AQ 0AQ is the most recent trading day, -1AQ is the same day 3 months prior

Q 0Q is the last trading day of the company's most recent fiscal quarter, -1Q is the last day of the prior fiscal quarter

CQ 0CQ is the last trading day of the most recent calendar quarter (March, June, September, or December), -1CQ is the last trading day of the prior calendar quarter

AY 0AY is the most recent trading day, -1AY is one actual year (365 days) prior

Y 0Y is the last trading day of the company's most recent fiscal year, -1Y is the last trading day of the prior fiscal year

CY 0CY is the last trading day of the most recent calendar year (the last trading day in December), -1CY is the last trading day of the prior calendar year

17 | Copyright © FactSet Research Systems Inc. All rights reserved

Absolute Dates Absolute dates indicate a specific day, month-end, fiscal quarter-end, calendar quarter-end, fiscal year-end, or calendar year-end as depicted in the examples below

▪ A day: 20140128, 01/28/2014 ▪ A month-end: 6/1996, 11/2009 ▪ A fiscal quarter-end: 2002/3F, 2014/1F ▪ A calendar quarter-end: 1996/1C. 2012/3C ▪ A fiscal year-end: 1998, 2013

Data Item Data Item requested through either FQL or Screening code. Sidebar Sidebar is a FactSet application for identifier and formula lookup. Users can

screen by company name to find identifiers and descriptions to file the data items they want. It also understands the arguments for the FQL or screening call. OnDemand Sidebar knows which factlet to call as well.

18 | Copyright © FactSet Research Systems Inc. All rights reserved

Appendix Script 1: Example of MATLAB Script to Split up a Request

% Breakup benchmark into several smaller requests

numChunks = 9; % Edit number of chunks, get CUSIPS

data = F.ExtractBenchmarkDetail('SP50','','');

% Get just the securities

cellArrayOfSecurities = data.SECURITY_ID;

% Figure out how to make a square cell (padding required)

numItemsPerRow = ceil( length(cellArrayOfSecurities)/numChunks );

totalItems = numChunks * numItemsPerRow; % Using ceil to pad

padsNeeded = totalItems - length(cellArrayOfSecurities);

padding = num2cell(nan(1,padsNeeded)); % Make padding matrix

cellArrayOfSecurities = [cellArrayOfSecurities{:} padding]; % Add padding

requestMatrix = reshape( cellArrayOfSecurities, ... % Reshape matrix to rect

numChunks, numItemsPerRow );

removeNansFromCellFn = @(x) all(isnan(x(:))); % Declare function clear NaNs

result = [];

for i=1:numChunks, % Fetch each chunk in order

cellArrayOfIds = requestMatrix( i,1:end ); % Dont forget to strip NaNs

cellArrayOfIds(cellfun(removeNansFromCellFn, cellArrayOfIds)) = [];

currentResult = F.ExtractDataSnapshot(cellArrayOfIds, ...

'p_name,p_price,p_volume,fg_eps','');

result = [result currentResult]; %#ok And concatentate results

end

[sx,sx]=sort([result.p_name]); % Sort on names

result=result(sx); % Arrange

for i = 1:length(result), % Display

fprintf('%30s, Price = %6.2f, Volume = %6.2f, EPS = %6.2f\n', ...

result(i).p_name{:}, result(i).p_price , ...

result(i).p_volume , result(i).fg_eps );

end

19 | Copyright © FactSet Research Systems Inc. All rights reserved

Script 2: Example of R Script to Split up a Request

## Get SP500 benchmark

dfBenchmark = F.ExtractBenchmarkDetail('SP50','','')

## Filter and just get CUSIPS

dfBenchmarkCUSPIPs = dfBenchmark[3]

## Number of CUSIPS

numCUSIPSs = nrow(dfBenchmarkCUSPIPs)

## Decide how many requests to break it up into

numOfRequestChunks = 7

## Create a list of indicies from the benchmark

listOfIndicies = c()

for( i in 1:nrow( dfBenchmarkCUSPIPs ) ){

listOfIndicies = c( listOfIndicies, dfBenchmarkCUSPIPs[[1]][[i]] );

}

## Split up vectors into chunks - keep even as possible

chunks = split(listOfIndicies,

rep(1:numOfRequestChunks,

ceiling(length(listOfIndicies)/numOfRequestChunks),

length.out = length(listOfIndicies)))

dfResult = NULL; # Declare blank data frame

for( i in 1:length(chunks) ){ # For each chunk and get data

currentIDsString = paste(chunks[[i]], collapse = ", "); #Build and ID string

currentDataChunk =

F.ExtractDataSnapshot( currentIDsString, 'p_name,p_price,p_volume,fg_eps','')

if( i != 1 ){ ## Then append all the data together into one final frame

dfResult<-rbind(dfResult, currentDataChunk)

} else {

dfResult<-currentDataChunk

}

}

dfResult = dfResult[order(dfResult$p.name),]

cat('Final result, dfResult, has ', nrow( dfResult ), ' rows and ', ncol(dfResult),' columns.\n',sep='');

20 | Copyright © FactSet Research Systems Inc. All rights reserved

FactSet Consulting Services

North America - FactSet Research Systems Inc.

United States and Canada +1.877.FACTSET

Europe – FactSet Limited

United Kingdom 0800.169.5954

Belgium 800.94108

France 0800.484.414

Germany 0800.200.0320

Ireland, Republic of 1800.409.937

Italy 800.510.858

Netherlands 0800.228.8024

Norway 800.30365

Spain 900.811.921

Sweden 0200.110.263

Switzerland 0800.881.720

European and Middle Eastern countries not listed above +44.(0)20.7374.4445

Pacific Rim- FactSet Pacific Inc.

Japan Consulting Services (Japan and Korea) 0120.779.465 (Within Japan) +81.3.6268.5200 (Outside Japan)

Hong Kong Consulting (Hong Kong, China, India, Malaysia, Singapore, Sri Lanka, and Taiwan)

+852.2251.1833

Sydney Consulting Services 1800.33.28.33 (Within Australia) +61.2.8223.0400 (Outside Australia)

E-mail Support

[email protected]