Algorithmic Trading[z]

Source: Internet
Author: User

Algorithmic Trading have been a hot topic for equity/derivative Trading over a decade. Many ibanks and hedge funds have built their own algorithmic trading systems. Simply speaking, algorithmic Trading system is a Artificial Intelligence (AI) system to simulate human traders ' doing It can do it much faster and manage much more orders. From the aspect of purposes, there is the types of algorithmic Trading strategies (algo) in the market. One type of algo being used by hedge fund or proprietary trading, the ultimate goal are to "buy low and sell high". The performance of this type of algo are measured by trading profit from the round trip of buy and sell. The other type being used by agency broker to improve client order execution quality from one trip in buy or sell. The performance of this type of algo are measured by benchmarks, e.g VWAP, arrival price, close price etc.

This article are to discuss some of the popular agency (broker) trading Algo. To see the algorithmic trading system in action, the go http://www.cyanspring.com to take a look at Cyan Spring ATS.

1. Algorithmic TRADING SYSTEM

An algorithmic Trading System is usually quite complicate and can being built quite differently from one broker to another. However, if we break it to functional areas, a typical Algo system usually consists of the following components


1.1 OMS (client orders)

OMS stands Order Management System and it is the place where client orders are held. OMS sends client orders (e.g. DSA orders) to Algo Engine for Algo execution. Algo Engine works on the client order according to the instruction and sends executions and order status back to OMS.

1.2 Historical Market Data

This is usually a DataBase system which stores the raw and/or summarised historical market data so can be requested by a LGO Engine for strategy decision. Examples is volume curve, average bid/ask volume, average bid/ask spread etc.

1.3 Real Time Market Data

Algo Trading systems requires the real time market data to drive most of the tradings. e.g. Bid/ask price, bid/ask volume. Broker can get market data directly from Exchange or through vendors such as Reuters or Bloomberg, Wombat etc.

1.4 Exchange Access

Usually, an Algo Engine wont connect directly to exchange, it can make use of a Exchange interface server which is shared by other trading system (e.g. high touch system), providing the latency is acceptable.

1.5 Algo Engine

The the core part of the Algo trading system, where the artificial intelligence are and where all the Algo strategies s Tore.

2. SOME BASIC ALGO Concepts

This chapter are to talk about some basic but important concepts in algorithmic trading

2.1 Market Impact

The orders require Algo trading is usually large quantity orders. Those orders was quite likely to having huge impact to the market if whole or large part of quantity was released in one shot . Market impact by the order itself can drag the stock price towards the unfavourable side. To prevent a huge market impact, ALGO systems usually send many "slices" into the-the-the-market over a period of time.

2.2 Passive Queuing

To improve execution-price, a-approach is-to-queue the order passively in bid-side (for buy orders) or-ask side (for Sell orders). This was to avoid paying the buy/sell spread. Take a example HSBC (00005.HK) As of now the price are hk$70, buy/selll spread is hk$0.05 or 7.14 base points. Lots of brokers offer execution cost lower than 7 bases points these days, so order passive queuing can make a huge differ ence in the execution cost and profit making.

2.3 Aggressiveness

There is usually the goals for an algo order:

1. Price improvement.
The algo should try to seek price improvement. This implies the order should stay passive and avoid paying the spread

2. Completion of the order.
The algo should execute as much as the quantity of the order as it can towards completion within a defined time. This implies the order need to go aggressive, execute faster and cross the spread if the volume do are behind the trade p Lan.

As can see these, goals is not always consistent. Especially when the moving away, they was actually in conflict. Most of Algos would provide one or a few risk parameters for clients to control the aggressiveness of the Algo orders to BA Lance the need of these and goals.

3. Strategies

Some commonly used broker strategies is discussed below

3.1 VWAP

A VWAP Strategy is benchmarked against the market VWAP or order timed VWAP. A well implemented VWAP strategy should meet or beat the Marke VWAP over the long run by average (and not in every case!)

Implementation

As we discuss above, to avoid market impact, we need to ' slice ' the order over the day with a number of market orders. A VWAP strategy usually requires the 20-60 days averaged historical volume curve from a stock to construct the trade plan. Base on the trade plan, VWAP strategy would try to complete% of the order at certain point of time. The following is a example of VWAP trade plan:

In theory, the VWAP strategy should follow the historical volume as much as possible since the VWAP Algo philosophy is "hi Story would repeat itself. " On the other hand, we want price improvement and we need to queue order passively, but the timing of passive order Executi On is unpredictable since it's subject to some one else in the market hitting your order. To allow certain time frame for passive orders to fill and enforce the volume curve to being followed to certain extent, we C An define an aggressiveness factor. This aggressiveness factor is effectively of a% of volume of slippage. In the chart shown above, the Black series shows the historical VWAP curve. The x axis is the% of the time span. The y axis is the% of the order volume we should complete. The Yellow line shows if we should stop putting passive orders into market. The Purple Line shows if we should cross the spread to catch up when passive orders is not getting filled.
Basically we allow a zone of between yellow and purple lines for the passive order to operate in.

3.2 TWAP

TWAP is similar to VWAP except the the trade plan is a straight linear line up such that it doesn ' t require historical vol Ume curve. TWAP is used if trader believe that a stock doesnt has any volume pattern to follow, e.g. a low liquidity stock.

3.3 POV

A POV strategy can be benchmarked against both
Order timed VWAP and arrival price. POV usually aims to execute a large order with a short time. The philosophy of the POV is to "follow the crowd".

