37
http://www.tibco.com Global Headquarters 3303 Hillview Avenue Palo Alto, CA 94304 Tel: +1 650-846-1000 Toll Free: 1 800- 420-8450 Fax: +1 650-846-1005 © 2006, TIBCO Software Inc. All rights reserved. TIBCO, the TIBCO logo, The Power of Now, and TIBCO Software are trademarks or registered trademarks of TIBCO Software Inc. in the United States and/or other countries. All other product and company FX Dealing Accelerator Quick Start 9th September 2015 Version 0.1 This document outlines basic tasks required to get up and running using the FX Dealing Accelerator

TIBCO ActiveFulfilmentFramework · Web viewPost-install steps Running the demo Using the simulator Recommended demo scripts Referenced Documents Table 1 Referenced Documents Document

  • Upload
    vohanh

  • View
    218

  • Download
    3

Embed Size (px)

Citation preview

Page 1: TIBCO ActiveFulfilmentFramework · Web viewPost-install steps Running the demo Using the simulator Recommended demo scripts Referenced Documents Table 1 Referenced Documents Document

http://www.tibco.com

Global Headquarters3303 Hillview AvenuePalo Alto, CA 94304Tel: +1 650-846-1000Toll Free: 1 800-420-8450Fax: +1 650-846-1005

© 2006, TIBCO Software Inc. All rights reserved. TIBCO, the TIBCO logo, The Power of Now, and TIBCO Software are trademarks or registered trademarks of TIBCO Software Inc. in the United States and/or other countries. All other product and company names and marks mentioned in this document are the property of their respective owners and are mentioned for identification purposes only.

FX Dealing Accelerator

Quick Start

9th September 2015

Version 0.1

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

Page 2: TIBCO ActiveFulfilmentFramework · Web viewPost-install steps Running the demo Using the simulator Recommended demo scripts Referenced Documents Table 1 Referenced Documents Document

Document

Revision History

Version Date Author Comments

0.1.0 09/09/2015 Kevin Higgins Initial version

FX Dealing Accelerator – Quick Start 2

Page 3: TIBCO ActiveFulfilmentFramework · Web viewPost-install steps Running the demo Using the simulator Recommended demo scripts Referenced Documents Table 1 Referenced Documents Document

Document

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 AvenuePalo Alto, CA 94304USA

FX Dealing Accelerator – Quick Start 3

Page 4: TIBCO ActiveFulfilmentFramework · Web viewPost-install steps Running the demo Using the simulator Recommended demo scripts Referenced Documents Table 1 Referenced Documents Document

Document

Table of ContentsTABLE OF CONTENTS............................................................................................................................ 4

TABLE OF TABLES................................................................................................................................. 7

1 PREFACE........................................................................................................................................ 8

1.1 PURPOSE OF DOCUMENT...........................................................................................................8

1.2 SCOPE...................................................................................................................................... 8

1.3 REFERENCED DOCUMENTS........................................................................................................8

2 OVERVIEW...................................................................................................................................... 9

2.1 BUSINESS SCENARIO................................................................................................................. 9

BENEFITS AND BUSINESS VALUE.............................................................................................................9

FUNCTIONAL OBJECTIVES....................................................................................................................... 9

2.2 TECHNICAL SCENARIO..............................................................................................................10

2.3 COMPONENTS..........................................................................................................................11

3 INSTALLATION............................................................................................................................. 12

3.1 BASE SOFTWARE.....................................................................................................................12

3.2 ACCELERATOR COMPONENTS...................................................................................................12

3.2.1 Trading Component Framework........................................................................................12

3.2.2 Venue Emulation...............................................................................................................14

3.2.3 Demonstration Trading application....................................................................................14

3.2.4 Live Datamart tables for Market Data and Trades.............................................................15

3.2.5 FX Dealing Sample UI.......................................................................................................17

4 BUILD............................................................................................................................................ 20

4.1 BUILDING THE STREAMBASE AND LIVE DATAMART APPLICATION.................................................20

4.1.1 Importing This Sample into StreamBase Studio................................................................20

5 STARTING UP............................................................................................................................... 21

6 DEMO START AND CONTROL....................................................................................................22

6.1 ACCESS THE USER INTERFACE.................................................................................................22

6.2 CONTROLLING THE FX DEALING DEMO.....................................................................................22

6.2.1 Setting the Volume Rung...................................................................................................23

6.2.2 Execute a Trade................................................................................................................24

6.2.3 Instrument Configuration...................................................................................................25

6.2.4 Access via LiveView Desktop and Default Web UI............................................................26

