kx for algolab · kx for algolab builds on that same functionality to provide a robust and ......

16
Kx for AlgoLab Product Overview

Upload: vanquynh

Post on 27-Aug-2018

213 views

Category:

Documents


0 download

TRANSCRIPT

Kx for AlgoLabProduct Overview

Kx for AlgoLab

1

Kx for AlgoLab

A complete environment for testing, validating and profiling algorithmic trading strategies

The case for regular backtesting of trading algorithms to optimize their behavior under ever-changing market conditions has long been established in the front-office. In the wake of Flash Crashes, Central Bank interventions and other market disruptions, regulators, exchanges and internal auditors are now demanding similar regression and stress testing of algorithmic trading strategies to confirm that they are robust and resilient to exceptional market conditions and to ensure they do not lead to price distortion or rogue behavior. FD’s Kx for AlgoLab solution, by capturing and storing all market events, providing a flexible backtest facility, a library of market simulators and a comprehensive audit trail caters for exactly these requirements. Kx for AlgoLab can be used by trading institutions for internal testing and validation of algorithms or by exchanges to provide a testing and validation service to its members to meet new regulatory requirements and assist in an orderly evolution of the market microstructure. In both cases it offers data capture, market replay, simulation and result visualization capabilities to fully explore the robustness, profitability and performance of new trading algorithms. Kx provide an accompanying range of services and support for all its products. We provide a pool of talented and experienced developers with deep domain knowledge to assist clients in developing customised solutions that distinguish them in the market place. We provide services for defining, designing, testing and rolling out new functionality with supporting project management services to ensure control, quality and on-budget delivery. Kx also offers both public and private training services customised to client needs ranging from new system design and implementation guidelines to code optimization and architectural reviews. Kx has operational bases in Europe, North America, Asia and Australia to service its global client base both locally and on a near-shore basis.

Profile algorithm performance and

profitability

Backtest new algorithms against

historical data

Value-added service for clients and

exchange members

Inject synthetic events to simulate desired

conditions

Kx for AlgoLab

2

Product Overview Kx for AlgoLab is based on Streams for Kx, a platform of capturing, storing and analyzing large volumes of data at ultra low latency. It is powered by the high-performance Kx technology used in investment banks and hedge funds for algorithmic trading. The same platform now enables organizations to test the robustness, profitability and performance of automated trading strategies using actual or simulated market rates.

Kx for AlgoLab Testing Platform x A test harness for satisfying regulatory and internal control demands for

comprehensive functional and stress testing of trading algorithms x A platform for executing, verifying and fine tuning the performance,

robustness and profitability of algorithmic trading strategies x A matching engine and simulators for processing orders against

historical or synthetic trading conditions x An extensive database of historical data and test scenarios with

accompanying audit on test results and test iterations x Reports, dashboard views and analytics on algorithm profitability and

performance

Testing Capabilities (Functional and Stress Testing) x Profile and analyze the performance of any given trading strategy /

algorithm x Run multiple simulations to create a P/L distribution over multiple

scenarios - Select Test Periods - Create Market Scenarios

- Replay historical orders for entire market or chosen instruments

- Create random orders around a reference price - Create Market Shocks (eg Take financials down 5% etc. )

- Analyze Results in reports and interactive Dashboards

What it is

What it does

1 Orders submitted to AlgoLab from

Client’s algos and existing order management

systems

2 Matching engine and simulators process orders against market

date to determine trade outcomes

3 Results trades and P&L profile calculated and

stored in a kdb+ database

4 Test reports and analyzes stored,

audited and distributed to

users

Kx for AlgoLab

3

Why Kx for AlgoLab FD provides trading and risk management solutions for low-latency, high-performance algorithmic trading. Its products cover the development, deployment, data capture and execution of strategies by traders and the platform can also be used for trade monitoring and market surveillance by regulators and exchanges. Kx for AlgoLab builds on that same functionality to provide a robust and comprehensive environment for testing the profitability and performance of algorithmic trading strategies against actual and simulated market conditions.

x The Kx platform upon which Kx for AlgoLab is based specializes in supporting HFT and algorithmic trading requirements.

x It is built on the world’s leading time series database from Kx Systems, a subsidiary of FD. x FD’s client base includes global banks, securities companies, hedge funds, exchanges,

regulators and brokers. .

