0% found this document useful (0 votes)
209 views

Onetick Gui Tutorial

Uploaded by

dipener
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
209 views

Onetick Gui Tutorial

Uploaded by

dipener
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
You are on page 1/ 12

GUI Tutorial

Release 1.7.3
Revised 10/28/2014 OneTick GUI Tutorial
[email protected] ©2005-2014 OneMarketData, LLC, Proprietary and Confidential 2 of 43
Table of Contents
1 INTRODUCTION 3
1.1 Notes on Example Queries and Databases .................................................................................. 5
2 GUI BASICS 7
2.1 Creating and Running Chain Queries: Example ..................................................................... 10
2.2 Creating and Running Graph Queries: Example .................................................................... 17
2.2.1 Selecting tick types in graph queries ............................................................................................... 24
2.3 Time Expressions................................................................................................................................ 24
2.4 Viewing Query Results...................................................................................................................... 24
2.4.1 Plot View ...................................................................................................................................................... 24
2.5 Table Views ........................................................................................................................................... 25
2.5.1 Vertical Table View ................................................................................................................................. 25
2.5.2 Horizontal Table View ........................................................................................................................... 26
2.6 Saving Query Results ......................................................................................................................... 26
2.7 Saving and Loading Query Files .................................................................................................... 27
2.8 OneTick Symbols ................................................................................................................................. 27
2.8.1 Symbol Structure ...................................................................................................................................... 27
2.8.2 Symbol Date ................................................................................................................................................ 28
2.8.3 Symbol Selection ...................................................................................................................................... 28
2.9 Query Profiler ....................................................................................................................................... 29
2.10 Query Debug ......................................................................................................................................... 30
3 EXAMPLE QUERIES (.OTQ SCRIPTS) 32
3.1 Introduction .......................................................................................................................................... 32
3.1.1 Aggregations: tut_aggregations_examples.otq ............................................................................ 32
3.1.2 Filters: tut_filter_examples.otq ........................................................................................................... 33
3.1.3 Corporate Actions: tut_corporate_actions_examples.otq ....................................................... 33
3.1.4 Corrections/Cancellations: tut_corrects_cancels_examples.otq ......................................... 33
3.1.5 Order Book: tut_order_book_examples.otq .................................................................................. 34
3.1.6 Merging Multiple Streams: tut_merge_examples.otq ............................................................... 36
3.1.7 Joining Multiple Streams: tut_join_examples.otq ...................................................................... 37
3.1.8 Portfolio Valuation: tut_portfolio_examples.otq ........................................................................ 37
3.1.9 Other Useful Functionality: tut_misc_useful_examples.otq ................................................... 39
3.1.10 Nested queries: tut_nested_examples.otq .................................................................................... 39
3.1.11 State Variables: tut_state_variables_examples.otq ................................................................... 41
3.1.12 Query Parameters: tut_parameters_examples.otq ................................................................... 42 OneTick GUI
Tutorial
[email protected] ©2005-2014 OneMarketData, LLC, Proprietary and Confidential 3 of 43
1 Introduction
The OneTick GUI provides users with a graphical tool that can be used to view databases, construct,
save and execute queries (i.e., perform analytics), and view and save the results.
OneTick queries time-series data using the event processing methodology. So, in general, OneTick’s
queries are directed acyclic graphs, whose edges are streams of ticks and nodes processed by
OneTick's parameterized analytical event processors. This concept is shown in Figure 1 below.
Key points:
1. The time range of data (time series) to pass through the query is set at the point of execution, so
queries are constructed independently of the data's time range.
2. Queries get executed on lists of securities. Many securities can be processed in parallel. For
example, a chain query that will compute 5-minute VWAPs executed on 100 securities will produce
100 streams of VWAPs – one for each security.

3. A query consists of connected event processors (EPs), which act on each individual tick (or event)
in the input time series.

Figure 1 - Example OneTick Query


The query in Figure 1 will take in a time series of Quotes and Trades for a given set of symbols. For
each symbol, the query will:
1. Filter out trades where the trade price is less than the current mid (calculated from the quote
stream) and output a stream of filtered trades.
2. Calculate a 5 minute VWAP on the filtered trade stream.
OneTick GUI Tutorial
[email protected] ©2005-2014 OneMarketData, LLC, Proprietary and Confidential 4 of 43
3. Read this stream of 5 min VWAPs by 2 separate processors which will output the overall high and
low for the time range defined at execution.

