Document

FX Dealing Accelerator

Quick Start

9thSeptember 2015

Version 0.1

This document outlines basic tasks required to get up and running using the FX Dealing Accelerator

Revision History

Version / Date / Author / Comments
0.1.0 / 09/09/2015 / Kevin Higgins / Initial version

Copyright Notice

COPYRIGHT© 2015 TIBCO Software Inc. This document is unpublished and the foregoing notice is affixed to protect TIBCO Software Inc. in the event of inadvertent publication. All rights reserved. No part of this document may be reproduced in any form, including photocopying or transmission electronically to any computer, without prior written consent of TIBCO Software Inc. The information contained in this document is confidential and proprietary to TIBCO Software Inc. and may not be used or disclosed except as expressly authorized in writing by TIBCO Software Inc. Copyright protection includes material generated from our software programs displayed on the screen, such as icons, screen displays, and the like.

Trademarks

Technologies described herein are either covered by existing patents or patent applications are in progress. All brand and product names are trademarks or registered trademarks of their respective holders and are hereby acknowledged.

Confidentiality

The information in this document is subject to change without notice. This document contains information that is confidential and proprietary to TIBCO Software Inc. and may not be copied, published, or disclosed to others, or used for any purposes other than review, without written authorization of an officer of TIBCO Software Inc. Submission of this document does not represent a commitment to implement any portion of this specification in the products of the submitters.

Content Warranty

The information in this document is subject to change without notice. THIS DOCUMENT IS PROVIDED "AS IS" AND TIBCO MAKES NO WARRANTY, EXPRESS, IMPLIED, OR STATUTORY, INCLUDING BUT NOT LIMITED TO ALL WARRANTIES OF MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE. TIBCO Software Inc. shall not be liable for errors contained herein or for incidental or consequential damages in connection with the furnishing, performance or use of this material.

For more information, please contact:

TIBCO Software Inc.
3303 Hillview Avenue
Palo Alto, CA 94304
USA

Table of Contents

Table of Contents

Table of Tables

1Preface

1.1Purpose of Document

1.2Scope

1.3Referenced Documents

2Overview

2.1Business Scenario

Benefits and Business Value

Functional Objectives

2.2Technical Scenario

2.3Components

3Installation

3.1Base Software

3.2Accelerator Components

3.2.1Trading Component Framework

3.2.2Venue Emulation

3.2.3Demonstration Trading application

3.2.4Live Datamart tables for Market Data and Trades

3.2.5FX Dealing Sample UI

4Build

4.1Building the StreamBase and Live Datamart application

4.1.1Importing This Sample intoStreamBase Studio

5Starting Up

6Demo Start and Control

6.1Access the User Interface

6.2Controlling the FX Dealing Demo

6.2.1Setting the Volume Rung

6.2.2Execute a Trade

6.2.3Instrument Configuration

6.2.4Access via LiveView Desktop and Default Web UI

7User Interface

7.1Top Menu

8Suggested Demo Scripts

Table of Figures

Figure 1 High Level Architecture

Figure 2 How the FX Dealing Accelerator works

Figure 3 Top Level StreamBase application: FXPricing.sbapp

Figure 4 Sample Trading JavaScript UI

Figure 5 Load Demo Application

Figure 6 Project View

Figure 7 FX Dealing Accelerator Homepage on start-up

Figure 8 Default Pricing display

Figure 9 1M rung selected

Figure 10 5M rung selected

Figure 11 Trade Modal

Figure 12 Select trade rung

Figure 13 Realtime Profit and Loss

Figure 14 Instrument Configuration

Table of Tables

Table 1 Referenced Documents

Table 2: TIBCO Components – Event Processing

Table 3 Trading Venues

Table 4 MarketDataSample.lvconf

Table 5 ExecutionDataSample.lvconf

Table 6 ExecutionDataAgg.lvconf

Table 7 Project directories of note

1Preface

1.1Purpose of Document

The following document describes the steps required to get up and running with the FX Dealing Accelerator. It also outlines how to use the signature demo in order to illustrate how the accelerator works.

1.2Scope

This document outlines the following:

  • Required software
  • Installation requirements
  • Post-install steps
  • Running the demo
  • Using the simulator
  • Recommended demo scripts

1.3Referenced Documents

Table 1 Referenced Documents