FX Dealing Accelerator – Quick Start 4

Page 5: TIBCO ActiveFulfilmentFramework · Web viewPost-install steps Running the demo Using the simulator Recommended demo scripts Referenced Documents Table 1 Referenced Documents Document

Document

7 USER INTERFACE........................................................................................................................27

7.1 TOP MENU.............................................................................................................................. 27

8 Suggested Demo Scripts................................................................................................................28

FX Dealing Accelerator – Quick Start 5

Page 6: TIBCO ActiveFulfilmentFramework · Web viewPost-install steps Running the demo Using the simulator Recommended demo scripts Referenced Documents Table 1 Referenced Documents Document

Document

Table of Figures

Figure 1 High Level Architecture 9

Figure 2 How the FX Dealing Accelerator works 11

Figure 3 Top Level StreamBase application: FXPricing.sbapp 14

Figure 4 Sample Trading JavaScript UI 17

Figure 5 Load Demo Application 18

Figure 6 Project View 18

Figure 7 FX Dealing Accelerator Homepage on start-up 22

Figure 8 Default Pricing display 23

Figure 9 1M rung selected 23

Figure 10 5M rung selected 24

Figure 11 Trade Modal 24

Figure 12 Select trade rung 25

Figure 13 Realtime Profit and Loss 25

Figure 14 Instrument Configuration 26

FX Dealing Accelerator – Quick Start 6

Page 7: TIBCO ActiveFulfilmentFramework · Web viewPost-install steps Running the demo Using the simulator Recommended demo scripts Referenced Documents Table 1 Referenced Documents Document

Document

Table of TablesTable 1 Referenced Documents 8

Table 2: TIBCO Components – Event Processing 12

Table 3 Trading Venues 13

Table 4 MarketDataSample.lvconf 16

Table 5 ExecutionDataSample.lvconf 16

Table 6 ExecutionDataAgg.lvconf 17

Table 7 Project directories of note 20

FX Dealing Accelerator – Quick Start 7

Page 8: TIBCO ActiveFulfilmentFramework · Web viewPost-install steps Running the demo Using the simulator Recommended demo scripts Referenced Documents Table 1 Referenced Documents Document

Document

FX Dealing Accelerator – Quick Start 8

Page 9: TIBCO ActiveFulfilmentFramework · Web viewPost-install steps Running the demo Using the simulator Recommended demo scripts Referenced Documents Table 1 Referenced Documents Document

Document

1 Preface

1.1 Purpose of DocumentThe 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.2 ScopeThis document outlines the following:

Required software

Installation requirements

Post-install steps

Running the demo

Using the simulator

Recommended demo scripts

1.3 Referenced DocumentsTable 1 Referenced Documents

Document Reference

FX Dealing Accelerator – Quick Start 9

Page 10: TIBCO ActiveFulfilmentFramework · Web viewPost-install steps Running the demo Using the simulator Recommended demo scripts Referenced Documents Table 1 Referenced Documents Document

Document

2 Overview

2.1 Business ScenarioThe 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 ValueThe 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 ObjectivesThe 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

FX Dealing Accelerator – Quick Start 10

Page 11: TIBCO ActiveFulfilmentFramework · Web viewPost-install steps Running the demo Using the simulator Recommended demo scripts Referenced Documents Table 1 Referenced Documents Document

Document

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.2 Technical ScenarioThe 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 for FX 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.

FX Dealing Accelerator – Quick Start 11

Page 12: TIBCO ActiveFulfilmentFramework · Web viewPost-install steps Running the demo Using the simulator Recommended demo scripts Referenced Documents Table 1 Referenced Documents Document

Document

2.3 Components

Figure 2 How the FX Dealing Accelerator works

FX Dealing Accelerator – Quick Start 12

Page 13: TIBCO ActiveFulfilmentFramework · Web viewPost-install steps Running the demo Using the simulator Recommended demo scripts Referenced Documents Table 1 Referenced Documents Document

Document

3 Installation

3.1 Base SoftwareThe 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.2 Accelerator ComponentsThe 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.1 Trading Component FrameworkThe 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

FX Dealing Accelerator – Quick Start 13

Page 14: TIBCO ActiveFulfilmentFramework · Web viewPost-install steps Running the demo Using the simulator Recommended demo scripts Referenced Documents Table 1 Referenced Documents Document

Document

To connect to venues you must have purchased their associated premium adapters and in some cases downloaded them from tibco.com. Whether packaged with StreamBase software or separately, you are only entitled to use premium adapters that are listed in your contract. If the Separate column 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