Kx for AlgoLab is a CEP-based solution, incorporating an expansive tick database including real-time and historical data, flexible analytics and

dashboard visualization of results.

Kx for AlgoLab

4

Backtesting The screenshots below illustrate an example of backtesting an FX Strategy:

The first step is the capture and processing of orders from the client algo system into the Kx FX matching engine.

In the matching engine they are processed along with market data from one or many simulators (explained in more detail later) to determine trade outcomes.

The matching engine publishes order, order book and trade information back to the client algo engine and also to Kx for AlgoLab databases for storage and further analysis.

Kx for AlgoLab provides Dashboards and reports on algo performance, profitability and market impact.

The Kx for AlgoLab Matching Process Note: The matching engine’s purpose in this case is to emulate an FX ECN. For more complex or customized requirements (for example, in a securities market where there may be special order types / auction periods) the Kx matching engine can be replaced by the exchanges’ matching engines which reflect the rules, trade sessions and order types of those particular markets. This approach is particularly beneficial to end-users as they do not have to change their trading interfaces – they simply redirect them to Kx for AlgoLab. In this example, a TWAP strategy was deployed to place a Buy order to clear the entire volume at the best Ask price every 15 seconds. The screenshot below illustrates the generation of a trade (red shading) between an algorithm order and the simulated market data.

Latest Prices Trades

Trade Volume Heat Map (by CCY pair)

Trade Counts (by CCY pair)

Top 5 Price Levels of Bid and Offer

Kx for AlgoLab

5

Viewing Algo Performance The application in the top left of the screenshot links to the algorithm engine from which the TWAP algo can be started, stopped and reconfigured. (Note: this is available in this case as the strategy was developed and executed from Kx for Algos, an accompanying application on the Kx platform. Proprietary Algo trading solutions can also interface with the platform so that their user interfaces can be similarly leveraged.) The graph at the bottom left shows the traded price of the EURUSD over the last minute of trading. The blue shading behind the price curve represents the trade volume as a result of the Historical and Random Simulators interaction. The red shading shows the volume traded as a result of the algo’s interaction with the Random Simulators. The price ladder table on the bottom right of the screen shows the volume at the top 5 price levels. Overall, these and additional analyses in Kx for AlgoLab enable traders, compliance departments and regulators to confirm, with full audit, that rigorous testing has been conducted and market impact has been comprehensively assessed.

Figure 1 - Algo Strategy Launch and Visualisation Screen. Trading pattern for EURUSD over previous 1 minute of trading.

View P/L over historical rates

Stress test against extreme market

conditions

Analyze performance and

market impact

View impact on other strategies

Kx for AlgoLab

6

Market Simulation Market Simulators are designed to generate desired market conditions for testing the performance and robustness of trading strategies. Kx for AlgoLab provides a number of simulation options ranging from straight historical replay for standard backtesting to stress testing and simulated volume replenishment for testing extreme conditions and market impact.

Combinations of simulators can be run simultaneously to create increasingly complex market conditions. For example:

x An adjusted historical replay with shocks to test how an algorithm would have reacted on a particular day had a market event occurred.

x An adjusted historical replay combined with a random process configured to raise or lower the market price gradually rather than suddenly.

x An adjusted historical replay tracking the last traded price to analyze the price impact of a single algorithm.

Below is an example of a Market Replenishment Simulator that has been configured to replace 50% of the volume of an algorithm’s trade over a one second period over two orders. The simulator configuration can be seen in the top right of the screen. The market activity of the algo trades and resulting orders from the replenishment simulator are highlighted in different shades of blue to illustrate the simulator’s order response to the algorithm. The chart at the bottom of the screen highlights the traded volume between the market simulators (blue), market simulators and the algo (red) as well as the market replenishment simulator and algo (green).

Kx for AlgoLab

7

Simulator Control and Parameter Settings All simulators have a user interface which allows the user to set parameters and control behavior. Below are two examples.

The Adjusted Historical Simulator replays all the historical orders observed during a given time slice. The data to be replayed can be retrieved from the client’s own data or a suitable other source. In this scenario, the simulator keeps track of the current price of the currencies in the simulation market and adjusts the price incoming orders it replays accordingly in real time. Sample reference price parameters include:

x Last Traded Price x Mid-Price x Top Of Book