Document / Reference

2Overview

2.1Business Scenario

The Foreign Exchange (FX) business is the exchange of one currency for another. Currencies are traded over the counter (OTC) at an agreed exchange rate. Unlike the stock market, there are no centralized venues/exchanges. Parties agree on a rate and trade directly. The market operates 24/5, that is from 0100 GMT on Monday (Hong Kong) to 2300 GMT on Friday (Chicago). The market operates a combination of machine and human (voice) trading. The approximate daily turnover in FX trading is $5 trillion, far higher than in Equity (stock) markets.

Benefits and Business Value

The TIBCO FX Dealing Accelerator offers the ability to create an FX trading/pricing application that is both flexible and fast to deploy. An FX platform will typically source prices from a number on venues, or Liquidity Providers (LP). These providers will typically have a FIX API or a proprietary API. For the most part a FIX API is now becoming standard. The TIBCO FX Accelerator provides a framework that connects to LPs and manages the lifecycle of the connection. The burden of maintaining the connection for both Market Data prices and Execution handling is removed. The developer is free to concentrate on adding business specific logic and rules that add value to their organisation.

Functional Objectives

The TIBCO FX Dealing Accelerator and Demo as described, provide an FX Dealing (Pricing and Execution) application. The Stages in this application are out lined in the figure below:

Figure 1 High Level Architecture

In Summary the processing steps are:

  • Ingest Market Data from Liquidity Providers (LPs) via the Trading Components Framework
  • Produced an aggregated view of these prices
  • Create an average calculation of these prices (in our case VWAP volume weighted average price)
  • Apply custom spreads, as loaded in the reference data section (more later)
  • Publish these rates to interested subscribers via TIBCO Live Datamart.

.

2.2Technical Scenario

The FX Dealing Accelerator (FXDA)provides FX Venue connectivity, Market Data and Execution venue handlers, customised spread calculations/distribution and execution modules, simulation, algorithmic trading execution and live monitoring, in one continuous loop. The FXDA provides a template forFX system implementation that reduces time to market from months or years to weeks while enabling the customer to express their unique IP and or business model.

The accelerator is written using TIBCO StreamBase, TIBCO Live Datamart, TIBCO StreamBase component exchange LV Angular Bridge and a customised JavaScript UI. The Trading components framework ships with StreamBase and provides the connectivity and venue handling, along with samples to the following FX venues: 360T, SuperSonic, Barclays BARX, CitiFX, Currenex, Deutsche Bank Autobahn FX, Digitec D3 Streaming Interface, EBS, Exegy Input, FXall, FXSpotStream, GAIN GTX, Goldman Sachs Electronic Trading FX, Hotspot FX Trading System, HSBC FIX, Integral FX Inside, KCG Hotspot FX, LavaFX, MarketFactory™, Morgan Stanley, Nomura FX, Saxo Bank, Thomson Reuters Enterprise, UBS, Wall Street Systems.

The demo illustrates using the building blocks of StreamBase, StreamBase Trading Components Framework, Live Datamart and a sample JavaScript UI. The market data is provided by means of an in built simulator that provides prices based on current market exchange rates.

Live Datamart is used to capture the current state of market data and display information on an interactive, custom developed HTML5 application. This is all built on top of the LDM JS API, which is fully supported.

2.3Components

Figure 2 How the FX Dealing Accelerator works

3Installation

3.1Base Software

The following software is required to develop and/or run the FX Dealing accelerator. The role of each item is outlined in the table below, as well as the recommended installation location.

Table 2: TIBCO Components – Event Processing

Software / Location / Role
TIBCO StreamBase Standard Edition 7.6.X / C:\tibco / Run

Additional configuration:

  • Install the Streambase license file in the appropriate location

3.2Accelerator Components

The primary components of the FX Dealing Accelerator are:

  • Trading Components Framework
  • Market Data/Execution simulator
  • Demonstration Trading application
  • Live Datamart tables for Market Data and Trades
  • Sample Trading JavaScript UI

3.2.1Trading Component Framework

The StreamBase Trading Components Framework simplifies creating foreign exchange trading applications by providing a set of modules and schemas that include market data and execution handlers for more than a dozen FX venues. The framework's packaged modules, parameterized properties, and consistent interfaces simplify many of the complexities normally associated with creating FX trading applications.