FX Dealing Accelerator – Quick Start 14

Page 15: TIBCO ActiveFulfilmentFramework · Web viewPost-install steps Running the demo Using the simulator Recommended demo scripts Referenced Documents Table 1 Referenced Documents Document

Document

3.2.2 Venue EmulationThe 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.3 Demonstration 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…”

FX Dealing Accelerator – Quick Start 15

Page 16: TIBCO ActiveFulfilmentFramework · Web viewPost-install steps Running the demo Using the simulator Recommended demo scripts Referenced Documents Table 1 Referenced Documents Document

Document

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 reference FXSetup. 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 the MarketSimulator and the SubscriptionManager. The market simulator will now generate price data for the currency pairs requested.

Moving onto the PriceCalculation we meet an example of an ExtensionPoint, 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 in CustomSpreadCalulator. 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 to FXPricing.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.sbapp provides an example of how to calculated profitability on trades executed real-time, and updated as each market data tick is processed. SubscriptionManager.sbapp a 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.4 Live Datamart tables for Market Data and TradesThe 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:

FX Dealing Accelerator – Quick Start 16

Page 17: TIBCO ActiveFulfilmentFramework · Web viewPost-install steps Running the demo Using the simulator Recommended demo scripts Referenced Documents Table 1 Referenced Documents Document

Document

Table 4 MarketDataSample.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 5 ExecutionDataSample.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

FX Dealing Accelerator – Quick Start 17

Page 18: TIBCO ActiveFulfilmentFramework · Web viewPost-install steps Running the demo Using the simulator Recommended demo scripts Referenced Documents Table 1 Referenced Documents Document