The Market Shock simulator enables specification of price shocks to apply to the market. Shocks can applied through the use of aggressive orders continually changing top of book prices over a specified time interval until the desired price-change target has been achieved. Examples of shocks include taking specified currencies (e.g. G10) down 5% at 11am over a period of 10 minutes or taking a basket of selected currencies up by 1% over the course of 30 seconds Multiple shock events can be specified by the user for any given test instance. A model can be used to determine the message throughput required to bring the market down to the specified level, this will depend upon the desired intensity and duration of the shock.

Order Simulator

Market Shock Simulator

Kx for AlgoLab

8

Analysis and Reports Kx for AlgoLab includes Dashboards for Kx that provide flexible interactive access to results. As an example, to visualize the impact of the trading strategy on the market it is possible to compare the historical data being replayed into the matching engine with the real-time output from the matching engine as below. The topmost chart shows the replay results with algorithmic trades volume highlighted in red while the bottom chart shows the historical results without any algorithmic impact.

To gain a deeper understanding of the algorithm’s behavior, metrics and statistics from the simulated replay are captured, stored and visualized. The screenshot on the right shows the live orders, filled orders, order history, statistics and a Profit and Loss curve for the simulation.

Order, Trade and PnL statistics of the simulated replay.

Comparison of price and volume of EURUSD between an Algo Test Replay (Top graph) and a Historical Replay Unaffected Replay (Bottom Graph)

Kx for AlgoLab

9

Additional Summary Reports Summary Dashboard reports coupled with filters and parameters make it easy to move quickly from high-level overviews to detailed transaction-level analysis.

PnL and volumes traded

Other strategies under test

Order and Trade history

Trade counts and bid/offer spreads

Kx for AlgoLab

10

An Exchange Service Exchanges have an obligation to ensure that they provide a fair, efficient and orderly marketplace for their members. However, as events like the Flash Crash have shown, in the massively interconnected trading environment we have today a malfunction in one exchange can swiftly ripple through to other markets (in that case to the S&P 500 SPDR and many of its components). For that reason they also have a regulatory responsibility to ensure that algorithmic trading strategies executed on their exchange are robust, resilient to exceptional market conditions and do not lead to price distortion or market disruption. This responsibility imposes large costs on exchanges and members alike in terms of test environments, hardware and data. In addition it leads to different testing methodologies, inconsistent approaches and isolated assessments of functionality. A more efficient, more effective and less expensive approach would be to have a shared environment where members could test in a consistent, well-coordinated manner thereby relieving them of excessive cost but gaining in comprehensiveness. This is what Kx for AlgoLab provides.

Exchange members’ algo engines submit orders to Kx for AlgoLab over standard interfaces (and thereby protect the IP on the underlying trading strategies) where multiple simulators operate in parallel to create desired market conditions for testing its performance. The exchange’s matching engine publishes market data in real time and the Kx for AlgoLab analytics engines compute test results and performance profiles.

Kx for AlgoLab

11

Kx for AlgoLab offers two principal testing modes: Individual and Market.

Individual Test

In an Individual test a user can configure and launch a standalone test session. The session will simulate or replay an historical or randomized market and the participant can send orders via his own OMS. The matching engine accepts and matches orders from both the FD simulators and the participant’s external algorithmic trading engine. In this scenario, the FD simulators simulate or replay orders on behalf of the rest of the market. An extension of the individual test is the Enterprise test where multiple users can be configured to connect to the trading engine at the same time.

The individual test enables users to test their strategies

in isolation and without affecting others.

This can be extended to an enterprise-level test to test the interaction with other

strategies in the organization.

Market Test

This test scenario is coordinated by the exchange and all market participants can be invited to participate. In the market test the matching engine will accept orders from each of the participants involved as well as the FD simulator to replicate a full marketplace and test their interdependence.

The market test enables exchanges to test interaction

across all members’ strategies.

In addition to testing client algorithms, Kx for AlgoLab also enables the exchange to monitor its own systems for performance and latency measures.

Process-to-process latency, as well as internal and external latency are

profiled and graphed so that any trends or spikes can be easily

identified.

Live orders can be monitored from the Dashboard and order entry

latency as well as exchange response times are captured.

Kx for AlgoLab

12

Management & Administration Management, control and coordination of testing cycles is crucial to ensure that resources are used optimally and that environments are suitably configured. Kx for AlgoLab enforces a workflow that uses the access control services of the Kx platform to ensure that only appropriately entitled users are able to schedule, define and run system tests.