At the highest level, the Trading Components Framework packages its modules into two types of venue-specific handlers:

Market Data Handlers

Modules that access streaming market currency exchange data.

Execution Handlers

Modules that communicate trades with execution venues.

Supported Venues

A Trading Components venue is the source of a data feed. All supported venues are for FIX. Market Data handlers for the following venues are currently available in Trading Components. Nearly all venues also have execution handlers, as indicated in the second column.

Note

To connect to venues you must have purchased their associated premium adapters and in some cases downloaded them from tibco.com. Whether packaged withStreamBase softwareor separately, you are only entitled to use premium adapters that are listed in your contract. If theSeparatecolumn in the table contains Yes, the associated adapter comes as a separate download. For a complete list of standard and premium adapters and their usage restrictions,click here.

Table 3 Trading Venues

Venue / Execution / Streaming / RFQ Types / Folder name / Separate
Barclays BARX FIX / Yes / N/A / Spot, NDF / barclays-barx / No
Bloomberg Tradebook FIX / No / Spot / N/A / bbg-tradebook / Yes
CitiFX ESP / Yes / N/A / Spot, Forward, NDF / citifxesp / No
CitiFX Options / No / N/A / N/A / citifxoptions / No
Currenex Market Data / Yes / Spot, Forward / N/A / currenex / No
Deutsche Bank AutobahnFX Classic / Yes / Spot, Forward, Swap / N/A / db-classic-fix / No
Deutsche Bank AutobahnFX Rapid / Yes / Spot / N/A / db-rapid-fix / No
ICAP/EBS / Yes / Spot, NDF / N/A / ebs / No
FXSpotStream FIX / Yes / Spot, Forward / N/A / fxspotstream / No
GAIN GTX / Yes / Spot, Forward / N/A / gain-gtx / Yes
Goldman Sachs / Yes / Spot, Forward / Spot, Forward, NDF, Swap / gs / No
Morgan Stanley / Yes / N/A / Spot, Forward, NDF, Swap / ms / No
Nomura / Yes / Spot / Spot, Forward, Swap / nomura / No
Saxo Bank FIX / Yes / N/A / Spot / saxo / No
UBS Investment Bank / Yes / Spot, Forward, NDF / Spot, Forward, NDF, Swap / ubs / No

3.2.2Venue Emulation

The Trading components Framework provides emulator for the following venues:

  • FXSpotStream
  • Currenex Trading
  • Deutsche Bank AutobahnFX Rapid
  • Nomura Morgan Stanley
  • Deutsche Bank AutobahnFX Classic

This enables demonstrations/development systems to function with connectivity to the actual venue. In the case of the FX Dealing Accelerator we connect to the emulators for FXSpotStream and Deutsche Bank AutobahnFX Classic.

3.2.3Demonstration Trading application

This sample demonstrates how to generate custom Bid-Ask price ladders from Blended Depth of Book market data using the Volume Weighted Average Price. The sample also features a Subscription Manager that can be used to send data downstream to clients at specified time intervals and an Execution Manager that performs real time Profit/Loss calculations. In this sample application we have two FX Market Data providers configured: FXSpotStream and Deutsche Bank AutobahnFX Rapid.

Figure 3 Top Level StreamBase application: FXPricing.sbapp

The accelerator demo code is provided in a workspace format. Once in StreamBase Studio load the Accelerator sample:

  • File->Load StreamBase Sample
  • Type VWAP in the search bar
  • Click on “FX Pricing Sample with VWAP Calculations…”
  • This will load all the necessary components into the current workspace

Reading the sample from left to right, we have an initialization phase containing the module referenceFXSetup. In this module the application loads:

  • inital_spread.csv: This file contains the initial spread settings for each customer Tier and Volume Band. An example row is:EUR,USD,A,1M,4.This tells the spread calculations to apply 4 pips (pip = 1/10000th unit) to the current market mid price.
  • initial_subscriptions.csv/preferences: This file contains a list of subscriptions for a set of currency pairs, and a determined Tier. This means that different subscriptions can have, if desired, different spreads for the same currency pair. The preferences file also specifies a desired publishing rate.
  • initial_executions.csv: This file contains a set of trade executions messages that can be used to pre-populate the application at start up. If this is not desired then the contents of this file should be deleted at startup.

