Matlab Datafeed Toolbox Manual
Matlab Datafeed Toolbox Manual
R2012b
Product enhancement suggestions Bug reports Documentation error reports Order status, license renewals, passcodes Sales, pricing, and general information
508-647-7000 (Phone) 508-647-7001 (Fax) The MathWorks, Inc. 3 Apple Hill Drive Natick, MA 01760-2098
For contact information about worldwide offices, see the MathWorks Web site. Datafeed Toolbox Users Guide COPYRIGHT 19992012 by The MathWorks, Inc.
The software described in this document is furnished under a license agreement. The software may be used or copied only under the terms of the license agreement. No part of this manual may be photocopied or reproduced in any form without prior written consent from The MathWorks, Inc. FEDERAL ACQUISITION: This provision applies to all acquisitions of the Program and Documentation by, for, or through the federal government of the United States. By accepting delivery of the Program or Documentation, the government hereby agrees that this software or documentation qualifies as commercial computer software or commercial computer software documentation as such terms are used or defined in FAR 12.212, DFARS Part 227.72, and DFARS 252.227-7014. Accordingly, the terms and conditions of this Agreement and only those rights specified in this Agreement, shall pertain to and govern the use, modification, reproduction, release, performance, display, and disclosure of the Program and Documentation by the federal government (or other entity acquiring for or through the federal government) and shall supersede any conflicting contractual terms or conditions. If this License fails to meet the governments needs or is inconsistent in any respect with federal procurement law, the government agrees to return the Program and Documentation, unused, to The MathWorks, Inc.
Trademarks
MATLAB and Simulink are registered trademarks of The MathWorks, Inc. See www.mathworks.com/trademarks for a list of additional trademarks. Other product or brand names may be trademarks or registered trademarks of their respective holders.
Patents
MathWorks products are protected by one or more U.S. patents. Please see www.mathworks.com/patents for more information.
Revision History
December 1999 June 2000 December 2000 February 2003 June 2004 August 2004 September 2005 March 2006 September 2006 March 2007 September 2007 March 2008 October 2008 March 2009 September 2009 March 2010 September 2010 April 2011 September 2011 March 2012 September 2012
First printing Online only Online only Online only Online only Online only Second printing Online only Online only Third printing Online only Online only Online only Online only Online only Online only Online only Online only Online only Online only Online only
New for MATLAB 5.3 (Release 11) Revised for Version 1.2 Revised for Version 1.3 Revised for Version 1.4 Revised for Version 1.5 (Release 14) Revised for Version 1.6 (Release 14+) Revised for Version 1.7 (Release 14SP3) Revised for Version 1.8 (Release 2006a) Revised for Version 1.9 (Release 2006b) Revised for Version 2.0 (Release 2007a) Revised for Version 3.0 (Release 2007b) Revised for Version 3.1 (Release 2008a) Revised for Version 3.2 (Release 2008b) Revised for Version 3.3 (Release 2009a) Revised for Version 3.4 (Release 2009b) Revised for Version 3.5 (Release 2010a) Revised for Version 4.0 (Release 2010b) Revised for Version 4.1 (Release 2011a) Revised for Version 4.2 (Release 2011b) Revised for Version 4.3 (Release 2012a) Revised for Version 4.4 (Release 2012b)
Contents
Getting Started
1
Product Description . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Key Features . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . About Data Servers and Data Service Providers . . . . . . Supported Data Service Providers . . . . . . . . . . . . . . . . . . . . Data Server Connection Requirements . . . . . . . . . . . . . . . . 1-2 1-2 1-3 1-3 1-4
2
Communicate with Data Servers . . . . . . . . . . . . . . . . . . . . Connect to the Bloomberg Data Server . . . . . . . . . . . . . . Connection Object Properties . . . . . . . . . . . . . . . . . . . . . . Retrieve Connection Properties . . . . . . . . . . . . . . . . . . . . . . Retrieve Data on a Security . . . . . . . . . . . . . . . . . . . . . . . . . Disconnect from Data Servers . . . . . . . . . . . . . . . . . . . . . . X_TRADER Price Update . . . . . . . . . . . . . . . . . . . . . . . . . . . X_TRADER Price Update Depth . . . . . . . . . . . . . . . . . . . . . X_TRADER Order Submission . . . . . . . . . . . . . . . . . . . . . . 2-2 2-3 2-5 2-5 2-6 2-7 2-8 2-10 2-14
3
About This Example . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Retrieve Field Data . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Retrieve Time-Series Data . . . . . . . . . . . . . . . . . . . . . . . . . . Retrieve Historical Data 3-2 3-3 3-4 3-5
...........................
4
Introduction . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Retrieve Data with the Datafeed Dialog Box . . . . . . . . . Connecting to Data Servers . . . . . . . . . . . . . . . . . . . . . . . . . Retrieving Data . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Setting Overrides . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Obtain Ticker Symbol with the Datafeed Securities Lookup Dialog Box . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 4-2 4-3 4-4 4-5 4-6
4-9
Function Reference
5
Bloomberg . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Datastream . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . eSignal . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 5-2 5-3 5-4
vi
Contents
FactSet . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . FRED . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Haver Analytics . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Interactive Data Pricing and RemotePlus . . . . . . . . . . . . IQFEED
5-5 5-6 5-7 5-8 5-9 5-10 5-11 5-12 5-13 5-14 5-15 5-16
..........................................
Kx Systems . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Reuters . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . SIX Financial Information . . . . . . . . . . . . . . . . . . . . . . . . . . Thomson Reuters Tick History . . . . . . . . . . . . . . . . . . . . . . Reuters Newscope . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Yahoo! . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Trading Technologies . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
6
Examples
A
Retrieving Connection Properties . . . . . . . . . . . . . . . . . . . A-2
vii
Index
viii
Contents
1
Getting Started
Product Description on page 1-2 About Data Servers and Data Service Providers on page 1-3
Getting Started
Product Description
Access financial data from data service providers Datafeed Toolbox provides access to current, intraday, historical, and real-time market data from leading financial data providers. By integrating these data feeds into MATLAB, you can develop realistic models that reflect current financial and market behaviors. The toolbox also provides functions to export MATLAB data to some data service providers. You can establish connections from MATLAB to retrieve historical data or subscribe to real-time streams from data service providers. With a single function call, the toolbox lets you customize queries to access all or selected fields from multiple securities over a specified time period. You can also retrieve intraday tick data for specified intervals and store it as time series data.
Key Features
Current, intraday, historical, and real-time market data access Customizable data access by security lists, time periods, and other fields Intraday tick data retrieval as a time series Real-time security data access Bloomberg, Thomson Reuters, and other data server provider support Haver Analytics and Federal Reserve Economic Data (FRED) economic data support
1-2
1-3
Getting Started
See the MathWorks Web site for the system requirements for connecting to these data servers.
For more information about how to obtain required software, contact your data server sales representative.
1-4
FactSet Federal Reserve Economic Data Thomson Reuters Datastream Thomson Reuters Tick History Yahoo! IQFEED For information on how to specify these settings, see Specify Proxy Server Settings for Connecting to the Internet.
following command:
rmdsconfig
2 Load the sample configuration file. a Click File > Import > File. b Select the file
matlabroot\toolbox\datafeed\datafeed\sampleconfig.xml.
3 Modify sampleconfig.xml based on the site-specific settings that you
1-5
Getting Started
with the namespace MyNS to the connection list for the connection remoteConnection.
1-6
5 If you are not DACS-enabled, disable DACS. a Add the following to your connection configuration:
connection configuration:
dacs_GenerateLocks=false
For more information, see the reuters function reference page. Troubleshooting Issues with Reuters Configuration Editor. These errors occur when you attempt to use the Reuters Configuration Editor to configure connections on a machine on which an XML Parser is not installed.
java com.reuters.rfa.tools.config.editor.ConfigEditor org.xml.sax.SAXException: System property org.xml.sax.driver not specified at org.xml.sax.helpers.XMLReaderFactory.createXMLReader(Unknown Source) at com.reuters.rfa.tools.config.editor.rfaConfigRuleDB.rfaConfi gRuleDB.java:56) at com.reuters.rfa.tools.config.editor.ConfigEditor.init (ConfigEditor.java:86) at (com.reuters.rfa.tools.config.editor.ConfigEditor. (ConfigEditor.java:61) at com.reuters.rfa.tools.config.editor.ConfigEditor.main (ConfigEditor.java:1303)
To address this problem, download an XML parser file, and then include a path to this file in your CLASSPATH environment variable. The following example shows how to set your CLASSPATH environment variable to include the XML parser file C:\xerces.jar (downloaded from http://xerces.apache.org/xerces-j/index.html):
set CLASSPATH=%CLASSPATH%;... matlabroot\toolbox\datafeed\datafeed\config_editor.jar;...
1-7
Getting Started
c:\xerces.jar
1-8
2
Communicate with Financial Data Servers
Communicate with Data Servers on page 2-2 Connect to the Bloomberg Data Server on page 2-3 Connection Object Properties on page 2-5 Disconnect from Data Servers on page 2-7 X_TRADER Price Update on page 2-8 X_TRADER Price Update Depth on page 2-10 X_TRADER Order Submission on page 2-14
2-2
blpapi3.jar to the MATLAB Java classpath. Use the javaaddpath function or edit your classpath.txt file.
Note With the Bloomberg V3 release, there is a Java archive file from Bloomberg that you need to install for blp and other commands work correctly. If you already have blpapi3.jar downloaded from Bloomberg, you can find it in your Bloomberg directories at: ..\blp\api\APIv3\JavaAPI\lib\blpapi3.jar or ..\blp\api\APIv3\JavaAPI\v3.3.1.0\lib\blpapi3.jar. If blpapi3.jar is not downloaded from Bloomberg, you can download it as follows:
a In your Bloomberg terminal, type WAPI {GO} to display the
Java classpath using javaaddpath. This is must be done for every session of MATLAB. To avoid repeating this at every session, you can add javaaddpath to your startup.m file or you can add the full path for blpapi3.jar to your classpath.txt file.
2 Enter the following command:
c = blp
You are now connected to the Bloomberg Data Server. Your output appears as follows:
c = session: [1x1 com.bloomberglp.blpapi.Session]
2-3
2-4
You can get the values of the individual properties by using the property names:
get(c,{'port','session'}) ans = port: 8194.00 session: [1x1 com.bloomberglp.blpapi.Session]
For example, return just the connection handle with the ipaddress argument:
ip = get(c,{'ipaddress'}) ip = localhost
2-5
To return data on a particular field for a range of dates, use the blp.history method:
data = history(c,'IBM US Equity','Last_Price','07/15/2009','08/02/2009')
2-6
You must have previously created the connection object with one of the connection functions.
2-7
createNotifier(X);
The event notifier is the X_TRADER mechanism that lets you define MATLAB functions to use as callbacks for specific events.
Create an instrument.
Assign callbacks for validating or invalidating an instrument, and for handling data updates for a previously validated instrument.
X.InstrNotify(1).registerevent({'OnNotifyFound',... @(varargin)ttinstrumentfound(varargin{:})}); X.InstrNotify(1).registerevent({'OnNotifyNotFound',... @(varargin)ttinstrumentnotfound(varargin{:})}); X.InstrNotify(1).registerevent({'OnNotifyUpdate',... @(varargin)ttinstrumentupdate(varargin{:})});
Monitor events.
2-8
Set the update filter to monitor only the desired fields. Here, monitor events where the last price, last quantity, the previous last quantity, and the change in prices are updated. Listen for event data.
X.InstrNotify(1).UpdateFilter = 'Last$,LastQty$,~LastQty$,Change$'; X.Instrument(1).Open(0);
The last command tells X_TRADER to start monitoring the attached instruments using the specified event settings.
Close the connection.
X_TRADER Price Update Depth on page 2-10 X_TRADER Order Submission on page 2-14
2-9
The event notifier is the X_TRADER mechanism that lets you define MATLAB functions to use as callbacks for specific events.
Create an instrument.
createInstrument(X,'Exhange','CME','Product','ES','ProdType','Future',... 'Contract','Dec11','Alias','PriceInstrumentDepthUpdate');
X.InstrNotify(1).AttachInstrument(X.Instrument(1));
You can assign one or more instruments to a notifier, and a notifier can have one or more instruments attached to it.
Define events.
Assign callbacks for validating or invalidating an instrument, and updating the example order book window.
X.InstrNotify(1).registerevent({'OnNotifyFound',... @ttinstrumentfound}); X.InstrNotify(1).registerevent({'OnNotifyNotFound',...
2-10
2-11
uicontrol('Style','text','String','Change',... 'Position',[3*bspc+2*bwid 2*bspc+bhgt bwid bhgt]); ui.Last = uicontrol('Style','text','Tag','',... 'Position',[bspc bspc bwid bhgt]); ui.Quantity = uicontrol('Style','text','Tag','',... 'Position',[2*bspc+bwid bspc bwid bhgt]); ui.Change = uicontrol('Style','text','Tag','',... 'Position',[3*bspc+2*bwid bspc bwid bhgt]);
Create a table.
setappdata(0,'TTOrderBookHandle',uibook) setappdata(0,'TTOrderBookUIData',ui)
Listen for event data.
The last command tells X_TRADER to start monitoring the attached instruments using the specified event settings.
Close the connection.
See Also
2-12
Related Examples
X_TRADER Price Update on page 2-8 X_TRADER Order Submission on page 2-14
2-13
Register event handlers for the order server. The callback ttorderserverstatus is assigned to the event OnExchangeStateUpdate in order to verify that the requested instruments exchange order server is running. Otherwise, no orders can be submitted.
sExchange = X.Instrument.Exchange; X.Gate.registerevent({'OnExchangeStateUpdate',... @(varargin)ttorderserverstatus(varargin{:},sExchange)});
Create an order set.
The OrderSet object is used to send orders to X_TRADER. Set properties of the OrderSet object and detail the level of the order status events. Enable order update and reject (failure) events so you can assign callbacks to handle these conditions.
createOrderSet(X); X.OrderSet(1).EnableOrderRejectData = 1; X.OrderSet(1).EnableOrderUpdateData = 1; X.OrderSet(1).OrderStatusNotifyMode = 'ORD_NOTIFY_NORMAL';
Set position limit checks.
2-14
Set whether the order set checks self-imposed position limits when submitting an order.
X.OrderSet(1).Set('NetLimits',false);
Set a callback function.
Set a callback to handle the OnOrderFilled events. Each time an order is filled (or partially filled), this callback is invoked.
X.OrderSet(1).registerevent({'OnOrderFilled',... @(varargin)ttorderevent(varargin{:},X)});
Enable send orders.
Build an order profile using an existing instrument. The order profile contains the settings that define a submitted order. The valid Set parameters are shown in the following examples.
orderProfile = createOrderProfile(X); orderProfile.Instrument = X.Instrument(1); orderProfile.Customer = '<Default>';
Example: Create a market order.
Create a limit order by setting the OrderType and limit order price.
orderProfile.Set('OrderType','L');
2-15
orderProfile.Set('Limit$','127000');
Example: Create a stop market order.
Create a stop market order, and set the order restriction to stop order and stop price.
orderProfile.Set('OrderType','M'); orderProfile.Set('OrderRestr','S'); orderProfile.Set('Stop$','129800');
Example: Create a stop limit order.
Create a stop limit order, and set order restriction, type, limit price, and stop price.
orderProfile.Set('OrderType','L'); orderProfile.Set('OrderRestr','S'); orderProfile.Set('Limit$','128000'); orderProfile.Set('Stop$','1287500');
Check order server status.
Check the order server status before submitting the order, and add a counter so the example never gets stuck.
nCounter = 1; while ~exist('bServerUp','var') && nCounter < 20 pause(1) nCounter = nCounter + 1; end
Verify order server availability.
Verify that the exchanges order server in question is available before submitting the order.
if exist('bServerUp','var') && bServerUp submittedQuantity = X.OrderSet(1).SendOrder(orderProfile); disp(['Quantity Sent: ' num2str(submittedQuantity)]) else disp('Order Server is down. Unable to submit order')
2-16
end
Close the connection.
X_TRADER Price Update on page 2-8 X_TRADER Price Update Depth on page 2-10
2-17
2-18
3
Example: Retrieve Bloomberg Data
About This Example on page 3-2 Retrieve Field Data on page 3-3 Retrieve Time-Series Data on page 3-4 Retrieve Historical Data on page 3-5
3-2
For example, use the Bloomberg connection object c to retrieve the values of the fields Open and Last_Price:
c = blp d = getdata(c,'IBM US Equity', {'Open';'Last_Price'}) d = Open: 126.2500 Last_Price: 125.1250
3-3
To obtain time-series data for the current day, use the alternate form of the function:
data = timeseries(Connection, Security, floor(now))
To obtain time-series data for IBM using an existing connection c, enter the following:
c = blp data = timeseries(c, 'IBM US Equity', floor(now));
3-4
For example, to obtain the closing price for IBM for the dates July 15, 2009 to August 2, 2009 using the connection c, enter:
c = blp data = history(c, 'IBM US Equity', 'Last_Price',... '07/15/2009', '08/02/2009');
3-5
3-6
4
Datafeed Toolbox Graphical User Interface
Introduction on page 4-2 Retrieve Data with the Datafeed Dialog Box on page 4-3 Obtain Ticker Symbol with the Datafeed Securities Lookup Dialog Box on page 4-9
Introduction
You can use the Datafeed Toolbox Graphical User Interface (GUI) to connect to and retrieve information from some supported data service providers. This GUI consists of two dialog boxes: The Datafeed dialog box The Securities Lookup dialog box
4-2
4-3
4. After the connection is made, click the Data tab to begin data retrieval.
5. Click to close the highlighted connection. 2. Enter IP address of data server or use the default values (Bloomberg data servers only). 1. Enter port number on data server (Bloomberg data servers only).
4-4
2 When the Connected message appears in the Status field, click the Data
tab to begin the process of retrieving data from the data server. For more information, see Retrieving Data on page 4-5.
3 Click the Disconnect button to terminate the session highlighted in the
Current Connections box. For Bloomberg data servers, you must also specify the port number and IP address of the server:
1 Enter the port number on the data server in the Port Number field. 2 Enter the IP address of the data server in the IP Address field. 3 To establish a connection to the Bloomberg data server, follow steps 1
through 3 above. Tip You can also connect to the Bloomberg data server by selecting the Connect button and accepting the default values.
Retrieving Data
The Data tab allows you to retrieve data from the data server as follows:
1 Enter the security symbol in the Enter Security field. 2 Indicate the type of data to retrieve in the Data Selection field. 3 Specify whether you want the default set of data, or the full set:
Select the Default fields button for the default set of data. Select the All fields button for the full set of data.
4 Click the Get Data button to retrieve the data from the data server. 5 (Optional) Click the Override button if you want to set overrides on the
data you request from the data server. For more information, see Setting Overrides on page 4-6. The following figure summarizes these steps.
4-5
2a. Use to find security symbol, if unknown. 2. Enter security symbol if known, (For Bloomberg and or click Add button to add Interactive Data Pricing and Reference Data security to Selected Securities list. data servers only) Security fields.
Setting Overrides
To set overrides on retrieved data:
1 Click the Override button. The Override values dialog box opens.
4-6
2 Select the field to override from the Override fields selection list. 3 Enter the desired override value in the Override value field. 4 Click Add to add the field to override to the Override field settings list. 5 Click Apply to apply overrides to the current session and keep the Override
values dialog box open, or click OK to apply the overrides and close the dialog box. The following figure summarizes these steps.
4-7
3. Click Add to add the field to the Override field settings list.
1. Select field to override. 4a. Apply overrides and close dialog. Return to previous dialog box.
4-8
Obtain Ticker Symbol with the Datafeed Securities Lookup Dialog Box
Obtain Ticker Symbol with the Datafeed Securities Lookup Dialog Box
When requesting data from Bloomberg or Interactive Data Pricing and Reference Datas RemotePlus servers, you can use the Datafeed Securities Lookup dialog box to obtain the ticker symbol for a given security if you know only part of the security name.
1 Click the Lookup button on the Datafeed dialog box Data tab. The
corresponding to the security name you specified display in the Security and Symbol list.
5 Select one or more securities from the list, and then click Select.
The selected securities are added to the Selected Securities list on the Data tab. The following figure summarizes these steps.
4-9
4. Search results returned from data server. This field displays all possible values of company name and ticker symbol. Select desired securities from list.
4-10
5
Function Reference
Bloomberg (p. 5-2) Datastream (p. 5-3) eSignal (p. 5-4) FactSet (p. 5-5) FRED (p. 5-6) Haver Analytics (p. 5-7) Interactive Data Pricing and RemotePlus (p. 5-8) IQFEED (p. 5-9) Kx Systems (p. 5-10) Reuters (p. 5-11) SIX Financial Information (p. 5-12) Thomson Reuters Tick History (p. 5-13) Reuters Newscope (p. 5-14) Yahoo! (p. 5-15) Trading Technologies (p. 5-16) Get Bloomberg financial data Get Thomson Reuters Datastream financial data Get eSignal financial data Get FactSet financial data Get Federal Reserve Economic Data (FRED) financial data Get Haver Analytics financial data Get Interactive Data Pricing and Reference Datas RemotePlus financial data Get IIQFEED financial data Get Kx Systems, Inc. kdb+ financial data Get Reuters financial data Get SIX Financial Information financial data Retrieve data from Thomson Reuters Tick History file Retrieve data from Reuters Newscope sentiment archive file Get Yahoo! financial data X_TRADER market data and order management
Function Reference
Bloomberg
blp blp.category blp.close blp.display blp.eqs blp.fieldinfo blp.fieldsearch blp.get blp.getdata blp.history blp.isconnection blp.realtime blp.stop blp.tahistory blp.timeseries
Bloomberg V3 communications server connection Bloomberg V3 field category search Close connection to Bloomberg V3 data server Display Bloomberg V3 connection object Returns equity screening data from Bloomberg V3 Bloomberg V3 field information Bloomberg V3 field search Get Bloomberg V3 connection properties Current Bloomberg V3 data Bloomberg V3 historical data
true if valid Bloomberg V3
connection Bloomberg V3 real-time data retrieval Unsubscribe real time requests for Bloomberg V3 Returns historical technical analysis from Bloomberg V3 Bloomberg V3 intraday tick data
5-2
Datastream
Datastream
datastream datastream.close datastream.fetch datastream.get
Establish connections to Thomson Reuters Datastream API Close connections to Thomson Reuters Datastream data servers Request data from Thomson Reuters Datastream data servers Retrieve properties of Thomson Reuters Datastream connection objects Verify whether connections to Thomson Reuters Datastream data servers are valid
datastream.isconnection
5-3
Function Reference
eSignal
esig esig.close esig.getdata esig.getfundamentaldata esig.history esig.timeseries
eSignal Desktop API connection Close eSignal connection Current eSignal data Current eSignal fundamenal data eSignal historical data eSignal intraday tick data
5-4
FactSet
FactSet
factset factset.close factset.fetch factset.get factset.isconnection
Establish connections to FactSet data servers Close connections to FactSet data servers Request data from FactSet data servers Retrieve properties of FactSet connection objects Verify whether connections to FactSet data servers are valid
5-5
Function Reference
FRED
fred fred.close fred.fetch fred.get fred.isconnection
Connect to FRED data servers Close connections to FRED data servers Request data from FRED data servers Retrieve properties of FRED connection objects Verify whether connections to FRED data servers are valid
5-6
Haver Analytics
Haver Analytics
haver haver.aggregation haver.close haver.fetch haver.get haver.info haver.isconnection haver.nextinfo havertool
Connect to local Haver Analytics database Set Haver Analytics aggregation mode Close Haver Analytics database Request data from Haver Analytics database Retrieve properties from Haver Analytics connection objects Retrieve information about Haver Analytics variables Verify whether connections to Haver Analytics data servers are valid Retrieve information about next Haver Analytics variable Run Haver Analytics graphical user interface (GUI)
5-7
Function Reference
Connect to Interactive Data Pricing and Reference Datas RemotePlus data servers Close connections to Interactive Data Pricing and Reference Datas RemotePlus data servers Request data from Interactive Data Pricing and Reference Datas RemotePlus data servers Retrieve properties of Interactive Data Pricing and Reference Datas RemotePlus connection objects Verify whether connections to Interactive Data Pricing and Reference Datas RemotePlus data servers are valid
idc.close
idc.fetch
idc.get
idc.isconnection
5-8
IQFEED
IQFEED
iqf iqf.close iqf.history iqf.marketdepth iqf.news iqf.realtime iqf.timeseries
IQFEED Desktop API connection Close IQFEED ports IQFEED asynchronous historical end of period data IQFEED asynchronous level 2 data IQFEED asynchronous news data IQFEED asynchronous level 1 data IQFEED asynchronous historical end of period data
5-9
Function Reference
Kx Systems
kx kx.close kx.exec kx.fetch kx.get kx.insert kx.isconnection
Connect to Kx Systems, Inc. kdb+ databases Close connections to Kx Systems, Inc. kdb+ databases Run Kx Systems, Inc. kdb+ commands Request data from Kx Systems, Inc. kdb+ databases Retrieve Kx Systems, Inc. kdb+ connection object properties Write data to Kx Systems, Inc. kdb+ databases Verify whether connections to Kx Systems, Inc. kdb+ databases are valid Retrieve table names from Kx Systems, Inc. kdb+ databases
kx.tables
5-10
Reuters
Reuters
reuters reuters.addric reuters.close reuters.contrib reuters.deleteric reuters.fetch reuters.get reuters.history reuters.stop rmdsconfig
Create Reuters sessions Create Reuters Instrument Code Release connections to Reuters data servers Contribute data to Reuters datafeed Delete Reuters Instrument Code Request data from Reuters data servers Retrieve properties of Reuters session objects Request data from Reuters Time Series One Unsubscribe securities Reuters Market Data System configuration editor
5-11
Function Reference
SIX Financial Information connection Close connection to SIX Financial Information Current SIX Financial Information data End of day SIX Financial Information data True if valid SIX Financial Information connection SIX Financial Information intraday tick data SIX Financial Information field names to identification string SIX Financial Information identification string to field name
5-12
Connect to Thomson Reuters Tick History Close Thomson Reuters Tick History connection Request Thomson Reuters Tick History data Get Thomson Reuters Tick History connection properties Verify whether Thomson Reuters Tick History connections are valid Status of FTP request for Thomson Reuters Tick History data Submit FTP request for Thomson Reuters Tick History data Retrieve data from Thomson Reuters Tick History file
5-13
Function Reference
Reuters Newscope
rnseloader
5-14
Yahoo!
Yahoo!
yahoo yahoo.builduniverse yahoo.close yahoo.fetch yahoo.get yahoo.isconnection yahoo.trpdata
Connect to Yahoo! data servers Portfolio matrix with total return price data from Yahoo! Close connections to Yahoo! data servers Request data from Yahoo! data servers Retrieve properties of Yahoo! connection objects Verify whether connections to Yahoo! data servers are valid Total return price series data
5-15
Function Reference
Trading Technologies
xtrdr xtrdr.close xtrdr.createInstrument xtrdr.createNotifier xtrdr.createOrderProfile xtrdr.createOrderSet xtrdr.getData
X_TRADER connection Terminate X_TRADER connection Instruments for X_TRADER Instrument notifier for X_TRADER Order profiles for X_TRADER Order set for X_TRADER Current X_TRADER data
5-16
6
Functions Alphabetical List
bloomberg
Purpose
Syntax Description
c = bloomberg c = bloomberg establishes a connection, c, to a Bloomberg data server. It uses port number 8194 and the default internet address provided
Examples
See Also
6-2
bloomberg.close
Purpose
Syntax Arguments
close(Connect)
Connect
Description Examples
See Also
bloomberg
6-3
bloomberg.fetch
Purpose
Syntax
data = fetch(Connect, 'Security') data = fetch(Connect, 'Security', 'HEADER', 'Flag', 'Ident') data = fetch(Connect, 'Security', 'GETDATA', 'Fields', 'Override', 'Values', 'Ident') data = fetch(Connect, 'Security', 'TIMESERIES', 'Date', 'Minutes', 'TickField') data = fetch(Connect, 'Security', 'HISTORY', 'Fields', 'FromDate', 'ToDate', 'Period', 'Currency', 'Ident') ticker = fetch(Connect, 'SearchString', 'LOOKUP', 'Market') data = fetch(Connect, 'Security', 'REALTIME', 'Fields', 'MATLABProg') data = fetch(Connect, 'Security', 'STOP')
Description
For a given security, fetch returns header (default), current, time-series, real time, and historical data via a connection to a Bloomberg data server.
data = fetch(Connect, 'Security') fills the header fields with data
If 'Flag' is 'DEFAULT', fetch fills the header fields with data from the most recent date with a bid, ask, or trade. Alternatively, you could use the command data = fetch(Connect,'Security'). If 'Flag' is 'TODAY', fetch returns the header field data with data from today only. If 'Flag' is 'ENHANCED', fetch returns the header field data for the most recent date of each individual field. In this case, for example, the bid and ask group fields could come from different dates.
6-4
bloomberg.fetch
data = fetch(Connect, 'Security', 'GETDATA', 'Fields', 'Override', 'Values', 'Ident') returns the current market data
for the specified fields of the indicated security. You can further specify the data with the optional Override, Values and Ident arguments. Note If a call to the fetch function with the GETDATA argument encounters an invalid security in a list of securities to retrieve, it returns NaN data for the invalid securitys fields.
data = fetch(Connect, 'Security', 'TIMESERIES', 'Date', 'Minutes', 'TickField') returns the tick data for a single security
for the specified date. You can further specify data with the optional
Minutes and TickField arguments. If there is no data found in the specified range, which must be no more than 50 days, fetch returns an
empty matrix. You can specify TickField as a string or numeric value. For example, TickField = 'Trade' or TickField = 1 returns data for ticks of type Trade. The function dftool('ticktypes') returns the list of intraday tick fields. fetch returns intraday tick data requested with an interval with the following columns: Time Open High Low Value of last tick Volume total value of ticks Total value of ticks for the time range Number of ticks The fetch function returns columns 7 and 8 only if they make sense for the requested field.
6-5
bloomberg.fetch
For todays trade time series aggregated into five-minute intervals, enter:
data = fetch(Connect,'Security','TIMESERIES', ... now, 5, 'Trade') data = fetch(Connect, 'Security', 'HISTORY', 'Fields', 'FromDate', 'ToDate', 'Period', 'Currency', 'Ident') returns historical data for the specified field for the date range FromDate to ToDate. You can set the time period with the optional Period argument
to return a more specific data set. You can further specify returned data by appending the Currency or Ident argument. Note If a call to the fetch function with the HISTORY argument encounters an invalid security in a list of securities to retrieve, it returns no data for any securities in the list.
ticker = fetch(Connect, 'SearchString', 'LOOKUP', 'Market') uses SearchString to find the ticker symbol for a security trading in a designated market. The output ticker is a column vector of possible
ticker values. Note If you supply Ident without a period or currency, enter [] for the missing values.
data = fetch(Connect, 'Security', 'REALTIME', 'Fields', 'MATLABProg') subscribes to a given security or list of securities,
6-6
bloomberg.fetch
function. See pricevol, showtrades, or stockticker for information on the data returned by asynchronous Bloomberg events.
data = fetch(Connect, 'Security', 'STOP') unsubscribes the list of securities from processing Bloomberg real-time events.
Arguments
Connect 'Security'
Bloomberg connection object created with the bloomberg function. A MATLAB string containing the name of a security, or a cell array of strings containing a list of securities, specified in a format recognizable by the Bloomberg server. You can substitute a CUSIP number for a security name as needed. You can only call a single security when using the TIMESERIES flag as well. Note This argument is case sensitive.
'Flag'
A MATLAB string indicating the dates for which to retrieve data. Possible values are: DEFAULT: Data from most recent bid, ask, or trade. If you do not specify a Flag value, fetch uses the default value of 'DEFAULT'. TODAY: Todays data only. ENHANCED: Data from most recent date of each individual field. (Optional) Currency in which the fetch function returns historical data. A list of valid currencies appears in the file @bloomberg/bbfields.mat. Default = []. (Optional) Security type identifier. A list of valid currencies appears in the file @bloomberg/bbfields.mat. Default = []. A MATLAB string or cell array of strings specifying specific fields for which you request data. A list of valid currencies appears in the file @bloomberg/bbfields.mat. Default = [].
'Currency'
'Ident' 'Fields'
6-7
bloomberg.fetch
(Optional) String or cell array of strings containing override field list. Default = []. (Optional) String or cell array of strings containing override field values. Date string, serial date number, or cell array of dates that specifies dates for the time-series data. Specify now to retrieve todays time-series data. (Optional) Numeric value for tick interval in minutes. You cannot specify a fractional value for 'Minutes'. The smallest value you can specify is 1. (Optional) You can specify a string or numeric value for this field. For example, TickField = 'Trade' or TickField = 1 return data for ticks of type Trade. Use the command dftool('ticktypes') to return the list of intraday tick fields. Beginning date for historical data. Note You can specify dates in any of the formats supported by datestr and datenum that display a year, month, and day.
'FromDate'
'ToDate' 'Period'
End date for historical data. (Optional) Period of the data. A MATLAB three-part string with the format:
'Frequency Days Data' Frequency Values:
6-8
bloomberg.fetch
Days Values:
o: Omit all days for which there is no data (default) i: Include all trading days a: Include all calendar days
Data Values:
b: Report missing data using Bloomberg (default) s: Show missing data as last found value n: Report missing data as NaN For example, 'dan' returns daily data for all calendar days, reporting missing values as NaN. If a value is unspecified, fetch returns a default value. Note If you do not specify a value for Period, fetch uses default values.
'Currency'
6-9
bloomberg.fetch
'Market'
A MATLAB string indicating the market in which a particular security trades. Possible values are: Comdty: (Commodities) Corp: (Corporate bonds) Equity: (Equities) Govt: (Government bonds) Index: (Indexes) M-Mkt: (Money Market securities) Mtge: Mortgage-backed securities) Muni: (Municipal bonds) Pfd: (Preferred stocks)
Examples
6-10
bloomberg.fetch
See Also
6-11
bloomberg.get
Purpose
Syntax Arguments
Connect
Bloomberg connection object created with the bloomberg function. (Optional) A MATLAB string or cell array of strings containing property names. Property names are: 'Connection' 'IPAddress' 'Port' 'Socket' 'Version'
PropertyName
Description
value = get(Connect, 'PropertyName') returns a MATLAB structure containing the value of the specified properties for the Bloomberg connection object. value = get(Connect) returns the value for all properties.
Examples
6-12
bloomberg.get
See Also
6-13
bloomberg.getdata
Examples
The command
d = getdata(c,'ABC US Equity',{'LAST_PRICE';'OPEN'})
returns the todays current and open price of the given security. The command
d = getdata(c,'3358ABCD4 Corp',... {'YLD_YTM_ASK','ASK','OAS_SPREAD_ASK','OAS_VOL_ASK'},... {'ASK','OAS_VOL_ASK'},{'99.125000','14.000000'})
See Also
6-14
bloomberg.history
Purpose
Syntax
d = history(c,s,f,fromdate,todate) d = history(c,s,f,fromdate,todate,per) d = history(c,s,f,fromdate,todate,per,cur) d = history(c,s,f,fromdate,todate) returns the historical data for the security list s for the fields f for the dates fromdate to todate.
Description
This method uses the Bloomberg ActiveX interface. For more robust functionality, refer to the bloomberg.fetch method.
d = history(c,s,f,fromdate,todate,per) returns the historical data for the field, f, for the dates fromdate to todate. per specifies the
Daily. Weekly. Monthly. Quarterly. Yearly. Omit all days for which there is no data. Include all trading days. Include all calendar days. Report missing data using Bloomberg default. Show missing data as last found value. Report missing data as Nan.
For example, per = 'dan' returns daily data for all calendar days reporting missing data as NaNs. per = ' n' returns the data using the default periodicity and default calendar reporting missing data as NaNs. If you do not specify per, the method uses default period for the data.
6-15
bloomberg.history
d = history(c,s,f,fromdate,todate,per,cur) returns the historical data for the security list s for the fields f for the dates fromdate to todate based on the given currency, cur. Load the file bloomberg/bbfields to see the list of supported currencies.
Examples
Example 1
The command
d = history(c,'ABC US Equity','LAST_PRICE','8/01/99',... '8/10/99')
returns the closing price for the given dates for the given security using the default period of the data.
Example 2
The command
D = HISTORY(c,'ABC US Equity','LAST_PRICE','8/01/99',... '8/10/99','m')
returns the monthly closing price for the given dates for the given security.
Example 3
The command
D = HISTORY(c,'ABC US Equity','LAST_PRICE','8/01/99',... '8/10/99','m','USD')
returns the monthly closing price converted to US dollars for the given dates for the given security.
Example 4
The command
D = HISTORY(c,'ABC US Equity','LAST_PRICE','8/01/99',... '8/10/99',[],'USD')
6-16
bloomberg.history
returns the closing price converted to US dollars for the given dates for the given security using the default period of the data.
6-17
bloomberg.isconnection
Purpose
Syntax Arguments
x = isconnection(Connect)
Connect
Description Examples
x = isconnection(Connect) returns x = 1 if the connection to the Bloomberg data server is valid, and x = 0 otherwise.
See Also
6-18
bloomberg.isfield
Purpose
Syntax Description
x = isfield(c,f) x = isfield(c,f) returns true if specified field, f, is a valid Bloomberg field and false otherwise. f can be a cell array of strings. c is the
Examples
x = isfield(c,{'LAST_PRICE','VOLUME','OPEN','HIGH'})
returns
x = 1 1 1 1
See Also
6-19
bloomberg.lookup
Purpose
Syntax Description
d = lookup(c,s,market) d = lookup(c,s,market) returns the list of matching securities given the security search string s and market m. This method uses the
Examples
The command
D = LOOKUP(c,'Intl Bus Mac','Equity')
returns the securities along with their ticker symbols matching the search string 'Intl Bus Mac' for the Equity market. Valid market types are: Comdty: (Commodities) Corp: (Corporate bonds) Equity: (Equities) Govt: (Government bonds) Index: (Indexes) M-Mkt: (Money Market securities) Mtge: Mortgage-backed securities) Muni: (Municipal bonds) Pfd: (Preferred stocks)
See Also
bloomberg.fetch | bloomberg.getdata
6-20
bloomberg.realtime
Purpose
Syntax Description
realtime(c,s,f,api) realtime(c,s,f,api) subscribes to a given security or list of securities s requesting the fields f and runs the specified function by api. See the function bloomberg.showtrades for information on the data returned
Examples
The command
realtime(c,'ABC US Equity',{'Last_Trade','Volume'},... 'stockticker')
subscribes to the security ABC US Equity requesting the fields Last_Trade and Volume to update in realtime running the function stockticker.
See Also
6-21
bloomberg.pricevol
Purpose
Syntax Arguments
pricevol(InputList)
InputList
Description
pricevol(InputList) demonstrates the Bloomberg real-time data import functionality, where InputList is an input list of elements as described in the following table. InputList(1) = COM.Bloomberg.Data.1 InputList(2) = 1 InputList(3) = ('Security') InputList(4) = 1 InputList(5) = 2 InputList(6) = {[43.58]} InputList(7) = 0 InputList(8) InputList(9) = 'Data'
Bloomberg handle Event ID Security string Cookie Field number ID Return data for the given tick Status Structure containing the previous fields Event type
The input argument InputList(8) contains the information required to process real-time events.
Examples
Display the most recent Trade and Volume values in a figure window and show the most recent trade with volumes:
c = bloomberg; d = fetch(c, 'ABC US Equity', 'REALTIME', ...
6-22
bloomberg.pricevol
See Also
bloomberg.showtrades | bloomberg.stockticker
6-23
bloomberg.showtrades
Purpose
Syntax Arguments
showtrades(InputList)
InputList
Description
showtrades(InputList) demonstrates the Bloomberg real-time data import functionality, where InputList is an input list of elements as
Bloomberg handle Event ID Security string Cookie Field number ID Return data for the given tick Status Structure containing the above fields Event type
The input argument InputList(8) contains the information required to process real-time events.
Examples
6-24
bloomberg.showtrades
Display the most recent Trade, Bid, Ask, and VWAP (volume-weighted adjusted price), and a list of the most recent trades with volumes:
d = fetch(c, 'GOOG US Equity', 'REALTIME', ... {'Last_Trade','Bid','Ask','Volume','VWAP'},'showtrades');
See Also
bloomberg.pricevol | bloomberg.stockticker
6-25
bloomberg.stockticker
Purpose
Syntax Arguments
stockticker(InputList)
InputList
Description
stockticker(InputList) demonstrates the Bloomberg real-time data import functionality, where InputList is an input list of elements as
Bloomberg handle Event ID Security string Cookie Field number ID Return data for the given tick Status Structure containing the above fields Event type
The input argument InputList(8) contains the information required to process real-time events.
Examples
6-26
bloomberg.stockticker
** EMC US Equity ** 0 @ 12.65 08-Apr-2005 10:24:57 ** IBM US Equity ** 0 @ 88.17 08-Apr-2005 10:24:57 ** NTAP US Equity ** 0 @ 29.02 08-Apr-2005 10:24:57 ** EMC US Equity ** 200 @ 12.66 08-Apr-2005 10:24:58 ** EMC US Equity ** 1400 @ 12.65 08-Apr-2005 10:24:58 ** EMC US Equity ** 3100 @ 12.66 08-Apr-2005 10:25:00 ** IBM US Equity ** 1300 @ 88.17 08-Apr-2005 10:25:00 . . .
See Also
bloomberg.pricevol | bloomberg.showtrades
6-27
bloomberg.stop
Purpose
Syntax Description
To desubscribe all securities and turn off data event handling, use
close(c).
Examples
Example 1
The command
stop(c,'ABC US Equity')
Example 2
The command
stop(c,'ABC US Equity','stockticker')
desubscribes from the security ABC US Equity and turns off data event handling by the function stockticker.
Example 3
The command
STOP(c,'','STOCKTICKER')
6-28
bloomberg.stop
See Also
6-29
bloomberg.timeseries
Purpose
instead.
Syntax
d = timeseries(c,s,f,t) d = timeseries(c,s,f,{startdate,enddate}) d = timeseries(c,s,f,t,b) d = timeseries(c,s,f,t) returns the tick data for the security s for the date t. This method uses the Bloomberg ActiveX interface. For more robust functionality, refer to the bloomberg.fetch method. d = timeseries(c,s,f,{startdate,enddate}) returns the tick data for the security s for the date range defined by startdate and enddate. d = timeseries(c,s,f,t,b) returns the tick data for the security s for the date t in intervals of b minutes for the field, f. Intraday tick data
Description
Examples
Example 1
The command
d = timeseries(c,'ABC US Equity','Last Price',floor(now))
returns todays time series for the given security with the timestamp and tick value.
Example 2
The command
d = timeseries(c,'ABC US Equity','Last Price',floor(now),5)
returns todays Last Price series for the given security aggregated into 5-minute intervals minute intervals.
Example 3
The command
6-30
bloomberg.timeseries
returns the Last Price series for 12/08/2008 and 12/10/2008 for the given security, aggregated into 5-minute intervals.
See Also
6-31
blp
server. You must have a Bloomberg software license for the host on which the Datafeed Toolbox and MATLAB software are running.
c = blp(P,IP,etimeout) makes a connection to the local Bloomberg communications server. P is the port number and IP is the IP address of the local machine. etimeout is the time out value (in milliseconds),
specifying how long the connection is attempted before timing out if the connection cannot be made.
6-32
blp
Note With the Bloomberg V3 release, there is a Java archive file from Bloomberg that you need to install for blp and other Bloomberg commands to work correctly. If you already have blpapi3.jar downloaded from Bloomberg, you can find it in your Bloomberg directories at: ..\blp\api\APIv3\JavaAPI\lib\blpapi3.jar or
..\blp\api\APIv3\JavaAPI\v3.3.1.0\lib\blpapi3.jar. If you have blpapi3.jar, proceed to Step 3.
Java classpath using javaaddpath. This is must be done for every session of MATLAB. To avoid repeating this at every session, you can add javaaddpath to your startup.m file or you can add the full path for blpapi3.jar to your classpath.txt file.
Examples
Establish a connection using the default port of 8194 and 'localhost' as the IP address, with a timeout value of 10 seconds.
c = blp([],[],10000)
6-33
blp
See Also
6-34
blp.category
See Also
6-35
blp.close
6-36
blp.display
6-37
blp.eqs
Examples
See Also
6-38
blp.fieldinfo
See Also
6-39
blp.fieldsearch
See Also
6-40
blp.get
string or cell array of strings containing property names. The property names are session, ipaddress, and port.
v = get(c) returns a structure where each field name is the name of a property of c and each field contains the value of that property.
See Also
6-41
blp.getdata
Purpose Syntax
Description
cats buid cins common cusip isin sedol1 sedol2 sicovam svm ticker (default) wpk
[d,sec] = getdata(c,s,f,o,ov) returns the data for the fields f for the security list s using the override fields o with corresponding override values ov. [d,sec] = getdata(c,s,f,o,ov,name,value,...) returns the data for the fields f for the security list s using the override fields o with corresponding override values ov. name/value pairs are used for additional Bloomberg request settings.
6-42
blp.getdata
Examples
See Also
6-43
blp.history
Purpose Syntax
Description
[d, sec] = history(c, s, f, FromDate, ToDate) returns the historical data for the security list s and the connection object c for the fields f for the dates FromDate to ToDate. Date strings can be input in any format recognized by MATLAB. sec is the security list that maps the order of the return data. The return data, d and sec, is sorted to match the input order of s. [d, sec] = history(c, s, f, FromDate, ToDate, per) returns the historical data for the field, f, for the dates FromDate to ToDate. per specifies the period of the data. For example, per = {'daily','calendar'} returns daily data for all calendar days reporting missing data as NaNs. per = {'actual'} returns the data
using the default periodicity and default calendar reporting missing data as NaNs. The default periodicity depends on the security. If a security is reported on a monthly basis, the default periodicity is monthly. The default calendar is actual trading days. The possible values of per are as follows: Value
daily weekly monthly quarterly semi_annually yearly
6-44
blp.history
Value
actual calendar fiscal non_trading_weekdays all_calendar_days active_days_only previous_value nil_value
Time Period Anchor date specification Anchor date specification Anchor date specification Non trading weekdays Return all calendar days Active trading days only Fill missing values with previous values Fill missing values with NaN
[d, sec] = history(c, s, f, FromDate, ToDate, per, cur) returns the historical data for the security list s for the fields f for the dates FromDate to ToDate based on the given currency, cur. [d, sec] = history(c, s, f, FromDate, ToDate, per, cur, Name, Value, ...) returns the historical data for the security list s for the fields f for the dates FromDate to ToDate based on the given currency, cur. Name,Value pair arguments are used for additional
Tips
Historical requests made before the market opens on the current date that include the current date as the end date may have missing or skewed data. For example, if the last_price and volume are requested, the last_price may not be returned and the volume data for the last, current date may be shifted into the last_price column. For better performance, add the Bloomberg file blpapi3.jar to the MATLAB static Java class path by modifying the file $MATLAB/toolbox/local/classpath.txt. For more information about the static Java class path, see The Static Path.
6-45
blp.history
Definitions
Anchor Date
The anchor date is the date to which all other reported dates are related. For blp.history, for periodicities other than daily, ToDate is the anchor date. For example, if you set the period to weekly and the ToDate is a Thursday, every reported data point would also be a Thursday, or the nearest prior business day to Thursday. Similarly, if you set the period to monthly and the ToDate is the 20th of a month, each reported data point would be for the 20th of each month in the date range.
Examples
Return the closing price for the given dates for the given security using the default period of the data:
[d, sec] = history(c, 'ABC US Equity', ... 'LAST_PRICE', '8/01/2010', '8/10/2010')
Return the monthly closing price for the given dates for the given security:
[d, sec] = history(c, 'ABC US Equity', ... 'LAST_PRICE', '8/01/2010', '12/10/2010', 'monthly')
Return the monthly closing price converted to US dollars for the given dates for the given security:
[d, sec] = history(c, 'ABC US Equity', ... 'LAST_PRICE', '8/01/2010', '12/10/2010', 'monthly', 'USD')
Return the daily closing price converted to US dollars for the given dates for the given security:
[d, sec] = history(c, 'ABC US Equity', ... 'LAST_PRICE', '8/01/2010', '8/10/2010', {'daily',... 'actual', 'all_calendar_days', 'nil_value'}, 'USD')
6-46
blp.history
Return the weekly closing price converted to US dollars for the given dates for the given security. Note that the anchor date is dependent on the date 12/23/1999 in this case. Because this date is a Thursday, each previous value will be reported for the Thursday of the week in question.
[d, sec] = history(c,'ABC US Equity', ... 'LAST_PRICE','11/01/2010','12/23/2010', ... {'weekly'},'USD')
Return the closing price converted to US dollars for the given dates for the given security using the default period of the data. The default period of a security is dependent on the security itself and not set in this function.
[d, sec] = history(c,'ABC US Equity',... 'LAST_PRICE','8/01/2010','9/10/2010',[],'USD')
Return the closing price converted to US dollars for the given dates for the given security using the default period of the data. The prices are adjusted for normal cash and splits.
[d, sec] = history(c,'ABC US Equity','LAST_PRICE',... '8/01/2010','8/10/2010','daily','USD',... 'adjustmentNormal',true,'adjustmentSplit',true)
When specifying Bloomberg override fields, use the 'overrideOption'. The overrideOption argument must be an n-by-2 cell array, where the first column is the override field and the second column is the override value.
reqData3 = history(conn,'AKZA NA Equity', ...
6-47
blp.history
'BEST_EPS_MEDIAN', datenum('01.10.2010', ... 'dd.mm.yyyy'), datenum('30.10.2010','dd.mm.yyyy'), ... {'daily','calendar'}, [],'overrideOption', ... {'BEST_FPERIOD_OVERRIDE', 'BF'}, 'CapChg', true);
See Also
6-48
blp.isconnection
true if valid Bloomberg V3 connection x = isconnection(c) x = isconnection(c) returns true if c is a valid Bloomberg V3 connection and false otherwise. isconnection is not recommended. Use blp instead.
See Also
6-49
blp.realtime
Examples
realtime returns only the most recent eventthat is, data for a single
securitywhen you use it in snapshot mode with no callback. To get data for multiple securities, use:
x = realtime(b, {'IBM US Equity', 'AAPL US EQUITY'}, ... {'Last_Trade', 'Volume', 'Open', 'High', 'Low'})
6-50
blp.realtime
See Also
6-51
blp.stop
6-52
blp.tahistory
Purpose Syntax
Description
data study and element definitions with additional options specified by one or more Name, Value pair arguments.
Input Arguments
Specified security.
fromdate
Periodicity for the historical analysis. For example, per = {'daily','calendar'} returns daily data for all calendar days reporting missing data as NaNs.
6-53
blp.tahistory
per = {'actual'} returns the data using the default periodicity and default calendar reporting missing data as NaNs. Note that the anchor date is dependent on the todate input argument.
Daily.
weekly
Weekly.
monthly
Monthly.
quarterly
Quarterly.
semi_annually
Semi-annually.
yearly
Yearly.
actual
6-54
blp.tahistory
non_trading_weekdays
Non-trading weekdays.
all_calendar_days
Specify optional comma-separated pairs of Name,Value arguments, where Name is the argument name and Value is the corresponding value. Name must appear inside single quotes (' '). You can specify several name and value pair arguments in any order as Name1,Value1,...,NameN,ValueN. Note For information on available Name-Value options for StudyAttributes, see the Bloomberg tool located at C:\blp\API\APIv3\bin\BBAPIDemo.exe.
Examples
Study Request for Bloomberg Technical Analysis Data Over Specified Time Period
List the available Bloomberg studies.
r = tahistory(b)
6-55
blp.tahistory
In this example, the dmi study is used. To display the Name-Value options for StudyAttributes for dmi, use the syntax:
r.dmiStudyAttributes ans = period: priceSourceHigh: priceSourceLow: priceSourceClose: [1x130 [1x149 [1x147 [1x151 char] char] char] char]
Request a dmi study for the security IBM US Equity using the StudyAttributes for priceSourceHigh, priceSourceLow, and priceSourceClose for a specified time period.
d = tahistory(b,'IBM US Equity',floor(now)-30,floor(now),'dmi','all_calendar_days', ... 'period',14,'priceSourceHigh','PX_HIGH','priceSourceLow','PX_LOW','priceSourceClose','PX_LAST')
6-56
blp.tahistory
A successful studyResponse holds information on the requested security. It contains a studyDataTable with one studyDataRow for each interval returned.
See Also
6-57
blp.timeseries
Purpose Syntax
Description
d = timeseries(c,s,t) returns raw tick data, d, for the security s and connection object c for a specific date, t. d = timeseries(c,s,{StartDate,EndDate}) returns raw tick data for the date range defined by StartDate and EndDate. d = timeseries(c,s,t,b,f) returns tick data in intervals of b minutes for the field f. Intraday tick data requested over a certain interval is returned with columns representing Time, Open, High, Low, Last Price, Volume of Ticks, Number of Ticks, and Total Tick Value in the bar. d = timeseries(c,s,t,[],f,{'api'},{'val'}) returns tick data for the field f. The cell array of api options can include any of includeConditionCodes, includeExchangeCodes, and includeBrokerCodes. You can set the corresponding cell array of values to true or false.
Tips
For better performance, add the Bloomberg file blpapi3.jar to the MATLAB static Java class path by modifying the file $MATLAB/toolbox/local/classpath.txt. For more information about the static Java class path, see The Static Path. You cannot retrieve Bloomberg intraday tick data for a date more than 140 days ago.
Examples
6-58
blp.timeseries
Return todays Trade tick series for the given security aggregated into 5-minute intervals:
d = timeseries(c,'ABC US Equity',floor(now),5,'Trade')
Return the Trade tick series for the past 50 days for the given security aggregated into 5-minute intervals:
d = timeseries(c,'ABC US Equity',{floor(now)-50,... floor(now)},5,'Trade')
Return the Bid, Ask, and Trade tick series for the security RIM CT Equity on June 22, 2011 during a specified 5-minute interval, without specifying the aggregation parameter.
d = timeseries(c,'RIM CT Equity',{'06/22/2011 12:15:00',... '06/22/2011 12:20:00'},[],{'Bid','Ask','Trade'})
Return the Trade tick series for the security RIM CT Equity on June 22, 2011 during a specified 5-minute interval. Also return the condition codes, exchange codes, and broker codes.
d = timeseries(c,'RIM CT Equity',{'06/22/2011 12:15:00',... '06/22/2011 12:20:00'},[],'Trade',... {'includeConditionCodes','includeExchangeCodes',... 'includeBrokerCodes'},{'true','true','true'});
See Also
6-59
datastream
User name. User password. To connect to the Thomson Reuters Datastream API, enter 'Datastream' in this field. Web URL.
Note Thomson Reuters assigns the values for you to enter for each argument. Enter all arguments as MATLAB strings.
Description
Connect = datastream('UserName', 'Password', 'Source', 'URL') makes a connection to the Thomson Reuters Datastream API,
Examples
Note If you get an error connecting, verify that your proxy settings are correct in MATLAB by selecting Preferences > Web in the MATLAB Toolstrip.
See Also
6-60
datastream.close
Connect
Thomson Reuters Datastream connection object created with the datastream function.
data server.
datastream
6-61
datastream.fetch
Purpose Syntax
Arguments
Connect
Thomson Reuters Datastream connection object created with the datastream function. MATLAB string containing the name of a security, or cell array of strings containing names of multiple securities. This data is in a format recognizable by the Thomson Reuters Datastream data server. (Optional) MATLAB string or cell array of strings indicating the data fields for which to retrieve data. (Optional) MATLAB string indicating a specific calendar date for which you request data. (Optional) Start date for historical data.
'Security'
'Fields'
'Date'
'FromDate'
6-62
datastream.fetch
'ToDate'
(Optional) End date for historical data. If you specify a value for 'ToDate', 'FromDate' cannot be an empty value. Note You can specify dates in any of the formats supported by datestr and datenum that show a year, month, and day.
'Period'
(Optional) Period within a date range. Period values are: 'd': daily values 'w': weekly values 'm': monthly values (Optional) Currency in which fetch returns the data.
'Currency'
Note You can enter the optional arguments 'Fields', 'FromDate', 'ToDate', 'Period', and 'Currency' as MATLAB strings or empty arrays ([ ]).
Description
6-63
datastream.fetch
data = fetch(Connect, 'Security', 'Fields', 'FromDate', 'ToDate') returns data for the specified security and fields for the
which to report the data. Note The Thomson Reuters Datastream interface returns all data as strings. For example, it returns Price data to the MATLAB workspace as a cell array of strings within the structure. There is no way to determine the data type from the Datastream interface.
Examples
Or the command:
data = fetch(Connect, 'ICI', 'P')
6-64
datastream.fetch
Retrieving Monthly Opening and Closing Prices for a Specified Date Range
Return the monthly closing and opening prices for the securities ICI and IBM from 09/01/2005 to 09/01/2007:
data = fetch(Connect, {'ICI', 'IBM'}, {'P', 'PO'}, ... '09/01/2005', '09/01/2007', 'M')
See Also
6-65
datastream.get
Connect
Thomson Reuters Datastream connection object created with the datastream function. (Optional) A MATLAB string or cell array of strings containing property names. Valid property names include: user datasource endpoint wsdl sources systeminfo version
PropertyName
Description
value = get(Connect, 'PropertyName') returns the value of the specified properties for the Thomson Reuters Datastream connection object. value = get(Connect) returns a MATLAB structure where each field name is the name of a property of Connect. Each field contains the
See Also
6-66
datastream.isconnection
Verify whether connections to Thomson Reuters Datastream data servers are valid
x = isconnection(Connect)
Connect
Thomson Reuters Datastream connection object created with the datastream function.
Description Examples
x = isconnection(Connect) returns x = 1 if the connection is a valid Thomson Reuters Datastream connection, and x = 0 otherwise.
See Also
6-67
esig
In order to use the signal interface, you need to make the eSignal Desktop API visible to MATLAB by using the command:
% Add NET assembly. NET.addAssembly('D:\Work\esignal\DesktopAPI_TimeAndSales\... DesktopAPI_TimeAndSales\obj\Release\Interop.IESignal.dll');
Note Interop.IESignal.dll does not ship with Datafeed Toolbox. This file is created by Microsoft Visual Studio using an unmanaged DLL, in a managed environment. Interop.IESignal.dll is a wrapper that Visual Studio creates. If you do not have Interop.IESignal.dll, you will need to build and run an eSignal sample to create Interop.IESignal.dll. To create Interop.IESignal.dll:
1 Download the .NET example DesktopAPI_TimeAndSales.zip from
http://share.esignal.com/groupcontents.jsp?folder=&groupid=185.
2 Unzip the package and locate
NET.addAssembly('D:\Work\esignal\DesktopAPI_TimeAndSales\DesktopAPI_TimeAndSales\obj\Release\Interop.I
6-68
esig
See Also
6-69
esig.close
6-70
esig.getdata
Return the eSignal basic quote data for the security ABC:
D = getdata(E,'ABC')
See Also
6-71
esig.getfundamentaldata
for the security S. Return the eSignal fundamental data for the security ABC:
D = getfundamentaldata(E,'ABC')
See Also
6-72
esig.history
historical data for the given inputs. Input arguments include the security list S, the fields F, the dates startdate and enddate, and the periodicity per. Valid fields are Time, Open, High, Low, Close, Volume, OI, Flags, TickBid, TickAsk, and TickTrade. The input argument per is optional and specifies the period of the data. Possible values for per are 'D' (daily, the default), 'W' (weekly), and 'M' (monthly). Return the closing price for the given dates for the given security using the default period of the data:
D = history(E,'ABC','CLOSE',{'8/01/2009','8/10/2009'})
Examples
Return the monthly closing and high prices for the given dates for the given security:
D = history(E,'ABC',{'close','high'},{'6/01/2009','11/10/2009'},'M')
Return all fields for the given dates for the given security using the default period of the data. The fields are returned in the following order: Time, Open, High, Low, Close, Volume, OI, Flags, TickBid, TickAsk, TickTrade.
D = history(E,'ABC',[],{'8/01/2009','8/10/2009'})
See Also
6-73
esig.timeseries
intraday data for the given inputs. Inputs include the security list S, the fields F, the dates startdate and enddate, and the periodicity per. Valid fields for F are Time, Open, High, Low, Close, Volume, OI, Flags, TickBid, TickAsk, and TickTrade. The periodicity per is optional and specifies the period of the data. For example, if you enter the value '1' for per, the returned data will be aggregated into 1-minute bars. Enter '30' for 30-minute bars and '60' for 60-minute bars.
D = timeseries(E,S,F,startdate) returns raw intraday tick data for the date range starting at startdate and ending with current day. Note that the date range can only extend back for a period of 10 days from the current day.
Tips
For intraday tick requests made with a period argument, per, the following fields are valid: Time, Open, High, Low, Close, Volume, OI, Flags, TickBid, TickAsk, and TickTrade. For raw intraday tick requests, the following fields are valid: TickType,
Time, Price, Size, Exchange, and Flags.
Examples
Return the monthly closing and high prices for the given dates for the given security in 10-minute bars.
D = timeseries(E,'ABC US Equity',{'close','high'},... {'1/01/2010','4/10/2010'},'10')
Return all fields for the given dates for the given security in 10 minute bars. Fields are returned in the following order: Time, Open, High, Low, Close, Volume, OI, Flags, TickBid, TickAsk, and TickTrade.
6-74
esig.timeseries
D = timeseries(E,'ABC US Equity',[],{'8/01/2009','8/10/2009'},'10')
See Also
6-75
iqf
or makes a connection to an existing IQFEED session. Note Only one IQFEEDconnection can be open at a time.
Arguments
The user name for the IQFEED account. The password for the IQFEED account. The IQFEED port identifier (default = 'Admin'). The path to the IQFEED .NET assembly. The default path is C:\Program
Examples
Note Your path may differ from the one shown. Look for Interop.DTNIQFeedCOMLib.dll in the Alternatively, you can create a connection and specify the portname installation directory of IQFEED. You must and assembly arguments. have access to IQFEED to use this functionality.
Q = iqf('username','password', 'Admin',... 'C:\Program Files (x86)\DTN\IQFeed\Example Apps\Interop.DTNIQFeedCOMLib.dll')
Q = iqf('username','password')
See Also
6-76
iqf.close
Arguments Examples
See Also
iqf
6-77
iqf.history
asynchronously returns historical end of period data explicitly specifying the periodicity, socket listener, and event handler. Data is returned asynchronously for requests. For requests that return a large number of data points, there may be significant lag between the request and when the data is returned to the MATLAB workspace.
Arguments
Q S daterange
Ether a scalar value that specifies how many periods of data to return or a date range of the form{startdate,enddate}. startdate and enddate can be input as MATLAB date numbers or strings. Specifies the periodicity and can be input as: Daily (default) Function handle that specifies the function used listen for data on the IQFEED Lookup port. to Weekly Monthly Function handle that specifies the function that processes data event.
Examples
Create the variableIQFeedHistoryData to return monthly data in the MATLAB workspace in the variable IQFeedHistoryData.
6-78
iqf.history
history(q,'ABC',{floor(now)-100,floor(now)},'Monthly') openvar('IQFeedHistoryData')
Create the variableIQFeedHistoryData to return the last 10 days of daily data in the MATLAB workspace in the variable IQFeedHistoryData.
history(q,'ABC',10,'Daily') openvar('IQFeedHistoryData')
Create the variableIQFeedHistoryData to return a date range of data with the default periodicity and specifying the event listener and handler. Display the results in the MATLAB workspace in the variable IQFeedHistoryData.
history(q,'GOOG',{floor(now)-10,floor(now)},[],@iqhistoryfeedlistener,@iqhistoryfeedeventhandler) openvar('IQFeedHistoryData')
See Also
6-79
iqf.marketdepth
level 2 data using an explicitly defined socket listener and event handler.
Arguments
Q S elistener ecallback
Function handle that specifies the function used to listen for data on the level 2 port. Function handle that specifies the function that processes data event.
Examples
Return level 2 data using the default socket listener and event handler and display the results in the MATLAB workspace in the variable IQFeedLevelTwoData.
marketdepth(q,'ABC') openvar('IQFeedLevelTwoData')
Initiate a watch on the security ABC for level 2 data using the function handles iqfeedlistener and iqfeedeventhandler. Display the results in the MATLAB workspace in the variable IQFeedLevelTwoData.
marketdepth(q,'ABC',@iqfeedmarketdepthlistener,@iqfeedmarketdeptheventhandler) openvar('IQFeedLevelTwoData')
6-80
iqf.marketdepth
See Also
6-81
iqf.news
using an explicitly defined socket listener and event handler. The syntax news(Q,true) turns on news updates for the list of currently subscribed level 1 securities and news(Q,false) turns off news updates for the list of currently subscribed level 1 securities.
Arguments
Q S elistener ecallback
Function handle that specifies the function used to listen for data on the news lookup port. Function handle that specifies the function that processes data events.
Examples
Return news data using the defaults for socket listener and event handler and display the results in the MATLAB workspace in the variable IQFeedNewsData.
news(q,'ABC') openvar('IQFeedNewsData')
Return news data for the security ABC using the function handles iqfeedlistener and iqfeedeventhandler. Display the results in the MATLAB workspace in the variable IQFeedNewsData.
6-82
iqf.news
news(q,'ABC',@iqfeednewslistener,@iqfeednewseventhandler) openvar('IQFeedNewsData')
See Also
6-83
iqf.realtime
Purpose Syntax
Description
current update field list, default socket listener, and event handler.
realtime(Q, S, F) returns asynchronous level 1 data for a specified field list using the default socket listener and event handler. realtime(Q, S elistener, ecallback) returns asynchronous level 1
Arguments
Q S F
elistener ecallback
Function handle that specifies the function used to listen for data on the IQFEED Lookup port. Function handle that specifies the function that processes data event.
Examples
Return level 1 data for security ABC using the default socket listener and event handler and display the results in the MATLAB workspace in the variable IQFeedLevelOneData.
realtime(q,'ABC') openvar('IQFeedLevelOneData')
6-84
iqf.realtime
Return level 1 data for security ABC using a field list and the defaults for socket listener and event handler and display the results in the MATLAB workspace in the variable IQFeedLevelOneData.
realtime(q,'ABC',... {'Symbol','Exchange ID','Last','Change','Incremental Volume'}) openvar('IQFeedLevelOneData')
Return level 1 data for security ABC using the function handles iqfeedlistener and iqfeedeventhandler. Display the results in the MATLAB workspace in the variable IQFeedLevelOneData.
See Also
6-85
iqf.timeseries
Data requests are returned asynchronously. For requests that return a large number of ticks, there may be a significant lag between the request and when the data is returned to the MATLAB workspace.
Arguments
Q S daterange
Ether a scalar value that specifies how many periods of data to return or a date range of the form{startdate,enddate}. startdate and enddate can be input as MATLAB date numbers or strings. Specifies, in seconds, the bar interval of the ticks used to aggregate ticks into intraday bars. Function handle that specifies the function used to listen for data on the IQFEED Lookup port. Function handle that specifies the function that processes data event.
Examples
Return intraday ticks for a given daterange and use the default socket listener and event handler and then display the results in the MATLAB workspace in the variable IQFeedTimeseriesData:
6-86
iqf.timeseries
timeseries(q,'ABC',{floor(now),now} openvar('IQFeedTimeseriesData')
Return the intraday ticks for a daterange and per of 60 seconds and use the default socket listener and event handler and then display the results in the MATLAB workspace in the variable IQFeedTimeseriesData.
timeseries(q,'ABC',{'02/12/2012 09:30:00','02/12/2012 16:00:00'},60) openvar('IQFeedTimeseriesData')
Return the intraday ticks for a dateranage on the security ABC using the function handles iqfeedlistener and iqfeedeventhandler. Display the results in the MATLAB workspace in the variable IQFeedTimeseriesData.
timeseries(q,'ABC',{floor(now),now},[],@iqtimeseriesfeedlistener,@iqtimeseriesfeedeventhandler) openvar('IQFeedTimeseriesData')
See Also
6-87
factset
User login name. User serial number. User password. FactSet customer identification number.
Description Examples
Connect = factset('UserName', 'SerialNumber', 'Password', 'ID') connects to the FactSet FAST interface.
See Also
6-88
factset.close
Connect
6-89
factset.fetch
Purpose Syntax
Arguments
Connect Library Security
FactSet connection object created with the factset function. FactSet formula library. A MATLAB string or cell array of strings containing the names of securities in a format recognizable by the FactSet server. A MATLAB string or cell array of strings indicating the data fields for which to retrieve data. Date string or serial date number indicating date for the requested data. If you enter todays date, fetch returns yesterdays data. 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.
Fields
Date
FromDate
6-90
factset.fetch
ToDate Period
End date for date range. 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
libraries.
data = fetch(Connect, 'Library') returns the valid field names
6-91
factset.fetch
data = fetch(Connect, 'Security', 'FromDate', 'ToDate', 'Period') returns security data for the date range FromDate to ToDate
Examples
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
6-92
factset.get
Purpose Syntax
Arguments
Connect PropertyName
FactSet connection object created with the factset function. (Optional) A MATLAB string or cell array of strings containing property names. Property names are: user serial password cid
Description
value = get(Connect, 'PropertyName') returns the value of the specified properties for the FactSet connection object. value = get(Connect) returns a MATLAB structure where each field name is the name of a property of Connect, and each field contains
Examples
6-93
factset.get
cid: 'userid'
See Also
6-94
factset.isconnection
Connect
Description Examples
x = isconnection(Connect) returns x = 1 if the connection to the FactSet data server is valid, and x = 0 otherwise.
See Also
6-95
fred
Purpose Syntax
Arguments Description
URL
Connect = fred(URL) establishes a connection to a FRED data server. Connect = fred verifies that the URL http://research.stlouisfed.org/fred2/ is accessible and creates a
connection.
Examples
See Also
6-96
fred.close
Connect
Description Examples
See Also
fred
6-97
fred.fetch
Purpose Syntax
Arguments
Connect 'Series' 'D1' 'D2'
FRED connection object created with the fred function. MATLAB string containing the name of a series in a format recognizable by the FRED server. MATLAB string or date number indicating the date from which to retrieve data. MATLAB string or date number indicating the date range from which to retrieve data.
Description
For a given series, fetch returns historical data using the connection to the FRED data server.
data = fetch(Connect, 'Series') returns data for Series, using the
Note You can specify dates in any of the formats supported by datestr and datenum that show a year, month, and day.
6-98
fred.fetch
Examples
Fetch all available daily U.S. dollar to euro foreign exchange rates:
d = fetch(f,'DEXUSEU') d = Title: 'U.S. / Euro Foreign Exchange Rate' SeriesID: 'DEXUSEU' Source: 'Board of Governors of the Federal Reserve System' Release: 'H.10 Foreign Exchange Rates' SeasonalAdjustment: 'Not Applicable' Frequency: 'Daily' Units: 'U.S. Dollars to One Euro' DateRange: '1999-01-04 to 2006-06-19' LastUpdated: '2006-06-20 9:39 AM CT' Notes: 'Noon buying rates in New York City for cable transfers payable in foreign currencies.' Data: [1877x2 double]
See Also
6-99
fred.get
Connect
Description
value = get(Connect, 'PropertyName') returns a MATLAB structure containing the value of the specified properties for the FRED connection object. value = get(Connect) returns the value for all properties.
Examples
See Also
6-100
fred.isconnection
Connect
Description Examples
x = isconnection(Connect) returns x = 1 if a connection to the FRED data server is valid, and x = 0 otherwise.
See Also
6-101
haver
Databasename
Analytics database. Create a connection to the Haver Analytics database at the path d:\work\haver\data\haverd.dat:
H = haver('d:\work\haver\data\haverd.dat')
See Also
6-102
haver.aggregation
Value of V
0 1
missing data.
aggregation fills in missing data based on data available in the requested period. aggregation fills in missing data based on some past value. aggregation resets V to its last valid
2 -1
forced
Not recognized
setting.
See Also
6-103
haver.close
Description Examples
See Also
haver
6-104
haver.fetch
Purpose Syntax
Arguments
H S Startdate Enddate P
Haver Analytics connection object created with the haver function. Haver Analytics variable. MATLAB string or date number indicating the startdate from which to retrieve data. MATLAB string or date number indicating the enddate of the date range. A specified period. You can enter the period as: D for daily values W for weekly values M for monthly values Q for quarterly values A for annual values
Description
fetch returns historical data via a Haver Analytics connection object. D = fetch(H,S) returns data for the Haver Analytics variable S, using the connection object H. D = fetch(H,S,Startdate,Enddate) returns data for the Haver Analytics variable S, using the connection object H, between the dates Startdate and Enddate.
6-105
haver.fetch
D = fetch(H,S,Startdate,Enddate,P) returns data for the Haver Analytics variable S, using the connection object H, between the dates Startdate and Enddate, in time periods specified by P.
Examples
See Also
6-106
haver.get
Description
V = get(H,'PropertyName') returns a MATLAB structure containing the value of the specified properties for the Haver Analytics connection object. V = get(H) returns a MATLAB structure, where each field name is the name of a property of H. Each field contains the value of the property.
Examples
See Also
6-107
haver.info
H S
Haver Analytics connection object created with the haver function. Haver Analytics variable.
Description Examples
6-108
haver.info
Descriptor: 'Federal Funds [Effective] Rate (% p.a.)' ShortSource: 'History' LongSource: 'Historical Series'
See Also
6-109
haver.isconnection
Description Examples
X = isconnection(H) returns X = 1 if the connection is a valid Haver Analytics connection, and X = 0 otherwise.
See Also
6-110
haver.nextinfo
H S
Haver Analytics connection object created with the haver function. Haver Analytics variable.
Description Examples
D = nextinfo(H,S) returns information for the next Haver Analytics variable after the variable, S.
6-111
haver.nextinfo
Descriptor: 'Federal Funds [Effective] Rate (% p.a.)' ShortSource: 'History' LongSource: 'Historical Series'
See Also
6-112
havertool
Description
6-113
havertool
The GUI fields and buttons are: Database: The currently selected Haver Analytics database. Browse: Allows you to browse for Haver Analytics databases, and populates the variable list with the variables in the database you specify. Start Date: The data start date of the selected variable. End Date: The data end date of the selected variable. Workspace Variable: The MATLAB variable to which havertool writes data for the currently selected Haver Analytics variable. Close: Closes all current connections and the Haver Analytics GUI.
Examples
See Also
haver
6-114
idc
Connect to Interactive Data Pricing and Reference Datas RemotePlus data servers
Connect = idc Connect = idc connects to the Interactive Data Pricing and Reference Datas RemotePlus server. Connect is a connection handle used by other functions to obtain data.
Examples
See Also
6-115
idc.close
Close connections to Interactive Data Pricing and Reference Datas RemotePlus data servers
close(Connect)
Connect
Interactive Data Pricing and Reference Datas RemotePlus connection object created with the idc function.
Description Examples
and Reference Datas RemotePlus server. Establish an Interactive Data Pricing and Reference Datas RemotePlus connection, c:
c = idc
See Also
idc
6-116
idc.fetch
Purpose Syntax
Request data from Interactive Data Pricing and Reference Datas RemotePlus data servers
data = fetch(Connect, 'Security', 'Fields') data = fetch(Connect, 'Security', 'Fields', 'FromDate', 'ToDate') data = fetch(Connect, 'Security', 'Fields', 'FromDate', 'ToDate', 'Period') data = fetch(Connect,'','GUILookup','GUICategory')
Arguments
Connect
Interactive Data Pricing and Reference Datas RemotePlus connection object created with the idc function. A MATLAB string containing the name of a security in a format recognizable by the Interactive Data Pricing and Reference Datas RemotePlus server. A MATLAB string or cell array of strings indicating specific fields for which to provide data. Valid field names are in the file @idc/idcfields.mat. The variable bbfieldnames contains the list of field names. Beginning date for historical data. Note You can specify dates in any of the formats supported by datestr and datenum that show a year, month, and day.
'Security'
'Fields'
'FromDate'
'ToDate'
6-117
idc.fetch
'Period' 'GUICategory'
Period within date range. GUI category. Possible values are: 'F' (All valid field categories) 'S' (All valid security categories)
Description
for the indicated fields of the designated securities. Load the file
idc/idcfields to see the list of supported fields. data = fetch(Connect, 'Security', 'Fields', 'FromDate', 'ToDate') returns historical data for the indicated fields of the
designated securities.
data = fetch(Connect, 'Security', 'Fields', 'FromDate', 'ToDate', 'Period') returns historical data for the indicated fields of
the designated securities with the designated dates and period. Consult the Remote Plus documentation for a list of valid'Period' values.
data = fetch(Connect,'','GUILookup','GUICategory') opens the
Interactive Data Pricing and Reference Datas RemotePlus dialog box for selecting fields or securities.
Examples
See Also
6-118
idc.get
Purpose Syntax
Retrieve properties of Interactive Data Pricing and Reference Datas RemotePlus connection objects
value = get(Connect, 'PropertyName') value = get(Connect)
Arguments
Connect
Interactive Data Pricing and Reference Datas RemotePlus connection object created with the idc function. (Optional) A MATLAB string or cell array of strings containing property names. Property names are: 'Connected' 'Connection' 'Queued'
PropertyName
Description
value = get(Connect, 'PropertyName') returns the value of the specified properties for the Interactive Data Pricing and Reference Datas RemotePlus connection object.PropertyName is a string or cell array of strings containing property names. value = get(Connect) returns a MATLAB structure. Each field name is the name of a property of Connect, and each field contains the value of that property.
See Also
6-119
idc.isconnection
Verify whether connections to Interactive Data Pricing and Reference Datas RemotePlus data servers are valid
x = isconnection(Connect)
Connect
Interactive Data Pricing and Reference Datas RemotePlus connection object created with the idc function.
Description
x = isconnection(Connect) returns x = 1 if the connection is a valid Interactive Data Pricing and Reference Datas RemotePlus connection, and x = 0 otherwise.
Examples
See Also
6-120
kx
Purpose Syntax
Arguments
ip p id
IP address for the connection to the Kx Systems, Inc. kdb+ database. Port for the Kx Systems, Inc. kdb+ database connection. The username:password string for the Kx Systems, Inc. kdb+ database connection.
Description
k = kx(ip,p) connects to the Kx Systems, Inc. kdb+ database given the IP address ip and port number p. k = kx(ip,p,id) connects to the Kx Systems, Inc. kdb+ database given the IP address ip, port number p, and username:password string id.
Before you connect to the database, add The Kx Systems, Inc. file jdbc.jar to the MATLAB javaclasspath using the javaaddpath command. The following example adds jdbc.jar to the MATLAB javaclasspath c:\q\java:
javaaddpath c:\q\java\jdbc.jar
Note In earlier versions of the Kx Systems, Inc. kdb+ database, this jar file was named kx.jar. If you are running an earlier version of the database, substitute kx.jar for jdbc.jar in these instructions to add this file to the MATLAB javaclasspath.
Examples
Run the following command from a DOS prompt to specify the port number 5001:
q tradedata.q -p 5001
6-121
kx
Connect to a Kx Systems, Inc. server using IP address LOCALHOST and port number 5001:
k = kx('LOCALHOST',5001) handle: [1x1 c] ipaddress: 'localhost' port: 5001
See Also
6-122
kx.close
Description Examples
See Also
kx
6-123
kx.exec
Purpose Syntax
Arguments
k command
Kx Systems, Inc. kdb+ connection object created with the kx function. Kx Systems, Inc. kdb+ command issued using the Kx Systems, Inc. kdb+ connection object created with the kx function. Input parameters for Command.
p1,p2,p3
Description
exec(k,command) executes the specified command in Kx Systems, Inc. kdb+ without waiting for a response. exec(k,command,p1,p2,p3) executes the specified command with one or
three input parameters synchronously and waits for a response from the database. Enter unused parameters as empty. You can enter sync as 0 (default) for asynchronous commands and as 1 for synchronous commands.
6-124
kx.exec
Examples
Retrieve the data in the table trade using the connection to the Kx Systems, Inc. kdb+ database, K:
k = kx('localhost',5001);
Use the exec command to sort the data in the table trade in ascending order.
exec(k,'`date xasc`trade');
Subsequent data requests also sort returned data in ascending order. After running
q tradedata.q -p 5001
sort the data in the table trade in ascending order. Data later fetched from the table will be ordered in this manner.
See Also
kx.fetch | kx.insert | kx
6-125
kx.fetch
k ksql p1,p2,p3
Kx Systems, Inc. kdb+ connection object created with the kx function. The Kx Systems, Inc. kdb+ command. Input parameters for the ksql command.
Description
d = fetch(k,ksql) returns data from a Kx Systems, Inc. kdb+ database in a MATLAB structure where k is the Kx Systems, Inc. kdb+ object and ksql is the Kx kdb+ command. ksql can be any valid kdb+
command. The output of this method is any data resulting from the command specified in ksql.
d = fetch(k,ksql,p1,p2,p3) executes the command specified in ksql with one or more input parameters, and returns the data from
this command.
Examples
Run the following command from a DOS prompt to specify the port number 5001:
q tradedata.q -p 5001
Connect to a Kx Systems, Inc. server using IP address LOCALHOST and port number 5001:
k = kx('localhost',5001);
6-126
kx.fetch
sec: {5000x1 cell} price: [5000x1 volume: [5000x1 exchange: [5000x1 date: [5000x1
Retrieve data, passing an input parameter 'ACME' to the command select from trade:
d = fetch(k,'totalvolume','ACME'); d = volume: [1253x1 int32]
This is the total trading volume for the security ACME in the table trade. The function totalvolume is defined in the sample Kx Systems, Inc. kdb+ file, tradedata.q.
See Also
kx.exec | kx.insert | kx
6-127
kx.get
Description
v = get(k,'PropertyName') returns a MATLAB structure containing the value of the specified properties for the Kx Systems, Inc. kdb+ connection object. v = get(k) returns a MATLAB structure where each field name is the name of a property of k and the associated value of the property.
Examples
Get the properties of the connection to the Kx Systems, Inc. kdb+ database, K:
v = get(k) v = handle: [1x1 c] ipaddress: 'localhost' port: '5001'
See Also
6-128
kx.insert
k tablename data
The Kx Systems, Inc. kdb+ connection object created with the kx function. The name of the Kx Systems, Inc. kdb+ Tablename. The data that insert writes to the Kx Systems, Inc. kdb+ Tablename.
Description
insert(k,tablename,data) writes the data, data, to the Kx Systems, Inc. kdb+ table, tablename. x = insert(k,tablename,data,sync) writes the data, data, to the Kx Systems, Inc. kdb+ table, tablename, synchronously. For asynchronous calls, enter sync as 0 (default), and for synchronous calls, enter sync
as 1.
Examples
For the connection to the Kx Systems, Inc. kdb+ database, k, write data from ACME to the specified table:
insert(k,'trade',{'`ACME',133.51,250,6.4,'2006.10.24'})
See Also
6-129
kx.isconnection
Description Examples
x = isconnection(k) returns x = 1 if the connection to the Kx Systems, Inc. kdb+ database is valid, and x = 0 otherwise.
See Also
6-130
kx.tables
The Kx Systems, Inc. kdb+ connection object created with the kx function.
Description Examples
t = tables(k) returns the list of tables for the Kx Systems, Inc. kdb+
connection. Retrieve table information for the Kx Systems, Inc. kdb+ database using the connection k:
t = tables(k) t = 'intraday' 'seclist' 'trade'
See Also
6-131
rdth
History connection to enable intraday tick data retrieval. To create a Thomson Reuters Tick History connection, the command
r = rdth('user@company.com','mypassword')
returns
r = client: [1x1 com.thomsonreuters.tickhistory. ... webservice.client.RDTHApiClient] user: 'user@company.com' password: '**********'
Suppose you want to get the intraday price and volume information for all ticks of type Trade. To determine which fields apply to the message type Trade and the requestType of the Trade message, the command:
v = get(r,'MessageTypes')
returns
v = RequestType: {31x1 cell} Name: {31x1 cell} Fields: {31x1 cell}
The command
v.Name
then returns
ans =
6-132
rdth
'C&E Quote' 'Short Sale' 'Fund Stats' 'Economic Indicator' 'Convertibles Transactions' 'FI Quote' 'Dividend' 'Trade' 'Stock Split' 'Settlement Price' 'Index' 'Open Interest' 'Correction' 'Quote' 'OTC Quote' 'Stock Split' 'Market Depth' 'Dividend' 'Stock Split' 'Market Maker' 'Dividend' 'Stock Split' 'Intraday 1Sec' 'Dividend' 'Intraday 5Min' 'Intraday 1Min' 'Intraday 10Min' 'Intraday 1Hour' 'Stock Split' 'End Of Day' 'Dividend'
The command
j = find(strcmp(v.Name,'Trade'));
returns
6-133
rdth
j =
The command
v.Name{j}
returns
ans = Trade
The command
v.RequestType{8}
returns
ans = TimeAndSales
The command
v.Fields{j}
returns
ans = 'Exchange ID' 'Price' 'Volume' 'Market VWAP' 'Accumulative Volume' 'Turnover' 'Buyer ID' 'Seller ID' 'Qualifiers' 'Sequence Number' 'Exchange Time' 'Block Trade' 'Floor Trade' 'PE Ratio'
6-134
rdth
'Yield' 'Implied Volatility' 'Trade Date' 'Tick Direction' 'Dividend Code' 'Adjusted Close Price' 'Price Trade-Through-Exempt Flag' 'Irregular Trade-Through-Exempt Flag' 'TRF Price Sub Market ID' 'TRF' 'Irregular Price Sub Market ID'
To request the Exchange ID, Price, and Volume of a securitys intra day tick for a given day and time range the command
x = fetch(r,'ABCD.O',{'Exchange ID','Price','Volume'},... {'09/05/2008 12:00:06','09/05/2008 12:00:10'},... 'TimeAndSales','Trade','NSQ','EQU');
To request the Exchange ID, Price, and Volume of a securitys intraday tick data for an entire trading day, the command
x = fetch(r,'ABCD.O',{`Exchange ID','Price','Volume'},... '09/05/2008','TimeAndSales','Trade','NSQ','EQU');
6-135
rdth
'ABCD.O' 'Trade' 'ABCD.O' 'Trade' 'ABCD.O' 'Trade' 'ABCD.O' 'Trade' 'ABCD.O' 'Trade'
'05-SEP-2008' 'NAS' '51' '05-SEP-2008' 'NAS' '49.35' '05-SEP-2008' 'NAS' '47.5' '05-SEP-2008' 'NAS' '47.5' '05-SEP-2008' 'NAS' '47'
'08:00:41.142'... '100' '08:01:03.024'... '100' '19:37:47.934'... '1200' '19:37:47.934'... '300' '19:59:33.970'... '173'
To clean up any remaining requests associated with the rdth connection use:
close(r)
See Also
6-136
rdth.close
6-137
rdth.fetch
Purpose Syntax
Description
x = fetch(r,sec,tradefields,daterange,reqtype,messtype,exchange,domain,market additionally specifies the depth of level 2 data, marketdepth, to return for a 'MarketDepth' request type. marketdepth
must be a numeric value between 1 and 10, returning up to 10 bid/ask values for a given security. Note Do not use date ranges for end of day requests. You can specify a range of hours on a single day, but not a multiple day range.
Tips
To obtain more information request and message types and their associated field lists, use the command get(r).
6-138
rdth.fetch
Examples
returns
r = client: [1x1 com.thomsonreuters.tickhistory. ... webservice.client.RDTHApiClient] user: 'user@company.com' password: '**********'
The command
d = fetch(r,'GOOG.O',{'Volume','Last'},{'09/05/2008'},... 'EndOfDay','End Of Day','NSQ','EQU')
returns
d = '#RIC' 'Date[L]' 'Type' 'Last' 'Volume' 'GOOG.O' '05-SEP-2008' 'Time[L]' '23:59:00.000' ... ...
6-139
rdth.fetch
'End Of Day'
'444.25'
'4538375'
For
x = fetch(r,'GOOG.O')
for example, the exchange of the security is x.Exchange or NSQ. To determine the asset domain of the security, use the value of x.Type, in this case 113. Using the information from v = get(r),
j = find(v.InstrumentTypes.Value == 113)
returns
j =46
The command
v.InstrumentTypes.Value(j)
returns
ans = 113
The command
v.InstrumentTypes.Name(j)
returns
ans = 'Equities'
The command
v.AssetDomains.Value(strcmp(v.InstrumentTypes.Name(j),... v.AssetDomains.Name))
returns
6-140
rdth.fetch
ans = 'EQU'
Knowing the security exchange and domain helps the interface to resolve the security symbol and return data more quickly. For a 'NasdaqLevel2' request type, enter:
AaplTickData = fetch(R,'AAPL.O',{'Nominal Value'},... {now-.05,now},'NasdaqLevel2','Nominal Value','NSQ','EQU');
See Also
6-141
rdth.get
Properties include: AssetDomains BondTypes Class Countries CreditRatings Currencies Exchanges FuturesDeliveryMonths InflightStatus InstrumentTypes MessageTypes OptionExpiryMonths Quota RestrictedPEs Version
6-142
rdth.get
Examples
returns
r = client: [1x1 com.thomsonreuters.tickhistory. ... webservice.client.RDTHApiClient] user: 'user@company.com' password: '**********'
returns
v = AssetDomains: [1x1 struct] BondTypes: {255x1 cell} Class: 'class com.thomsonreuters. ... tickhistory.webservice.client.RDTHApiClient' Countries: {142x1 cell} CreditRatings: {82x1 cell} Currencies: [1x1 struct] Exchanges: [1x1 struct] FuturesDeliveryMonths: {12x1 cell} InflightStatus: [1x1 com.thomsonreuters. ... tickhistory.webservice.types.InflightStatus] InstrumentTypes: [1x1 struct] MessageTypes: [1x1 struct] OptionExpiryMonths: {12x1 cell} Quota: [1x1 com.thomsonreuters. ... tickhistory.webservice.types.Quota] RestrictedPEs: {2758x1 cell} Version: [1x1 com.thomsonreuters. ...
6-143
rdth.get
tickhistory.webservice.types.Version]
See Also
rdth | rdth.fetch
6-144
rdth.isconnection
See Also
6-145
rdth.status
manually or programmatically.
Examples
Optionally, download the file from the TRTH server programmatically. The data file is generated in a directory, api-results, on the server. The file has extension csv.gz.
filename = ['/api-results/' char(x) '-report.csv.gz']; urlwrite(['https://tickhistory.thomsonreuters.com/HttpPull/Download?'... 'user=' username '&pass=' password '&file=' filename''],... 'rdth_results.csv.gz');
This call to urlwrite saves the downloaded file with the name rdth_results.csv.gz in the current directory.
6-146
rdth.submitftp
Purpose Syntax
Description
x = submitftp(r,sec,tradefields,daterange,reqtype,messtype,exchange,domain additionally specifies the depth of level 2 data, marketdepth, to return for a 'MarketDepth' request type. marketdepth
must be a numeric value between 1 and 10, returning up to 10 bid/ask values for a given security. To monitor the status of the FTP request, enter the command
[s,qp] = status(r,x)
The status function returns a status message and queue position. When S = 'Complete', download the resulting compressed .csv file from the TRTH servers. Once the .csv file has been saved to disk, use rdthloader('filename') to load the data into the MATLAB workspace. To obtain more information request and message types and their associated field lists, use the command get(r).
6-147
rdth.submitftp
Examples
See Also
6-148
rdthloader
Purpose Syntax
Arguments
Specify the following arguments as name-value pairs. You can specify any combination of name-value pairs in a single call to rdthloader.
file 'date'
Thomson Reuters Tick History file from which to retrieve data. Use this argument with {DATE1, DATE2} to retrieve data between and including the specified dates. Specify the dates as numbers or strings. Use this argument to retrieve data for SECNAME, where SECNAME is a cell array containing a list of security identifiers for which to retrieve data. Use this argument to retrieve data beginning with the record STARTREC, where STARTREC is the record at which rdthloader begins to retrieve data. Specify STARTREC as a number. Use this argument to retrieve NUMRECORDS number of records.
'security'
'start'
'records'
Description
x = rdthloader(file) retrieves tick data from the Thomson Reuters Tick History file file and stores it in the structure x. x = rdthloader(file,'date',{DATE1}) retrieves tick data from file with date stamps of value DATE1.
6-149
rdthloader
x = rdthloader(file,'date',{DATE1, DATE2}) retrieves tick data from file with date stamps between DATE1 and DATE2. x = rdthloader(file,'security',{SECNAME}) retrieves tick data
Examples
Retrieve all ticks from the file file.csv with date stamps of 02/02/2007:
x = rdthloader('file.csv','date',{'02/02/2007'})
Retrieve all ticks from file.csv between and including the dates 02/02/2007 and 02/03/2007:
x = rdthloader('file.csv','date',{'02/02/2007',... '02/03/2007'})
Retrieve up to 100,000 tick records from file.csv, for the securities ABC.N and XYZ.O, with date stamps between and including the dates 02/02/2007 and 02/03/2007:
x = rdthloader('file.csv','records',100000,... 'date',{'02/02/2007','02/03/2007'},...
6-150
rdthloader
'security',{'ABC.N','XYZ.O'})
See Also
reuters | rnseloader
6-151
reuters
Reuters session object created with the reuters function Name of the Reuters session, of the form
myNameSpace::mySession
Name of the service you use to connect to the data server. User ID you use to connect to the data server IP address of the data server to which you connect to retrieve data.
Description
You must configure your environment before you use this function to connect to a Reuters data server. For more information, see Reuters Data Service Requirements on page 1-5.
r = reuters (sessionName, serviceName) starts a Reuters session where sessionName is of the form myNameSpace::mySession and serviceName specifies the name of the service you use to connect to the data server. r = reuters (sessionName, serviceName, user, position) starts a Reuters session where sessionName is of the form myNameSpace::mySession and serviceName is the service to use, user is the user ID, and position is the IP address of the machine to which
you connect to retrieve data. Use this form of the command if you require DACS authentication.
Examples
6-152
reuters
r = reuters ('myNS::remoteSession', 'dIDN_RDF') r = session: [1x1 com.reuters.rfa.internal.session.SessionImpl] user: [] serviceName: 'dIDN_RDF' standardPI: [1x1 com.reuters.rfa.common.StandardPrincipalIdentity] eventQueue: [Error] marketDataSubscriber: [1x1 com.reuters.rfa.internal.session. MarketDataSubscriberImpl] marketDataSubscriberInterestSpec: [1x1 com.reuters.rfa.session.MarketDataSubscriber InterestSpec] client: [1x1 com.mathworks.toolbox.datafeed.MatlabReutersClient] mdsClientHandle: [1x1 com.reuters.rfa.internal.common.HandleImpl]
Note If you do not use the Reuters DACS authentication functionality, the following error message appears:
com.reuters.rfa.internal.connection.ConnectionImpl initializeEntitlementsINFO: com.reuters.rfa.connection.ssl.myNS.RemoteConnection DACS disabled for connection myNS::RemoteConnection
with session name 'myNS::remoteSession', service name 'dIDN_RDF', user id 'ab123', and data server IP address '111.222.333.444/net':
6-153
reuters
6-154
reuters
connection configuration:
dacs_GenerateLocks=false
6-155
reuters
This RTIC connection depends on the key subscriber RVConnection. Your RVConnection configuration should look as follows:
6-156
reuters
The RTICConnection configuration is referenced by the session remoteRTICSession, as shown in the following figure.
6-157
reuters
6-158
reuters
Messages like the following may appear in the MATLAB Command Window when you establish a non-DACs-enabled connection. These messages are informational and can safely be ignored.
Oct 5, 2007 2:28:31 PM com.reuters.rfa.internal.connection. ConnectionImpl initializeEntitlements INFO: com.reuters.rfa.connection.ssl.... myNS.RemoteConnection DACS disabled for connection myNS::RemoteConnection
DACs-enabled Make an RTIC (TIC-RMDS Edition), DACS-enabled connection to a Reuters data server, with session name 'myNS::remoteRTICWithDACs', service name 'IDN_RDF', user id 'ab123', and data server IP address '111.222.333.444/net':
r = reuters ('myNS::remoteRTICWithDACs', 'IDN_RDF', ... 'ab123', '111.222.333.444/net')
6-159
reuters
This RTIC connection depends on the key subscriber RVConnection. Your RVConnection configuration should look as follows:
6-160
reuters
Messages like the following may appear in the MATLAB Command Window when you establish a DACs-enabled connection. These messages are informational and can be ignored safely.
Oct 5, 2007 2:27:14 PM ... com.reuters.rfa.internal.connection. ConnectionImpl$ConnectionEstablishmentThread runImpl INFO: com.reuters.rfa.connection.sass3.myNS.RTICwithDacs Connection successful: ... componentName :myNS::RTICwithDacs, subscriberRVConnection: {service: 9453, network: 192.168.107.0;225.2.2.8, daemon: tcp:192.168.107.131:9450} Oct 5, 2007 2:27:14 PM com.reuters.rfa.internal.connection.sass3.... Sass3LoggerProxy log INFO: com.reuters.rfa.connection.sass3.myNS.RTICwithDacs SASS3JNI: Received advisory from RV session@
6-161
reuters
(9453,192.168.107.0;225.2.2.8,tcp:192.168.107.131:9450): _RV.INFO.SYSTEM.RVD.CONNECTED Oct 5, 2007 2:27:14 PM com.reuters.rfa.internal.connection.ConnectionImpl makeServiceInfo WARNING: com.reuters.rfa.connection.sass3.... myNS.RTICwithDacs Service list configuration has no alias defined for network serviceName IDN_RDF
If messages like the following appear in the MATLAB Command Window when you establish a DACs-enabled connection:
SEVERE: com.reuters.rfa.entitlements._Default.Global DACS initialization failed: com.reuters.rfa.dacs.AuthorizationException: Cannot start the DACS Library thread due to Cannot locate JNI library - RFADacsLib
Then add an entry to the $MATLAB/toolbox/local/librarypath.txt file that points to the folder containing the following files:
See Also
6-162
reuters.addric
Examples
Create a live RIC called myric with the fields trdprc_1 (field ID 6) and bid (field ID 22) set to initial values of 0:
addric(r,'myric',{trdprc_1','bid'},{0,0},'live')
Create a live RIC called myric with the fields trdprc_1 and bid set to initial values of 0:
addric(r,'myric',{6,22},{0,0},'live')
See Also
6-163
reuters.close
Description Examples
Release the connection r to the Reuters data server, and unsubscribe all requests associated with it:
close(r)
See Also
reuters
6-164
reuters.contrib
Examples
Contribute data to the Reuters datafeed for the Reuters session object r and the RIC 'myric'. Provide a last trade price of 33.5.
contrib(r,'myric','trdprc_1',33.5)
See Also
6-165
reuters.deleteric
Examples
See Also
6-166
reuters.fetch
Purpose Syntax
Arguments
s callback
Reuters security object MATLAB function that runs for each data event that occurs
Description
d = fetch(r,s) returns the current data for the security s, given the Reuters session object r. d = fetch(r,s,callback) uses the Reuters session object r to subscribe to the security s. MATLAB runs the callback function for
Examples
6-167
reuters.fetch
RDNDISPLAY: 66.00 DSPLY_NAME: 'DELAYED-15GOOGLE' RDN_EXCHID: '0' TRDPRC_1: 474.28 TRDPRC_2: 474.26 TRDPRC_3: 474.25 TRDPRC_4: 474.25 TRDPRC_5: 474.25 NETCHNG_1: -4.73 HIGH_1: 481.35 LOW_1: 472.78 PRCTCK_1: '1' CURRENCY: '840' TRADE_DATE: '30 APR 2007
Subscribing to a Security
To subscribe to a security and process the data in real time, specify a callback function. MATLAB runs this function each time it receives a real-time data event from Reuters. In this example, the callback function, rtdemo, returns the subscription handle associated with this request to the base MATLAB workspace, A. The openvar function is then called to display A in the Variables editor. A partial list of the data included in A appears in the figure.
d = fetch(r,'GOOG.O','rtdemo') openvar('A')
6-168
reuters.fetch
See Also
6-169
reuters.get
Purpose Syntax
Arguments
r f
Reuters session object created with the reuters function Reuters session properties list
Description
e = get(r) returns Reuters session properties for the Reuters session object r. e = get(r,f) returns Reuters session properties specified by the properties list f for the Reuters session object r.
See Also
reuters
6-170
reuters.history
Purpose Syntax
Description
d = history(r,s) returns all available daily historical data for the RIC, s, for the Reuters session object r. d = history(r,s,p) returns all available historical data for the RIC, s, for the Reuters session object r. p specifies the period of the data,
'd' - daily (default) 'w' - weekly 'm' - monthly Note Reuters Time Series One will only return two years of daily data, five years of weekly data, or ten years of monthly data from the current date.
d = history(r,s,f) returns all available historical data for the RIC, s, and fields, f, for the Reuters session object r. d = history(r,s,f,p) returns all available historical data for the RIC, s, and fields, f, for the Reuters session object r. p specifies the period of the data. d = history(r,s,d) returns the historical data for the RIC, s, for the given date, d, for the Reuters session object r.
6-171
reuters.history
d = history(r,s,startdate,enddate) returns the daily historical data for the RIC, s, for the given date range defined by startdate and enddate. d = history(r,s,startdate,enddate,p) returns the daily historical data for the RIC, s, for the given date range defined by startdate and enddate. p specifies the period of the data. d = history(r,s,f,startdate,enddate) returns the daily historical data for the RIC, s, for the given date range defined by startdate and enddate. d = history(r,s,f,startdate,enddate,p) returns the historical data for the RIC, s, and fields, f, for the given date range defined by startdate and enddate. p specifies the period of the data.
Examples
d = history(r,'WXYZ.O') returns a structure containing all available historical end of day daily data for the RIC wxyz.o, for the Reuters session object r. d = history(r,'WXYZ.O','close') returns a structure with the fields date and close containing all available historical end of day daily data for the RIC wxyz.o. d = history(r,'WXYZ.O','close','m') returns all available monthly
data.
d = history(r,'WXYZ.O','01-03-2009','02-24-2009') returns all available daily data for the date range 01-03-2009 to 02-24-2009. Note that only two years worth of daily data, five years worth of weekly data, and 10 years of monthly data from todays date is made available by Reuters. d = history(r,'WXYZ.O',{'close','volume'},'01-03-2009','02-24-2009')
returns all available daily data for the date range 01-03-2009 to 02-24-2009 for the fields date, close and volume.
d = history(r,'WXYZ.O',{'close','volume'},'01-03-2009','02-24-2009','w')
6-172
reuters.history
returns all available weekly data for the date range 01-03-2009 to 02-24-2009 for the fields date, close and volume.
See Also
reuters | reuters.fetch
6-173
reuters.stop
Purpose Syntax
Unsubscribe securities
stop(r) stop(r,d)
Arguments
r d
Reuters session object created with the reuters function Subscription handle returned by
reuters/fetch
Description
stop(r) unsubscribes all securities associated with the Reuters session object r. stop(r,d) unsubscribes the securities associated with the subscription handle d, where d is the subscription handle returned by reuters/fetch.
Examples
Unsubscribe securities associated with a specific request d and a Reuters connection object r:
stop(r,d)
See Also
reuters | reuters.fetch
6-174
rmdsconfig
editor.
reuters
6-175
rnseloader
Purpose Syntax
'date', {DATE1}) 'date', {DATE1, DATE2}) 'security', {SECNAME}) 'start', STARTREC) 'records', NUMRECORDS) 'fieldnames', F)
Arguments
Specify the following arguments as name-value pairs. You can specify any combination of name-value pairs in a single call to rnseloader.
file 'date'
Reuters Newscope sentiment archive file from which to retrieve data. Use this argument with {DATE1, DATE2} to retrieve data between and including the specified dates. Specify the dates as numbers or strings. Use this argument to retrieve data for SECNAME, where SECNAME is a cell array containing a list of security identifiers for which to retrieve data. Use this argument to retrieve data beginning with the record STARTREC, where STARTREC is the record at which rnseloader begins to retrieve data. Specify STARTREC as a number. Use this argument to retrieve NUMRECORDS number of records.
'security'
'start'
'records'
Description
x = rnseloader(file) retrieves data from the Reuters Newscope sentiment archive file file, and stores it in the structure x. x = rnseloader(file, 'date', {DATE1}) retrieves data from file with date stamps of value DATE1.
6-176
rnseloader
x = rnseloader(file, 'date', {DATE1, DATE2}) retrieves data from file with date stamps between DATE1 and DATE2. x = rnseloader(file, 'security', {SECNAME}) retrieves data from file for the securities specified by SECNAME. x = rnseloader(file, 'start', STARTREC) retrieves data from file beginning with the record specified by STARTREC. x = rnseloader(file, 'records', NUMRECORDS) retrieves NUMRECORDS number of records from file. x = rnseloader(file, 'fieldnames', F) retrieves only the specified
Examples
Retrieve data from the file file.csv with date stamps of 02/02/2007:
x = rnseloader('file.csv','date',{'02/02/2007'})
Retrieve data from file.csv between and including 02/02/2007 and 02/03/2007:
x = rnseloader('file.csv','date',{'02/02/2007',... '02/03/2007'})
6-177
rnseloader
Retrieve up to 100000 records from file.csv, for the securities ABC.N and XYZ.O , with date stamps between and including the dates 02/02/2007 and 02/03/2007:
x = rnseloader('file.csv','records',100000,... 'date',{'02/02/2007','02/03/2007'},... 'security',{'ABC.N','XYZ.O'})
See Also
reuters | rdthloader
6-178
tlkrs
See Also
6-179
tlkrs.close
6-180
tlkrs.getdata
d.I contains the instrument IDs, and d.P contains the pricing data.
6-181
tlkrs.getdata
Load the file @tlkrs/tkfields.mat for a listing of the field names (Bid, Ask, Last) and corresponding IDs.
See Also
6-182
tlkrs.history
Retrieve end of day SIX Financial Information data for the specified security for the past 5 days.
c = tlkrs('US12345','userapid01','userapid10') ids = tkfieldtoid(c,{'Bid','Ask'},'history'); d = history(c,{'1758999,149,134'},ids,floor(now)-5,floor(now));
d = XRF: IL: I: HL: HD: P: [1x1 [1x1 [1x1 [1x1 [1x1 [1x1 struct] struct] struct] struct] struct] struct]
d.I contains the instrument IDs, d.HD contains the dates, and d.P contains the pricing data.
6-183
tlkrs.history
Convert the field identification strings in d.P.k to their corresponding field names like this:
d.P.k = tkidtofield(c,d.P.k,'history')
See Also
6-184
tlkrs.isconnection
6-185
tlkrs.timeseries
Purpose Syntax
Description
trade, best, and ask tick is returned for the given date or date range.
D = timeseries(c,s,{startdate,enddate}) returns the raw tick data for the security s, for the date range defined by startdate and enddate. D = timeseries(c,s,t,5) returns the tick data for the security s, for the date t in intervals of 5 minutes, for the field f. Intraday tick data requested is returned in 5-minute intervals, with the columns representing First, High, Low, Last, Volume Weighted Average, and Moving Average.
Examples
Retrieve SIX Financial Information intraday tick data for the past 2 days:
c = tlkrs('US12345','userapid01','userapid10') d = timeseries(c,{'1758999,149,134'}, ... {floor(now)-.25,floor(now)})
6-186
tlkrs.timeseries
d.I contains the instrument IDs, d.TS contains the date and time data, and d.P contains the pricing data.
6-187
tlkrs.timeseries
Convert these IDs to field names (Mid, Bid, Ask) with the tkidtofield method:
d.P.k = tkidtofield(c,d.P.k,'history')
Load the file @tlkrs/tkfields.mat for a listing of the field names and corresponding IDs. Display the corresponding tick values:
d.P.v(1:10) ans = '45.325' '45.32' '45.33' '45.325' '45.32' '45.33' '45.325' '45.32' '45.33' '45.325'
See Also
6-188
tlkrs.tkfieldtoid
Examples
See Also
6-189
tlkrs.tkidtofield
Examples
When you retrieve output from SIX Financial Information, it appears as follows:
d = XRF: IL: I: M: P: [1x1 [1x1 [1x1 [1x1 [1x1 struct] struct] struct] struct] struct]
The instrument IDs are found in d.I, and the pricing data is found in d.P. The output for d.P.k appears like this:
ans = '33,2,1' '33,3,1' '3,1,1' '33,2,1' '33,3,1' '3,1,1'
Convert the field IDs in d.P.k to their field names with the tkidtofield method:
6-190
tlkrs.tkidtofield
d.P.k = tkidtofield(c,d.P.k,'market')
Load the file @tlkrs/tkfields.mat for a listing of the field names and their corresponding field IDs.
See Also
6-191
xtrdr
X_TRADER connection
X = xtrdr X = xtrdr starts X_TRADER or connects to an existing X_TRADER
session.
X
X_TRADER connection. You should only create one X_TRADER connection per MATLAB session. To create a new X_TRADER connection, start a new MATLAB session.
xtrdr.close
X_TRADER Price Update on page 2-8 X_TRADER Price Update Depth on page 2-10 X_TRADER Order Submission on page 2-14
6-192
xtrdr.close
X_TRADER Price Update on page 2-8 X_TRADER Price Update Depth on page 2-10 X_TRADER Order Submission on page 2-14
6-193
xtrdr.createInstrument
one or more Name,Value pair arguments with names and values corresponding to valid X_TRADER API options. For details, see the Trading Technologies X_TRADER API Programming Tutorial or X_TRADER API Class Reference.
Input Arguments
Input structure with fields corresponding to valid X_TRADER API options. For details, see the Trading Technologies X_TRADER API Programming Tutorial or X_TRADER API Class Reference.
Examples
Define an input structure, S, with fields corresponding to valid X_TRADER API options.
S = []; S.Exchange = 'Eurex'; S.Product = 'OGBM'; S.ProdType = 'Option';
6-194
xtrdr.createInstrument
S.Contract = 'Jan12 P12300'; S.Alias = 'TestInstrument3'; S S = Exchange: Product: ProdType: Contract: Alias: 'Eurex' 'OGBM' 'Option' 'Jan12 P12300' 'TestInstrument3'
Create an xtrdr instrument using name-value pairs corresponding to valid X_TRADER API options.
createInstrument(X,'Exchange','Eurex','Product','OGBM',... 'ProdType','Option','Contract','Jan12 P12300',... 'Alias','TestInstrument3');
See Also
6-195
xtrdr.createInstrument
Related Examples
X_TRADER Price Update on page 2-8 X_TRADER Price Update Depth on page 2-10 X_TRADER Order Submission on page 2-14
6-196
xtrdr.createNotifier
Input Arguments
Input structure with fields corresponding to valid X_TRADER API options. For details, see the Trading Technologies X_TRADER API Programming Tutorial or X_TRADER API Class Reference.
Examples
Define an input structure, S, with fields corresponding to valid X_TRADER API options.
S = []; S.Instrument = []; S.UpdateFilter = ''; S.EnablePriceUpdates = -1;
6-197
xtrdr.createNotifier
S.EnableDepthUpdates = 0; S.DebugLogLevel = 3; S.EnableOrderSetUpdates = -1; S.PriceList = []; S.DeliverAllPriceUpdates = 0; S S = Instrument: UpdateFilter: EnablePriceUpdates: EnableDepthUpdates: DebugLogLevel: EnableOrderSetUpdates: PriceList: DeliverAllPriceUpdates: [] '' -1 0 3 -1 [] 0
Create an xtrdr instrument using name-value pairs corresponding to valid X_TRADER API options.
createNotifier(X,'Instrument',[],'UpdateFilter','',... 'EnablePriceUpdates',-1,'EnableDepthUpdates',0,... 'DebugLogLevel',3,'EnableOrderSetUpdates',-1,... 'PriceList',[],'DeliverAllPriceUpdates',0);
6-198
xtrdr.createNotifier
X_TRADER Price Update on page 2-8 X_TRADER Price Update Depth on page 2-10 X_TRADER Order Submission on page 2-14
6-199
xtrdr.createOrderProfile
the structure S with fields corresponding to valid X_TRADER API options. For details, see the Trading Technologies X_TRADER API Programming Tutorial or X_TRADER API Class Reference.
P = createOrderProfile(X,Name,Value) creates an order profile using X_TRADER API options specified by one or more Name,Value pair arguments with names and values corresponding to valid X_TRADER API options. For details, see the Trading Technologies X_TRADER API Programming Tutorial or X_TRADER API Class Reference.
Input Arguments
Input structure with fields corresponding to valid X_TRADER API options. For details, see the Trading Technologies X_TRADER API Programming Tutorial or X_TRADER API Class Reference.
Order profile.
Define an input structure, S, with fields corresponding to valid X_TRADER API options.
6-200
xtrdr.createOrderProfile
S = []; S.Instrument = []; S.Customer = ''; S.Alias = ''; S.ReadProperties = 'b'; S.WriteProperties = 'b'; S.Customers = {'<Default>'}; S.RoundOption = 2; S.CustomerDefaults = []; S S = Instrument: Customer: Alias: ReadProperties: WriteProperties: Customers: RoundOption: CustomerDefaults: [] '' '' 'b' 'b' {'<Default>'} 2 []
Create an order profile using name-value pairs corresponding to valid X_TRADER API options.
6-201
xtrdr.createOrderProfile
6-202
xtrdr.createOrderSet
structure S with fields corresponding to valid X_TRADER API options. For details, see the Trading Technologies X_TRADER API Programming Tutorial or X_TRADER API Class Reference.
createOrderSet(X,Name,Value) creates an order set using X_TRADER
API options specified by one or more Name,Value pair arguments with names and values corresponding to valid X_TRADER API options. For details, see the Trading Technologies X_TRADER API Programming Tutorial or X_TRADER API Class Reference.
Input Arguments
Input structure with fields corresponding to valid X_TRADER API options. For details, see the Trading Technologies X_TRADER API Programming Tutorial or X_TRADER API Class Reference.
Examples
Define an input structure, S, with fields corresponding to valid X_TRADER API options.
S = []; S.Count = 0; S.Alias = ''; S.ReadProperties = 'b';
6-203
xtrdr.createOrderSet
S.WriteProperties = 'b'; S.EnableOrderSetUpdates = -1; S.EnableOrderFillData = 0; S.EnableOrderSend = 0; S.EnableOrderAutoDelete = 0; S.QuotingOrderProfile = []; S.DebugLogLevel = 3; S.QuoteWithCancelReplace = 0; S.EnableOrderUpdateData = 0; S.EnableFillCaching = 0; S.AvgOpenPriceMode = 'NONE'; S.EnableOrderRejectData = 0; S.OrderStatusNotifyMode = 'ORD_NOTIFY_NONE';
Create an order set using name-value pairs corresponding to valid X_TRADER API options.
createOrderSet(X,'Count',0,'Alias','','ReadProperties','b',... 'WriteProperties','b','EnableOrderSetUpdates',-1,... 'EnableOrderFillData',0,'EnableOrderSend',0,... 'EnableOrderAutoDelete',0,'QuotingOrderProfile',[],... 'DebugLogLevel,3,'QuoteWithCancelReplace',0,... 'EnableOrderUpdateData',0,'EnableFillCaching',0,... 'AvgOpenPriceMode','NONE','EnableOrderRejectData',0,... 'OrderStatusNotifyMode','ORD_NOTIFY_NONE');
6-204
xtrdr.createOrderSet
6-205
xtrdr.getData
Purpose Syntax
Description
instrument object, S, with fields corresponding to valid X_TRADER API options. For details, see the Trading Technologies X_TRADER API Programming Tutorial or X_TRADER API Class Reference.
D = getData(X,S,F) returns data for the fields F for the xtrdr
instrument aliases, S.
D = getData(X,F) returns data for the fields F for all instruments associated with the xtrdr session object, X.
Input Arguments
Instrument object or aliases with fields corresponding to valid X_TRADER API options. For details, see the Trading Technologies X_TRADER API Programming Tutorial or X_TRADER API Class Reference.
F
Fields for the instrument object or aliases, S. F without a corresponding S are fields for all instruments associated with the xtrdr session object, X.
Output Arguments
X_TRADER data.
6-206
xtrdr.getData
Examples
xtrdr | xtrdr.createInstrument
6-207
yahoo
See Also
6-208
yahoo.builduniverse
'd' for daily values 'w' for weekly values 'm' for monthly values
Tips
Data providers report price, action, and dividend data differently. Verify that the data returned by this method contains the expected results. Compute a total return price series and convert to daily total returns:
y = yahoo; % % Load security list. s = {'A', 'B', 'C'}; % Get a daily total return price series for securities. % (Calculated from prices, splits and dividends.) Universe = builduniverse(y,s,'1/15/2007',floor(now)); % Convert to daily total returns. Universe = periodicreturns(Universe,'d');
Examples
See Also
yahoo.fetch | yahoo.trpdata
6-209
yahoo.close
Connect
6-210
yahoo.fetch
Purpose Syntax
Arguments
Connect Security
Yahoo! connection object created with the yahoo function. A MATLAB string or cell array of strings containing the name of a security in a format recognizable by the Yahoo! server. Note Retrieving historical data for multiple securities at one time is not supported for Yahoo!. You can fetch historical data for only a single security at a time.
6-211
yahoo.fetch
Fields
A MATLAB string or cell array of strings indicating the data fields for which to retrieve data. A partial list of supported values for current market data are: 'Symbol' 'Last' 'Date' 'Time' Note 'Date' and 'Time' are MATLAB date numbers. ('Time' is a fractional part of a date number. For example, 0.5 = 12:00:00 PM.)
'Change' 'Open' 'High' 'Low' 'Volume' A partial list of supported values for historical data are: 'Close' 'Date' 'High' 'Low' 'Open' 'Volume' 'Adj Close'
6-212
yahoo.fetch
For a complete list of supported values for market and historical data, see yhfields.mat.
Date
Date string or serial date number indicating date for the requested data. If you enter todays date, fetch returns yesterdays data. Beginning date for historical data. Note You can specify dates in any of the formats supported by datestr and datenum that show a year, month, and day.
FromDate
ToDate Period
End date for historical data. Period within date range. Period values are: 'd': daily 'w': weekly 'm': monthly 'v': dividends
Description
data = fetch(Connect, 'Security') returns data for all fields from Yahoo!s Web site for the indicated security.
Note This function does not support retrieving multiple securities at once. You must fetch a single security at a time.
data = fetch(Connect, 'Security', 'Fields') returns data for
6-213
yahoo.fetch
Examples
6-214
yahoo.fetch
See Also
6-215
yahoo.get
Purpose Syntax
Arguments
Connect PropertyName
Yahoo! connection object created with the yahoo function. (Optional) A MATLAB string or cell array of strings containing property names. Currently the only property name recognized is 'url'.
Description
value = get(Connect, 'PropertyName') returns the value of the specified properties for the Yahoo! connection object. value = get(Connect) returns a MATLAB structure where each field name is the name of a property of Connect. Each field contains the
Examples
6-216
yahoo.get
See Also
6-217
yahoo.isconnection
Connect
Description Examples
See Also
6-218
yahoo.trpdata
Tips
Data providers report price, action, and dividend data differently. Verify that the data returned by this method contains the expected results.
6-219
yahoo.trpdata
6-220
A
Examples
Use this list to find examples in the documentation.
Examples
A-2
Index
B
Index
E
eSignal 6-68 exec Kx Systems, Inc. 6-124
C
close 6-137 Bloomberg 6-3 FactSet 6-89 FRED 6-97 Haver Analytics 6-104 Interactive Data Pricing and Reference Datas RemotePlus 6-116 Kx Systems, Inc. 6-123 Reuters 6-164 Thomson Reuters Datastream 6-61 Yahoo! 6-210 connection object 2-3 CUSIP number 6-7
F
factset 6-88 Federal Reserve Economic Data (FRED) 6-96 fetch 6-138 Bloomberg 6-4 FactSet 6-90 FRED 6-98 Haver Analytics 6-105 Interactive Data Pricing and Reference Datas RemotePlus 6-117 Kx Systems, Inc. 6-126 Reuters 6-167 Thomson Reuters Datastream 6-62 Yahoo! 6-211 fred 6-96 functions Bloomberg bloomberg 6-2 close 6-3 fetch 6-4 get 6-12 getdata 6-14 history 6-15 isconnection 6-18 isfield 6-19 lookup 6-20 pricevol 6-22 realtime 6-21 showtrades 6-24 stockticker 6-26 stop 6-28 timeseries 6-30 esig 6-68 FactSet
D
data servers disconnecting from 2-7 retrieving connection properties 2-5 data services connection requirements 1-4 for FactSet data server 1-5 for Reuters data server 1-5 for Thomson Reuters Datastream data server 1-8 proxy information 1-4 software 1-4 data service providers 1-3 Datafeed Dialog Box starting 4-3 datastream 6-60 dftool 4-3 disconnecting from data servers 2-7
Index-1
Index
close 6-89 factset 6-88 fetch 6-90 get 6-93 isconnection 6-95 FRED close 6-97 fetch 6-98 fred 6-96 get 6-100 isconnection 6-101 Haver Analytics aggregation 6-103 close 6-104 fetch 6-105 get 6-107 haver 6-102 havertool 6-113 info 6-108 isconnection 6-110 nextinfo 6-111 Interactive Data Pricing and Reference Datas RemotePlus close 6-116 fetch 6-117 get 6-119 idc 6-115 isconnection 6-120 iqf 6-76 iqf.close 6-77 iqf.history 6-78 iqf.marketdepth 6-80 iqf.news 6-82 iqf.realtime 6-84 iqf.timeseries 6-86 Kx Systems, Inc. close 6-123 exec 6-124 fetch 6-126 get 6-128
insert 6-129 isconnection 6-130 kx 6-121 tables 6-131 Reuters close 6-164 fetch 6-167 get 6-170 history 6-171 reuters 6-152 stop 6-174 Reuters Datascope Tick History fetch 6-138 rdth 6-132 rdth.close 6-137 rdth.get 6-142 rdth.isconnection 6-145 rdthloader 6-149 rnseloader 6-176 Thomson Reuters Datastream close 6-61 datastream 6-60 fetch 6-62 get 6-66 isconnection 6-67 Yahoo! close 6-210 fetch 6-211 get 6-216 isconnection 6-218 yahoo 6-208
G
get 6-142 Bloomberg 6-12 FactSet 6-93 FRED 6-100 Haver Analytics 6-107
Index-2
Index
Interactive Data Pricing and Reference Datas RemotePlus 6-119 Kx Systems, Inc. 6-128 Reuters 6-170 Thomson Reuters Datastream 6-66 Yahoo! 6-216 getdata Bloomberg 6-14 graphical user interface 4-1
K
kx 6-121
L
lookup Bloomberg 6-20
N
nextinfo Haver Analytics 6-111
H
haver 6-102 to 6-103 Haver Analytics 6-102 to 6-103 havertool 6-113 Haver Analytics 6-113 history Bloomberg 6-15 Reuters 6-171
P
pricevol Bloomberg 6-22
R
rdth 6-132 rdthloader 6-149 realtime Bloomberg 6-21 retrieving connection properties 2-5 reuters 6-152 Reuters Reuters Configuration Editor 1-5 Reuters Datascope Tick History file. See rdth. See rdthloader Reuters Newscope. See rnseloader rnseloader 6-176
I
idc 6-115 info Haver Analytics 6-108 insert Kx Systems, Inc. 6-129 IQFeed 6-76 to 6-78 6-80 6-82 6-84 6-86 isconnection 6-145 Bloomberg 6-18 FactSet 6-95 FRED 6-101 Haver Analytics 6-110 Interactive Data Pricing and Reference Datas RemotePlus 6-120 Kx Systems, Inc. 6-130 Thomson Reuters Datastream 6-67 Yahoo! 6-218 isfield Bloomberg 6-19
S
Securities Lookup dialog box 4-9 showtrades Bloomberg 6-24 stockticker Bloomberg 6-26 stop
Index-3
Index
T
tables Kx Systems, Inc. 6-131
Y
yahoo 6-208
Index-4