TWS Accumulate/Distribute Algo Webinar Notes

Overview

The Accumulate/Distribute algo was originally conceived as a way to submit large stock orders and make it difficult for others to detect the orders in the market.

image

Define the Algorithm

Open the algo from the New Window drop-down in the Mosaic. Select More Advanced Tools at the very bottom, then select Accumulate/Distribute.

The Algorithm area is where you set up basic parameters of the algo. Fields shaded pink are required.


image

  1. Select the action, BUY or SELL.
  2. Enter the total order quantity, for example 1,000000.
  3. Define the increment for each component, for example 500.
  4. Specify the timing for submitting the components in seconds, minutes, or hours.
  5. Select the order type. The fields to set the price depend on the order type you select. For stock orders, choose from:
    • Limit - set a limit price with an optional offset amount which must be met or bettered for the order to fill.
    • Market - the order will attempt to fill at the current market price.
    • Relative - use a Relative order to add liquidity to the market by placing a bid or offer that is more aggressive than the current best bid or offer. Set an optional offset amount, and specify a cap. The algo adjusts automatically based on the set criteria as the market moves.
    • RPI (Retail Price Improvement) - similar to a Relative order, except that the offset MUST be greater than zero.
  6. Pick the time in force (Good Till Cancelled or DAY).
  7. Set order price to ... (for RELATIVE/RPI orders) For BUY orders, use the Bid plus any amount (relative order can have a zero offset). For SELL, use the Ask minus any amount. field is only visible for REL orders only and works with the following field:
  8. ...but not higher than (for RELATIVE/RPI orders), this is the price cap, which works in conjunction with the price calculation set in the previous field.
  9. For LMT orders, the field is “Set limit price to: ...”
    For MKT this field does not display.
    Choose from the following calculations: (Enter a negative value to effect a minus offset.)
    • None - for REL orders only. There is no cap on the price.
    • Value - opens a field to set an absolute limit price.
    • Bid - bid plus/minus an optional offset amount.
    • Ask - ask plus/minus an optional offset amount.
    • Last - the last traded price plus/minus an optional offset amount.
    • VWAP - the VWAP plus/minus an optional offset amount.
    • Mov VWAP - the moving VWAP (of the current contract) over the past [specified time period] plus/minus an optional offset amount.
    • Mov Avg - the moving average (of the current contract) over the past [specified time period] plus/minus an optional offset amount.
    • Exp Mov Avg - the exponential moving average (of the current contract) over the past [specified time period] plus/minus an optional offset amount.
    • My Last Trade - the price of the last trade in the algo, shown as the Last Trade Price in the order Summary block. Note that this value cannot be used for the limit price alone since it would have no price for the first trade.
    • Relative to number of units bought/sold - calculates the price cap as: user-defined base price minus user-defined offset value per number of shares relative to the total size traded in the algo, which is reflected in the Shares bought field of the algo Summary block. For example, if the values are: $5.50 - .02 per 100 shares, the cap price for the first 100-share order where Size Traded = 0 would be $5.50. Assuming the trade continues to execute in 100-share increments, the price cap would changes as follows: Size Traded = 100 cap = $5.48; Size Traded = 200 cap = $5.46; Size Traded = 300 cap = $5.44.
    • Relative to position - calculates the price cap the same as Relative to size traded except that the calculation is relative to the position as specified in the Account window and the Position column, while the size traded is relative to what happens only in the Accumulate/Distribute algo.
  10. Click and to add more price conditions to the “but not higher than/not lower than” price capping calculation if available. When you add multiple price-bounding conditions, a new “Greatest of/Least of” selection appears for you to ensure the order price will not be higher(lower) than the greatest of/least of Condition A and Condition B and Condition C .
  11. Start time - by default, the start time is set to the current time, or to the next open if the markets are currently closed. Click in the field to set a new start time, but note that the algo will not start until you hit the Start button.
  12. End time - by default, the end time is set to closing time of the current day, or to the next close is the algo is started outside of regular trading hours. Click in the field to set a new end time.
  13. Time Zone - specify a different start time if needed.
  14. Wait for current order to fill before submitting next order - if checked, the next component will be held until the current quantity fills. The countdown until the Time of next order stops while the algo waits for the current order to fill. Once it fills, the next order is submitted if the specified time interval has elapsed.
  15. Catch up in time - if checked and the algo falls behind, the next order will be placed immediately after the current order fills, disregarding the time interval. This process will repeat until the algorithm has caught up. Missed orders are tracked in the algo Summary block.
    After one order fills, there is always a delay of two seconds before the next order is submitted.
  16. Randomize time period by +/- 20% - if checked, the time interval you specified will be increased or decreased randomly by up to 20% in either direction, to help keep the order from being noticed in the market.
  17. Randomize size by +/- 55% - if checked, the increment size you specified will increase or decrease randomly by up to 55% (rounded to the nearest 100) in either direction, to help keep the order from being noticed in the market.
  18. Allow this order to be filled outside of regular trading hours - if checked order may fill outside regular trading hours.
  19. Take entire offer if the offer size is...and price is...or better- for a buy order, if the current size is greater than or equal to the size entered here, the algo will take the entire size, or as much as will not exceed the total order quantity. This order is submitted as IOC (Immediate-or-cancel).

