Allocating executions automatically using allocation algorithms

LUSID's order management system includes out-of-the-box allocation algorithms, allowing you to automatically allocate executions you've received back from brokers to portfolios. Using allocation algorithms, LUSID can assist in end of day (EOD) processes, such as highlighting remaining allocations that have yet to be booked into a portfolio as a transaction.

When LUSID receives an execution, LUSID generates a new allocation based on your preferred algorithm and the block of orders the execution originated from. You can specify combinations of algorithms to define how daily executions are allocated, from base algorithms to how any leftovers are allocated. This page explains your options and how each algorithm works.

See how to allocate executions.

LUSID's default allocation algorithm evenly distributes the units in an execution, or fills, according to the size of the order. When LUSID receives an execution, the pro rata algorithm decides the percentage of fills to allocate to each order from the block that was placed.

For each order, LUSID divides the number of order fills yet to be received by the total block fills yet to be received. LUSID then multiplies this by the number of fills received in a particular execution, and provides the total number of fills to allocate to each order:

Note: All decimals are rounded down to the nearest integer.

For example, imagine:

  1. You create an order for 30 AAPL US equity shares.

  2. You place the order in the market as part of a larger block of 100 AAPL US equity shares.

  3. You receive an execution of 40 shares.

The pro rata algorithm:

  • Allocates 12 of the shares to your order

  • Distributes the remaining shares amongst other orders in the block

With this algorithm, note:

  • LUSID does not allocate orders more units than the quantity ordered.

  • By default, LUSID allocates any leftover fills (from rounding down decimals, for example) using a secondary ‘round robin’ algorithm with a first in, first out (FIFO) hierarchy (see the section below).

  • If LUSID receives a second execution, LUSID sums and reallocates all fills received so far but not yet booked as transactions (including fills from previous executions) using the selected algorithm (see the section below).

With this method, LUSID allocates one fill to each order in a loop until there are no fills left to allocate. You can use this as a standalone algorithm, or as a secondary algorithm to allocate leftover fills while using the pro rata algorithm.

You must define a hierarchy from the following options to determine which order receives the first fill, the second fill and so on around the loop:

With this hierarchy, LUSID allocates fills one at a time in the sequence the orders were created. For example, if there are two shares in an execution and three orders with outstanding fills, LUSID allocates one share to the first order, and one share to the second order.

Similar to the FIFO hierarchy above, but LUSID allocates fills according to the orders created most recently. For example, if there are two shares in an execution for three orders, LUSID allocates one share to order three, and one share to order two.

With this hierarchy, LUSID allocates fills one at a time starting with the orders requesting the most fills. For example, if there are two shares in an execution and three orders with outstanding fills, LUSID allocates one share to the order with the most shares yet to be filled, and one share to the order with the second most shares.

Similar to the largest order hierarchy above, but LUSID allocates fills according to the orders requesting the fewest fills. If there are two shares in an execution for three orders, LUSID allocates one share to the order with the least shares yet to be filled, and one share to the order with the second least shares.

With the round robin algorithm, note:

  • Fractional fills can be allocated to orders if only a fractional number of fills need allocating, or to prevent over-allocation to an order.

  • LUSID can allocate more fills than the quantity ordered. LUSID over-allocates fills once all orders in the block are 100% executed.

The following table shows how an execution containing 40 AAPL US equity shares might be distributed across a block of three orders using each algorithm:

Order

Shares in order

Shares received in execution

Shares allocated according to selected algorithm

Pro rata (with FIFO if required)

First in, first out

Last in, first out

Largest order first

Smallest order first

A

30

40

12

14

13

13

13

B

15

6

13

13

13

14

C

55

22

13

14

14

13

Importantly, LUSID redistributes allocations every time you receive a new execution, up until the allocations are booked to portfolios as transactions.

For example, if you receive a second execution of 10 AAPL US equity shares for the table of orders above, LUSID reallocates all 50 shares received according to the selected algorithm:

Order

Shares in order

Shares received in first execution

Shares received in second execution

Shares allocated according to selected algorithm

Pro rata (with FIFO if required)

First in, first out

Last in, first out

Largest order first

Smallest order first

A

30

40

10

16 (including +1 leftover share)

18

17

17

18

B

15

7

15 (100% filled)

15 (100% filled)

15 (100% filled)

15 (100% filled)

C

55

27

17

18

18

17

The following table lists all the valid allocation algorithm combinations and their corresponding code values:

Algorithm

Code value

Base algorithm

Hierarchy

Second hierarchy (in the event of a tie in the first hierarchy)

Pro rata

First in, first out

 

PR-FIFO (default)

Largest first

PR-FIFO-LF

Smallest first

PR-FIFO-SF

Last in, first out

 

PR-LIFO

Largest first

PR-LIFO-LF

Smallest first

PR-LIFO-SF

Largest first

 

PR-LF

First in, first out

PR-LF-FIFO

Last in, first out

PR-LF-LIFO

Smallest first

 

PR-SF

First in, first out

PR-SF-FIFO

Last in, first out

PR-SF-LIFO

Round robin

First in, first out

 

RR-FIFO

Largest first

RR-FIFO-LF

Smallest first

RR-FIFO-SF

Last in, first out

 

RR-LIFO

Largest first

RR-LIFO-LF

Smallest first

RR-LIFO-SF

Largest first

 

RR-LF

First in, first out

RR-LF-FIFO

Last in, first out

RR-LF-LIFO

Smallest first

 

RR-SF

First in, first out

RR-SF-FIFO

Last in, first out

RR-SF-LIFO