Implementation

The implementation of the POV is relatively simple. Basically the algo system needs to listen to market trade volume and make sure our order follows it. Again, to allow the effect of passive queueing, we can define a aggressiveness factor like VWAP to let passive orders to operate within certain range of slippage.

3.4 is

Is (implementation shortfall) strategy are benchmarked against arrival price. The goal of this strategy are try to execute the order at a price of close to (or better than) the arrival price.

Implementation

The implementation of IS was to execute large amount of order at very begining then slow down the execution gradually. The implementation can similar to POV but with high participation rate at begining and low participation rate towards t He end.

"In the" and "out of the money"

When the stock price goes the same as or better than arrival price, this is called "in the"; While the opposite are called "out of the money". Some people suggest that the ALGO should executes the order more when it's "in the money" while Some people suggest the P Rice factor should is totally ignored.

3.5 MOC

MOC (market in close) is benchmarked against close price. The strategy is-to-execute the order when the time is close-to-market end and take-advantage of close auction (if any) .

Implementation

MOC order usually contains a POV constraint instruction e.g. "30% of market on close." Even no such constraint on the order, we should still follow the magic number of 30% in the market unless the client instructi On are "must complete". The implementation of MOC is to look at the historical average volume curve of the stock. If the order quantity is over 30% of the close volume, we should start execute the order before the close auction and try To keep below 30% of the market.

3.6 SNIPER

A Sniper strategy is quite simple. It doesn ' t queue any passive order in the market. You define the criteria yourself e.g. if best bid price > $ $ and Bid volume >5000, the algo would send a marketable The criteria is met. SNIPER strategy is used for orders which client doesnt want to expose the intention of participation. Examples is those low liquidity stocks.

4. SOME Considerations and Techniques

The is chapter are to discuss some common considerations on algo execution and Tecniques.

4.1 Gaming

As of today, AI system is dumb as comparing to human brain. The merit of AI system is all about it speed, which translate to the capability of working on massive volume of data on a Well defined and quantified domain. One consideration of ALGO implementation is to avoid the "dumb" AI system being gamed by other participants in the market. The techniques include (but not limit to) the following:

      • Avoid falling into a pattern. Add some randomness to your order slices and timing. Do not strictly follow a easy calculated formula.

      • has some threshhold in price and/or volume of your order. Dont let's the market leads your order to a price range, which is especiallly important for low liquidity.

    • With above, feel-implement some alarm system to send alert to human trader if the market goes beyond your Algo def ined thresholds. The human trader should consider pick up the order manually.
4.2 Spread Crossing

When the market Buy/sell spread was one price step, this is easy. But what if the Buy/sell spread are as wide as the price steps? When your order was falling behind the trade plan, does the cross multiple price spreads to catch up? This can is quite costly. Naturally, one might suggest that this can is done with the price step by price step. e.g. post a passive order on best + 1 price step for a buy order and does so again if we don't get filled. One challenge of this
Implementation is the need of avoiding feedback loop. e.g. your best+1 order would change the best price on the market and which would drive your order send a new best + 1. The feedback loop effect would become worse when you had multiple orders of the same stock and same side, since each order Would compete with other and quickly move the market price towards the unfavourable side.

4.3 Multiple level queuing

Now we all know the benefit of passive queuing. To take this a step further, we can implement the multiple passive orders to the queue in the different price level. The benefit is, we have further price improvement when market is moving rapidly towards us (e.g. someone Sending a market type of order-take-out multiple-price-level of orders at your passive orders side). The cost of the implementation complexity plus your is telling the people on the market that ' I am running an algo Order ".

4.4 Trading Risk

As any trading system, a ALGO system bears with trading risk and even more so than others for the obvious reason. Apart from testing perspective to make sure system is rock solid. There is a number of checks and thresholds that we can consider to implement to prevent a algo system go "rogue":

      1. An abosulte price change vs close/open Price. e.g. the Aglo
        Within 10% variation of the last close price.

      1. A "Fair" price check. This can is done by some calculation
        With the combination of open price and last few price movement.

      1. ADV (Average Daily Volume) check. An order over 30% of this
        is considered to being risky and may need hand trading.

    1. Trade frequency check. If a stock has only been traded average times a for the last month. Would you trust algo to trade it?

5. SOME Misconceptions on ALGO

Algorithmic Trading System should is treated as a tool not a trader. It is good to know the strength and weakness where algo lies at.

"A Good algo system should always beat human trader"

Yes and No. Given an experienced human trader and a good algo system, and assign only one algo order (say a VWAP order) for them for a
Day, the human trader should beat the Algo system. However, the human trader would struggle with 50+ VWAP orders, but a good algo system makes no difference of 1 order to Hun Dreds of orders. The strength of algo system, just like any other computer system, lies at the processing power.

"A Good algo system should beat market VWAP"

Not quite. Assuming doing VWAP orders, a good algo system doesn ' t beat
Market VWAP in every order (remember just as doing everything in real life, luck plays a factor here). However, a good algo system can beat market VWAP over the long run by average.

"A Good algo system should work for low liquidity stocks"

As comparing to high liquidity stocks, an ALGO system usually
Perform poorly at low liquidity stocks and so is ready for take some risk. It's worth to mention SNIPER can work well and low liquidity-stock, only if the target price was well defined.

6. SUMMARY

I Wish this brief article gives the some overall idea of what the algorithmic trading is. To see the one in action, you maydownload Cyan Spring Open Source ATS fro

Algorithmic Trading[z]

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.