TWS Advanced Trading Tools Webinar Notes

Overview

Accumulate/Distribute Algo

Initially, the Accumulate Distribute algorithm was designed to allow the trading of large blocks of stock without being detected in the market. As we went along, the Accumulate/Distribute algorithm evolved into much more, so that in its current state it can even be set up for high frequency trading.

The algorithm can be deployed for futures, options, forex or any product that can be traded through Interactive Brokers, and it can also be used to trade and then allocate the resulting positions among multiple accounts.


Define the Algo

But let’s start with the simple task of buying stock (Selling works the same way as buying but I will demonstrate everything from the buying perspective).

In this case: We’ll buy 1,000,000 shares of IBKR and want to issue orders in 500-share increments every 30 seconds.

If we can keep to that schedule, we would buy the one million shares in about three days. A 500-share buy order every 30 seconds would of course be immediately detected and subject to someone front running us, so we need to randomize these orders.


Algo

Using the algorithm, we can select “Randomize Time” and “Randomize Size.”


Order Types

The order can be a Limit, Market or Relative Order.

Note: Relative Orders are not supported for products where cancellation fees are levied by the listing exchange.

Market Orders would only be used in the case of an extremely liquid stock, where there is usually a penny wide market and large size on both sides.

Limit and Relative Orders are much more interesting.


Limit and Relative

For relative orders, you must also input an offset to the data point. Say you want to match the prevailing bid, than you put in BID and an offset of zero.

If you want to be aggressive, you could put in the BID +0.01 (one cent). In this case you may also want to make sure that you do not lift the offer if the market is one cent wide, so you may further specify that in no case would you bid more than two cents under the ask.

If you want additional restrictions you may specify, for example,

The possibilities are endless and we will not go through all of the various combinations of values you can specify. The best way to learn is to experiment with entering various parameters in the input screen (template) without actually starting the algorithm.

The next question in specifying how you want the algorithm to operate is to decide whether or not you want to wait for the current order to be filled before the next order is submitted.


Conditions


Conditions


VWAP


Moving Averages


Moving Averages


Moving Averages

START the algo

In addition to moving large blocks of stock through this algo one can implement many different trading strategies by running an algo on the buy side and running one on the sell side at the same time.

To fully appreciate the power of the algorithm and how one trader can do the work of ten or more by using it, you should experiment with the input screen.

Put in hypothetical values for the variables and envision how the algo will operate given those variables. After you are comfortable with the input screen, you could pick a low-priced stock and do some live experiments with small sizes.

It is important to note that you can stop the algo at any time, or you can change any of the parameters while the algorithm is active. These changes however will not become effective until you click on the APPLY button.


Apply Button

If you become a frequent user of Accumulate/Distribute, you will not want to fill out a new template for each occasion from scratch. Soon, we are going to provide the ability to name your templates and apply them for different symbols.


Monitor the Order Progress

The order Summary section for each algo provides real-time data so you can monitor the progress of the order.

Shares bought field uses a shading to indicate the percentage of the order complete.


Summary

When multiple algorithms are working, the AccumDist Summary tab displays order management lines for all of your Accumulate/Distribute algos -- allowing a single trader to effectively manage multiple orders simultaneously.


Summary

Algo in progress:


Algo In Progress

ScaleTrader

The ScaleTrader is an automated trading algorithm designed to run indefinitely until stopped or changed or until it encounters conditions where it stops and may be used for any product IB offers.

The ScaleTrader originates from the notion of averaging down or buying into a weak, declining market at ever lower prices as it bottoms -- or on the opposite side, selling into a rising market or scaling out of a long position.

If, in your judgment a stock is trading near the bottom of its trading range than you can program the scale trader to buy dips and sell at some minimum, specified profit repeatedly. Namely, buy more and more of the stock as it is approaching the bottom of the trading range and sell it as it recovers and buy it again in a subsequent decline. This is trading from the long side.

Similarly, in a somewhat more adventurous position, you can trade from the short side by selling into a rising price at ever higher levels and buy it back at lower levels as it comes down. If you think the stock is fluctuating along a trend line, the algorithm provides for the ability to incorporate such a rising or falling trend line to manage your position accordingly.

We will look the algorithm from the point of view of a long stock trader, but anything said here works also in the reverse and for other IB products, such as futures, options or forex.


Algo

Components

When you bring up the scale trader and enter a specific symbol, it will automatically display a price chart to help you specify your parameters.

For example you can say buy 2,000 CSCO at $22.03 and 500 more every 2 cents down, maximum position 30,000.

After you entered these five parameters, the TOP PRICE and the BOTTOM PRICE will be calculated and displayed.


Top Price