Continuing right to left the subscriptions are sent to theMarketSimulatorand theSubscriptionManager. The market simulator will now generate price data for the currency pairs requested.

Moving onto thePriceCalculationwe meet an example of anExtensionPoint, FXPriceAggregation.sbint.This is an interface with the implementation in this case of a VWAP calculation to obtain an weighted average of the current market data update message. When using this sample to build more exotic trading systems this implementation can be replaced or augmented to achieve the desired method of price generation. This price forms the bases of the Tiered prices that are derived inCustomSpreadCalulator. In this module prices are generated in compliance with the spread that were loaded at start time. It's important to note here that these spreads may be changed at runtime by enqueing an event toFXPricing.WorkingProcessor.FXSetup.ManualSpreadUpdate.When this event is sent, the spreads for the currency pair are re-calculated, and will be published subsequently.

In Client Management there are basic implementations of real time Profit and Loss, and Subscription Management.ExecutionManager.sbappprovides an example of how to calculated profitability on trades executed real-time, and updated as each market data tick is processed.SubscriptionManager.sbappa simple example of how subscriptions are cached and serviced on market data events. A suggested evolution of this module would potentially use heart beating with the Client Subscription to manage the subscription life cycle.

The final stage of our sample application is the output stage. In this example we use the TIBCO Live Datamart to distribute our prices to the sample JavaScript trading UI. Once the data is published to the LDM tables is is available for ad hoc querying and charting through both the JavaScript API and the LiveView desktop client. It is intended that this UI can be used as a starting point to build a customised trading application.

3.2.4Live Datamart tables for Market Data and Trades

The sample uses the Live Datamart to hold both the current prices for distribution, and the current set of executed trades. There is another lvconf file in the project, FXPricing.lvconf, and this is used as a launcher for the the combined StreamBase/Live Datamart project. The LDM data tables are MarketDataSample.lvconf, ExecutionDataSample.lvconf, and ExecutionDataAgg.lvconf:

Table 4MarketDataSample.lvconf

Field Name / Data Type / Description
Time / timestamp / Timestamp of when the price was generated in the Aggregator
ClientID* / string / A unique identifier representing each client subscribing for prices
Currency1* / string / The first (base) currency of the pair
Currency2* / string / The second currency of the pair
Tier* / string / The tier the customer is in. This will determine the spread values they receive
Volume* / string / The Volume band this price represents
Bid / double / The Bid price for this volume band
Ask / double / The Ask price for this volume band

Fields marked with an asterix (*) denote primary key

Table 5ExecutionDataSample.lvconf

Field Name / Data Type / Description
TradeID* / string / A unique identifier representing the trade
ClientID / string / A unique identifier representing the client whom we have traded with
Currency1* / string / The first (base) currency of the pair
Currency2* / string / The second currency of the pair
Tier* / string / The tier the customer is in. This will determine the spread values they receive
Volume* / string / The Volume band this price represents
Bid / double / The price a client can sell at
Ask / double / The price a client can buy at
ExercisedPrice / double / The price the trade was executed at
PL / double / The profit or loss achieved by the client on this trade. This is re-calculated as the market price changes
Side / string / Either "Long" for a buy, or "Short" for a sell
ExecutionTime / timestamp / Timestamp when the trade was accepted

Table 6 ExecutionDataAgg.lvconf

Field Name / Data Type / Description
CurrencyPair* / string / Traded pair
AggQuantity / double / Cumulative traded quantity
AggPosition / double / Cumulative profit or loss

Fields marked with an asterix (*) denote primary key

3.2.5FX Dealing Sample UI

TIBCO Live Datamart provides a JavaScript API to view/interrogate the pricing and trade data. A sample Pricing/Trading UI is provided as a fast start. The Live View Desktop is also available to create ad-hoc continuous queries and charts. Alert rule creation is achieved using the Live View Web UI ( or the LiveView Desktop. In the sample provided there are three main screens: FX Dealing, Real Time Profit and Loss and a Configuration tab.

This web UI is built using the Component exchange LV Angular Bridge and DataMart. On the main trading screen the green and red tiles are the current bid and ask prices. Clicking on these tiles pops up a modal dialog where the user selects the quantity they wish to buy or sell. These trades are then stored in the Live Datamart table "ExecutionDataSample". More detail on screen functionality to follow in the demo walk through.