Figure 1 is an example of a OneTick Graph Query; many queries can be represented by a special
kind of graph, where each node has a single parent node and a single child node. In OneTick, such
queries are called Chain Queries.
Figure 2 - Example Chain Query
The OneTick GUI also allows users to construct SQL queries. OneTick GUI Tutorial
[email protected] ©2005-2014 OneMarketData, LLC, Proprietary and Confidential 5 of 43
Figure 3 - Example SQL query
1.1 Notes on Example Queries and Databases
The example queries in this section are also saved in: <install
dir>/one_market_data/one_tick/docs/otqs
The OneTick GUI distribution (installation) contains an example database: <install
dir>/one_market_data/one_tick/examples/data/demo_level1
This database is located as the default database with the name DEMO_L1. It contains a small
sample of TAQ data.
In order to run most of the example queries in this tutorial, a much larger set of data, including
Orderbook data, is required.
Such large example databases can be downloaded from ftp://ftp.onetick.com/DEMO_db.
The FTP site is password protected. Please contact OMD support for username and password.
Please ask your OneTick administrator to install these databases on your server. Note: The locator
file on the OneTick client and server will need to be modified to locate these new databases.
Databases available on the FTP site are the following:
FULL_DEMO_L1, Sample TAQ data for: 20031201, 20050103 – 20050104, 20060601. Available tick
types include QTE and TRD. OneTick GUI Tutorial
[email protected] ©2005-2014 OneMarketData, LLC, Proprietary and Confidential 6 of 43
FULL_DEMO_OB1, Sample NYSE Openbook data for: 20050103 – 20050104, 20060601. Available
tick types include TRD and OB.
FULL_DEMO_OB2, Sample Lava data, for 20060601. Available tick types include TRD, OB, and PRL.
OneTick GUI Tutorial
[email protected] ©2005-2014 OneMarketData, LLC, Proprietary and Confidential 7 of 43
2 GUI Basics
Figure 4 shows the main screen of OneTick GUI.
Shortcut bar
Pull-down Menus
Query Results Window
Source Data Time Parameters
Status Bar
Query List Window
Figure 4 - GUI main screen
Notes:
1. Symbol lists are defined and bound to the query, hence they are not on the main screen. The
Graph/Chain or SQL query wizards will give you options on symbol lists.

2. The Source Data Time Parameters are set prior to running the query and are independent of the
symbol dates specified when defining symbol lists – see section 2.6 for more details on symbols.
3. Results can be viewed as a plot or in tables, or exported to flat files or into Microsoft Excel.

4. The Switch Dataseries button () can be used to select the series used in Plot View.

5. Help file – In some cases, the online help which is installed with the OneTick GUI does not display
correctly due to a Windows security feature that blocks the help
OneTick GUI Tutorial
[email protected] ©2005-2014 OneMarketData, LLC, Proprietary and Confidential 8 of 43
file from displaying. To correct this, find the help's .chm file in the bin directory: <install
dir>/one_market_data/one_tick/bin/OneTickDisplay.chm. Right click on the file
and go to Properties. Click the Unblock button if available. This will enable access to the .chm file. If
you are in doubt, or this action does not work, please contact your OneTick administrator, or email
us at [email protected].
Table 1 - Main Window Areas Description
Area
Pull-down Menus GUI commands

Shortcut Bar Frequently used GUI


commands. Hovering the
cursor over the button will
display a tool-tip with
information about the
button.
Query Results Window Displays query results in the
selected format – Plot view or
various Table views.
This window will not be
populated until a query is
executed and results are
available.
Source Data Time Enter date/time and time
Parameters zone parameters for the
query to be executed.
The default date format is
European; this can be
changed to US in the Tools,
Options window.
Query List Window Shows the queries available
for execution. A single project
file (.otq) can contain
multiple queries. Multiple
queries can be selected for
execution together by
holding CTRL or Shift.
Hovering the cursor over the
query displays the query
details and description.
Status Bar Displays GUI status
information such as the query
execution progress bar, time
taken to run the last query
and start-up context (this is a
set-up parameter referring to
the database location).

You might also like