The BOTTOM PRICE is calculated and displayed. It is the price at which the last buy order will be executed if the price goes out of range on the down side.


Bottom Price

Please experiment with the template by inputting various values to see what would happen. The algorithm will not activated until you click the transmit button.


Order Types

Your orders can be limit or relative. Relative orders are offset against the bid price.

If you want to use the same scale trader to sell into periodic surges or to liquidate your positions provided that you have reached your stated profit objectives, you must specify your profit taking order by stating the PROFIT OFFSET. This is the amount of profit you want on a round turn trade.


Algo

As the stock advances, your position will be sold out in the “subsequent component sizes” and at the successive “price increments” that you used when you bought it. Your last sale will happen at the top price plus $3.00.


Profit Orders

Scale Progress

Restore Size after Taking Profit

Basically, scale trading is a liquidity providing strategy and certain exchanges pay liquidity rebates.


Order Management

You may adjust any of the parameters of the algorithm through the order ticket while it is active. Right click on the order row and choose Modify | Order Ticket.

The Scale Progress box displays the complete scale price ladder, the Open/Filled component list for the parent scale order, and the Open/Filled component list for the child profit orders.

A new Scale Trader page (build 898) displays the order management section including all fields for creating scale orders, along with a new Scale Summary panel on the top half of the page.


ScaleTrader

Other IB Algos

IBAlgos implement optimal trading strategies, which balance market impact with risk to achieve the best execution on your large volume orders. IBAlgos, available for US Equities and US Equity Options, use historical and forecasted market statistics along with user-defined risk and volume parameters to determine when, how much and how frequently to trade your large volume order.


Order Management

You can create algo orders from the trading window or using the Order Ticket.

You must use the order Destination field, not the market data Exchange field.


Order Ticket

Common Parameters:

Use the Calendar icon to format time field correctly.

Stock Algos


Arrival Price Algo

Available for US Equities that trade on NYSE, AMEX and NASDAQ.

To achieve the bid/ask midpoint price at the time the order is submitted.

Input Fields:


Percent of Volume Algo

Available for all US Equities.

To participate with volume at a defined rate. Order quantity and volume distribution over the day is determined using the target percent of volume you entered along with continuously updated volume forecasts calculated from TWS market data.

Input Fields


VWAP

Available for all US Equities.

To achieve the Volume-Weighted Average price (VWAP), calculated from the time you submit the order to the close of the market.

Input Fields

Lower commissions than regular guaranteed VWAP orders, but unlike stock VWAP order type, the VWAP price is not guaranteed.

Options Algos


Balance Impact and Risk Algo (Options)

Available for US Equity and Index Options.

To balance the market impact of trading the option with the risk of price change over the time horizon of the order.

Input Fields


Minimize Impact Algo (Options)

Available for US Equity and Index Options

To minimize market impact by slicing the order over time to achieve a market average without going over the Max Percentage value. The max percent you define is the percent of the total daily options volume for the entire options market in the underlying.

Input Fields:

Options Portfolio Algo

Another TWS trading tool, the Option Portfolio, allows you to select, analyze and trade option combinations based on specified Greek risk factors (delta, gamma, vega and theta). This trading and risk management tool can provide mathematically optimized basket orders tailored to solve a desired risk position or hedge.

Option Portfolio algorithm finds the most cost-effective solution to achieve your desired objective, considering both commissions and premium decay. All calculations are done on IB’s back-end processors to help you adjust the risk profile of your portfolio by any of the Greek risk dimensions. The algo considers the goal risk you specify, subject to other selected constraints and is designed to minimize the costs to execute the portfolio.

Launch from the Trading menu. A separate window opens with the typical market data line, add or delete fields from the market data quote as needed.


Option Portfolio

Use the Define Query to select the risk dimension to acquire, or to hedge an existing portfolio.

When Reference Portfolio is selected from the Acquire list, the Compose Portfolio panel opens


Reference Portfolio

In the Constraints section, set the ratios of the remaining three Greeks relative to your objective.

Click the Submit Query button to send your set of requirements to the back-end processor, which responds with a solution that displays in the query results section. If you do not get data, relax the constraints.

Once a solution basket has been created by the back end you can link the Option Portfolio tool to the Risk Navigator with a button.


My Portfolio

You can Freeze the Updates to have more time to examine the proposed solution.

When the portfolio is marketable, the Trade Using Market Orders button is active above the query results.


Intermediate/Advanced level features

For example in the initial solutions, near market options were being proposed in order to arrive at the gamma, ITM options are being selected in their place so that the premium decay is smaller.

Any symbols displayed are for illustrative purposes only and do not portray a recommendation.

Interactive Brokers LLC is a member of NYSE, FINRA, SIPC