Test Booking

Test Configuration

Test Schedules

Kx for AlgoLab

13

Case Study A major Asian exchange has implemented Kx for AlgoLab as a service for its members to backtest their algorithmic trading strategies in a realistic and comprehensive manner. The Algo TestLab enables members to interact with market simulators to test, profile and visualize the behavior of their algorithms in simulated market environments. Exchange members interact with market simulators to test, profile, visualize and produce detailed and summary reports on the behavior of their algorithms. Test options include: - An individual test can be configured and scheduled by

the participant (no exchange involvement required). - A Market test can be configured by exchange

operations and run market-wide to test the interaction of algorithms across members.

Simulators provide the following functionality: x Replay historical orders (e.g. orders for a specific period exactly as they occurred). x Create "Noise" (e.g. orders at varying rates around reference prices). x Replay historic orders with price-adjustment (e.g. orders for specific period with price adjustments to simulate market impact x Market Shocks for stress testing.

x Dashboards enable the participants to monitor the performance of their test run strategies against pre-defined metrics.

x Users can run multiple tests simultaneously and view detailed and summary reports and performance metrics in Dashboards for Kx.

x Full audit report on all test iterations and test results for internal and external validation.

Kx for AlgoLab enables the exchange’s members to validate their algorithms in an exchange-provided test harness that interfaces to FD trading simulators to assess the market impact of strategies before they are deployed to market. Kx for AlgoLab and accompanying Dashboards for Kx then enable users to:

o Launch trading simulators to create market noise by interacting with the Exchange’s test matching engine and participants trading algorithms.

o View Strategy Reports and Summaries of their specific test session(s) to understand the performance of their own algorithms against specified market scenarios.

o View Market Data Analytics calculated from the market data output by the test session and an audit trail of the algorithm’s behavior which market participants can make available to the regulators as required.

Kx for AlgoLab

14

FD Corporate FD is a leading provider of software solutions and consulting services to the capital markets industry. Founded in 1996, it occupies a niche market position in terms of deep domain knowledge and technical expertise. Headquartered in Ireland, FD has a global presence with offices across EMEA, the Americas and Asia Pacific.

x Publically held company on London Stock Exchange (LSE FDP.L) x Headquartered in Newry, Co. Down, N Ireland x 1500+ employees worldwide

Consulting Services:

x Multi-Vendor Services – Calypso, Murex, Wall Street, Summit, Opics… x Legal, Regulatory and Compliance x Data Management x Software Development x Big Data and Data Science

Big Data Solutions:

x Streams for Kx – high-volume data capture, analysis and distribution x Kx for Flow– Foreign Exchange trading x Kx for Algos – low-latency trading strategies and execution x Kx for Surveillance – for regulators, exchanges and brokers x Kx for AlgoLab – testing, validating and profiling algorithmic trading strategies

EMEA

Head Office3 Canal Quay,Newry,BT35 6BPN. IrelandTel: +44 (0)28 3025 2242

Belfast11-13 Gloucester Street,BT1 4LSN. IrelandTel:+44 (0)28 9023 3518

DublinFleming Court,D04 N4X9Rep. of IrelandTel: +353 (0)1 630 7700

LondonCannon Green Building,1 Suffolk Lane,EC4R 0AYUnited KingdomTel:+44 (0)207 3371210

Americas

New York45 Broadway,New York,NY 10006USATel:+1 (212) 447 6700

Toronto31 Lakeshore Road East,Mississauga, On,L5G 4V5CanadaTel: +1 (905) 278 9444

Ottawa300 Terry Fox Drive, Kanata, On,K2K 0E3CanadaTel: + 1 (613) 216 9095

Palo Alto #375555 Bryant Street, CA 94301 USA Tel: +1 (650) 798 5155

APAC

Sydney22 Pitt Street,Sydney,NSW 2000AustraliaTel: +61 (0) 2 9236 5700

SingaporeOne Raffles Quay,North Tower,#30-03 Singapore,048583Tel: +65 6592 1960

Hong KongTwo Exchange Square, 8 Connaught Place, CentralTel: +852 2168 0715

TokyoSanno Park Tower,2-11-1 Nagata-cho,Chiyoda-ku,100-6162JapanTel:+81 (0)36 205 3494

www.kx.comKx® and kdb+ are registered trademarks of Kx Systems, Inc., a subsidiary of First Derivatives plc.