Document

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.5 FX Dealing Sample UITIBCO 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 (http://localhost:10080/lv-web/index.html#/manager) 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.

FX Dealing Accelerator – Quick Start 18

Page 19: TIBCO ActiveFulfilmentFramework · Web viewPost-install steps Running the demo Using the simulator Recommended demo scripts Referenced Documents Table 1 Referenced Documents Document

Document

Figure 4 Sample Trading JavaScript UI

FX Dealing Accelerator – Quick Start 19

Page 20: TIBCO ActiveFulfilmentFramework · Web viewPost-install steps Running the demo Using the simulator Recommended demo scripts Referenced Documents Table 1 Referenced Documents Document

Document

4 Build

4.1 Building the StreamBase and Live Datamart application

4.1.1 Importing This Sample into StreamBase StudioIn StreamBase Studio, import this sample with the following steps:

From the top menu, select File → Load StreamBase Sample.

Select FX Pricing from the Trading Components category.

Click OK.

Figure 5 Load Demo Application

Once this is complete the following will be created in the current workspace:

FX Dealing Accelerator – Quick Start 20

Page 21: TIBCO ActiveFulfilmentFramework · Web viewPost-install steps Running the demo Using the simulator Recommended demo scripts Referenced Documents Table 1 Referenced Documents Document

Document

Figure 6 Project View

In the sample_Frameworks_TradingComponents_fxpricing project we have the following folders of note

Table 7 Project directories of note

Directory Description Role

init_files Reference and test data in CSV format. These files control the custom spreads, initial trades (if required) and subscription information

Ref data

lv-user-webapps

The sample JavaScript Web UI UI

The build stage of the StreamBase Live Datamart demo application is handled as the first phase of the start-up process. There are two choices at this point:

1. Start from inside StreamBase Studio: To start the demo Right click on the folder: sample_Frameworks_TradingComponents_fxpricing. Select Run As->StreamBase LiveWiew Project. This will build the project before starting all the required processes

2. Start from StreamBase Command Prompt: Open a StreamBase 7.6 64 bit Command Prompt. Navigate to the workspace directory type: lv-server run sample_Frameworks_TradingComponents_fxpricing

Both methods will build the workspace accordingly.

FX Dealing Accelerator – Quick Start 21

Page 22: TIBCO ActiveFulfilmentFramework · Web viewPost-install steps Running the demo Using the simulator Recommended demo scripts Referenced Documents Table 1 Referenced Documents Document

Document

5 Starting Up

The start-up stage of the StreamBase Event Flow/ Live Datamart demo application is achieved one of two ways:

1. Start from inside StreamBase Studio: To start the demo Right click on the folder: sample_Frameworks_TradingComponents_fxpricing. Select Run As->StreamBase LiveView Project. This will build the project before starting all the required processes

2. Start from StreamBase Command Prompt: Open a StreamBase 7.6 64 bit Command Prompt. Navigate to the workspace directory type: lv-server run sample_Frameworks_TradingComponents_fxpricing

Both methods will compile and start the Live Datamart config (lvconf) file FXPricing.lvconf. This in turn will start the StreamBase server and the Live Datamart in one step.

FX Dealing Accelerator – Quick Start 22

Page 23: TIBCO ActiveFulfilmentFramework · Web viewPost-install steps Running the demo Using the simulator Recommended demo scripts Referenced Documents Table 1 Referenced Documents Document

Document

6 Demo Start and Control

6.1 Access the User InterfaceIf not running already please see section 5 to start the demo application.

On the machine running LDM you can access the user interface using the URL:

http://localhost:10080/angular-sample/FX_Dealing_Accelerator.html

If the appropriate ports have been opened on your virtual machine, then this URL can be accessed through an external browser as well substituting the correct IP address or DNS name for localhost.

The demo will start to process simulated data automatically. The seed prices are taken from yahoo finance to achieve realistic values.

Figure 7 FX Dealing Accelerator Homepage on start-up

6.2 Controlling the FX Dealing DemoOnce the demo has successfully started prices will appear on the application home screen. These prices represent the Bid and Ask prices. These will stay broadly in line with the current day’s prices for the currency pairs on yahoo finance. If you don’t have an internet connection when running the demo, the

FX Dealing Accelerator – Quick Start 23

Page 24: TIBCO ActiveFulfilmentFramework · Web viewPost-install steps Running the demo Using the simulator Recommended demo scripts Referenced Documents Table 1 Referenced Documents Document

Document

Figure 8 Default Pricing display

6.2.1 Setting the Volume RungOn the Main FX Dealing Tab, now choose which currency pair to change the displayed volume for. In this case we’ll choose EURUSD. Clicking on the price ladder promotes the selected volume to the main display. In Figures 9 and 10 we illustrate this action:

Figure 9 1M rung selected

FX Dealing Accelerator – Quick Start 24

Page 25: TIBCO ActiveFulfilmentFramework · Web viewPost-install steps Running the demo Using the simulator Recommended demo scripts Referenced Documents Table 1 Referenced Documents Document

Document

Figure 10 5M rung selected

As we see above the spread has changed from 4 pips to 8 pips. The definition of the pricing rungs and spreads is described in section 3.2.3 and the csv file is inital_spread.csv.

6.2.2 Execute a TradeNow that there are prices in view and we are happy with prices we see displayed, we are in a position to place a trade. To do this, click on either the SELL (short, green) or BUY (long, red) tiles. This invokes the Trade Modal as seen in Figure 11.

Figure 11 Trade Modal

Next select the desired volume. In this case 3M:

FX Dealing Accelerator – Quick Start 25

Page 26: TIBCO ActiveFulfilmentFramework · Web viewPost-install steps Running the demo Using the simulator Recommended demo scripts Referenced Documents Table 1 Referenced Documents Document

Document

Figure 12 Select trade rung

Clicking OK at this point will send a trade request to the venue emulator and will register a Trade Report in the position keeping table in the underlying StreamBase application.

6.2.3 Check Profit and Loss for TradeClick on the Real Time Profit and Loss tab to observe how the executed trade affects the profitability of our current position.

FX Dealing Accelerator – Quick Start 26

Page 27: TIBCO ActiveFulfilmentFramework · Web viewPost-install steps Running the demo Using the simulator Recommended demo scripts Referenced Documents Table 1 Referenced Documents Document

Document

Figure 13 Realtime Profit and Loss

This Trade Positions table updates in real time via the Live Datamart table ExecutionDataSample.lvconf showing a profit of loss in the PL column

6.2.4 Adding Live Datamart (LDM) AlertNext add an LDM alert that will change the spread for a currency pair based on a rule. In a browser navigate to: http://localhost:10080/lv-web/index.html#/manager.

In this case set the rule to: AggQuantity > 10000000 AND CurrencyPair == 'GBPEUR' for the ExecutionDataAgg LDM table

FX Dealing Accelerator – Quick Start 27

Page 28: TIBCO ActiveFulfilmentFramework · Web viewPost-install steps Running the demo Using the simulator Recommended demo scripts Referenced Documents Table 1 Referenced Documents Document

Document

Next we’ll add an action to execute when the alert is fired.

Navigiate in a web browser to: localhost:10080 and click on “Manage Alert Rules”

Next add an Action: “Send Tuple”

Next trade in GBPEUR until the aggregate amount is > 10,000,000. We should now see the spread set to 999 pips for this currency at the 1M rung

6.2.5 Instrument ConfigurationThe third tab in the sample JavaScript UI is a configuration tab. This enable users to select or de-select currency pairs. This useful as often traded on trade in certain currency pairs. In the example below we have disabled AUDUSD and NZDUSD.

FX Dealing Accelerator – Quick Start 28

Page 29: TIBCO ActiveFulfilmentFramework · Web viewPost-install steps Running the demo Using the simulator Recommended demo scripts Referenced Documents Table 1 Referenced Documents Document

Document

Figure 14 Instrument Configuration

6.2.6 Access via LiveView Desktop and Default Web UIAs mentioned previously the web application is built on the Live Datamart. This means we can access the underlying tables using the both the default web UI and the the LiveView Desktop. This enables us to create alerts and send events into the running streambase application

6.2.6.1 Updating a spread paramter manually via LiveView Desktop

Open the LiveView Desktop and connect to localhost:10080 (note this is the default for for Live Datmart). Select Window->New Send Tuple View

Figure 15 New Send Tuple View

Next click on the gear wheel icon on the Send Tuple View:

Now we can configure the input stream to send an event to. Note this stream must be visible (marked “Always Expose for Enqueue”). The desktop can now interrogate the stream for its schema.

FX Dealing Accelerator – Quick Start 29

Page 30: TIBCO ActiveFulfilmentFramework · Web viewPost-install steps Running the demo Using the simulator Recommended demo scripts Referenced Documents Table 1 Referenced Documents Document

Document

Figure 16 Configure Send Tuple View

Once this configuration step is completed we can update the spread for a specific tier and volume, overriding the start values from initial_spreads.csv.

Figure 17 Update spread parameters

FX Dealing Accelerator – Quick Start 30

Page 31: TIBCO ActiveFulfilmentFramework · Web viewPost-install steps Running the demo Using the simulator Recommended demo scripts Referenced Documents Table 1 Referenced Documents Document

Document

7 Suggested Demo Script

It is usually worth discussing the drivers behind FX Aggregation using some of the material from the slide decks before going in to the demonstration. The content should be tailored to the audience.

First demo should be a simple, happy-path case that allows you to go through the details of the user interface and explain what's going on behind the scenes. A suggested sequence of steps for a demo:

7.1 Scenario 11. Start the demo as detailed above. Allow time for the prices to start appearing in the demo home

page.2. Once the prices are moving describe/discuss the feature of multiple price sources and the

Trading Components underpinning the demo.3. Illustrate the different spreads that are calculated for different volume bands, by clicking on the

volume bands.4. Note the volume band changing in the UI.5. Elaborate the fact that there are different tiers of prices representing differing customer profiles.6. Show the initial_spreads.csv to illustrate point 4. (this is an optional step)7. Click on a BUY or SELL tile. This will pop-up the Trade modal dialog.8. Select one of the offered volumes and click OK.9. Discuss that an Execution Request message will be received by the venue emulator and a

Trade Report will be sent back. This Trade Report is cached in memory.10. Click on the second tab of the application to show the Trade Report table. 11. Note the realtime updating PL (Profit and Loss) column. Discuss the ability to alert on total

exposure/position using TIBCO Live Datamart Alerting.12. Click on the third tab to illustrate a basic configuration screen. This allows one to enable/disable

currency pairs.

7.2 Scenario 2 – Dynamicly Set Spread1. Repeat Steps from Scenario 12. While the spreads are on the screen open the LiveView Desktop client.3. Go to the tab “UpdateSpread” as created in section 6.2.4.14. Update the spread for one of the displayed currency pairs.5. Note the spread updates in real time.

7.3 Scenario – 2 Alert and Set Spread1. Repeat Scenario 1 and 2.2. Using the LiveView desktop create an alert for when the BID or ASK price reaches a specific

threshold. 3. Raise an alert.4. For the alert action send a tuple to widen or narrow spread, as per scenario 2.

FX Dealing Accelerator – Quick Start 31

Page 32: TIBCO ActiveFulfilmentFramework · Web viewPost-install steps Running the demo Using the simulator Recommended demo scripts Referenced Documents Table 1 Referenced Documents Document

Document

FX Dealing Accelerator – Quick Start 32

Page 33: TIBCO ActiveFulfilmentFramework · Web viewPost-install steps Running the demo Using the simulator Recommended demo scripts Referenced Documents Table 1 Referenced Documents Document

Document

FX Dealing Accelerator – Quick Start 33