Define Algo Conditions

All of the conditions are optional, but if you elect to set a condition, any fields that become mandatory for the condition are shaded pink.

Note that the more conditions are specified to be met, the more difficult it may be for your order to completely fill and to fill on schedule.


image

The order will always stop working if any of the conditions you set become false. Use these selections to indicate how the algo should behave once it has stopped:

To clear the values from a condition, click the “x” at the end of the line. The “x” only appears when you have entered data in a field.

  1. Price - Define a range within which the contract price must stay for the order to continue working.
  2. News – Ensure that the price movement will not be affected by news stories by entering a value in minutes. Until there has been no news for your defined time period as the algo will not work. News is monitored by the news suppliers you have set up in TWS, including Google News, Yahoo! Headlines and the Reuters subscription service.
  3. Position – This acts as a floor or ceiling for the position. Not only will TWS not place the order if the Position condition is violated, but it will not fill any order that would leave it violated.
  4. Moving averages for this contract - Define moving average criteria for the current contract. Specify that the current contract’s: moving VWAP, moving average, exponential moving average or last over the past [specified time period] is at least a [specified percent] greater than or less than another moving average (for the current contract) over [specified time period]. To clear the values, click the ‘x’ at the end of the line.
  5. Moving averages for - Compare two sets of moving average criteria, including moving VWAP, moving average, exponential moving average or last. Use the same or tow different contract, for the same time period or for different time periods. Specify the underlying, and then set values.
  6. The next two fields work together to compare the change in price of two stocks over a specified time period, based on the difference between the stock’s price and its moving average. The algo completes the calculation based on your inputs. Enter a symbol. Enter a percent value that must be met by the difference between the two stock calculations.

Transmit and Modify the Algo

Use the buttons along the bottom of the Conditions area to control the algo.


image

Once all fields are complete you can activate the algo.

  1. Preview - Click to update the order line, and to display the Order Preview box.
  2. Transmit - Transmit the order. Additionally, if you modify the order, click to apply changes to the algo. For example, if you change the share increment from 500 to 300, the change will not be recognized until you click the Transmit button.
  3. Save - Saves the order for transmission at a later date.
  4. Restore- click to restore unapplied changes to the original value. For example, you can undo your change by clicking Restore. Once you Apply the change the Restore button is no longer available.
  5. Cancel Order - Cancels the order.
  6. Start - activates the algo. If you stop the algo manually, click Start to resume from where it left off.
  7. Stop - stops the algo. This button will become active once the algo is started.
  8. Reset - if the algo is stopped, either because it has finished or because you have manually stopped it, the Reset button will start the algo from the beginning. If you prefer to resume the algo from where it left off, use the Start button.
  9. Status text: this note tells you what is happening on the current algo screen.

Monitor the Order Progress

The order Summary provides real-time data to let you monitor the progress of the Accumulate/Distribute order. This data applies only to the algo on this page. Use the tab labeled Accum/Dist Summary to view the order progress for all algos currently defined and running.


image

Data in the Summary block monitors the order in real time and tells you:

  1. Share submitted - Shows the number of shares that have currently been submitted.
  2. Shares bought - The total number of shares bought (or sold) to date in the algo.
    • The sliding shading illustrates the percent of the order complete.
  3. Shares remaining - The outstanding quantity.
  4. Last Trade Price - The price at which the last trade in the algo filled.
  5. Average price - The average price to date for the completed portion of the order.
  6. Time of last size increase - The time the last component size filled.
  7. Time until next size increase - The counter counts down the time until the next component size will be submitted.

Summary


image

Use the aggregate Summary tab to see order management lines for all of your Accumulate/Distribute algos. This comprehensive interface allows a single trader to effectively manage multiple algo orders simultaneously. Double-click a line in the Summary to go to that algo.

In addition to moving large blocks of stock through the algo, you can implement many different trading strategies by running an algo on both the buy side and the sell side at the same time. Use the IB PaperTrader (for customers) or the TWS demo to truly understand how the Accumulate/Distribute algo allows a single trader to do the work of many.

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

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