Try TT Now

Deploying Algorithms

Overview

Before a trader can run an algorithm, the algorithm designer must deploy the algorithm to a Algo SE Server. To deploy an algorithm to a server, a user must be:

  • Logged into the Algo SE with server-specific M/G/T credentials and password.
  • Authorized by a TT User Setup administrator to deploy algorithms to that server. For more information, refer to the TT User Setup Help.

The owner of a successfully deployed algorithm is the M/G/T to which the trader is mapped for Algo SE.

When a user deploys an algorithm, the Algo SE Server compiles the algorithm source code and loads it into memory where authorized users can view and run the algorithm.

Sharing Algorithms

When deploying an algorithm to an Algo SE Server, the user can make the algorithm sharable. A user who is the algorithm owner can also convert an already-deployed, non-shared algorithm to a shared one, and vice-versa. Changes to the shared setting of a strategy have no effect on already-running strategies.

When setting a user’s permissions, the TT User Setup administrator defines whether the user can deploy sharable algorithms for each individual Algo SE server. A user can, therefore, be allowed to deploy sharable algorithms to some Algo SE servers, but not to others.

Sharing Algorithms in a Multi-Broker Environment

The following table illustrates how algorithm sharing is impacted by the credentials used to deploy an algorithm in a multi-broker environment.

Sharable?

Deployer Credentials

Visibility by Non-Administrative User

Visibility by Administrative User

N

Any

Only visible to other users who are mapped to the identical M/G/T with identical Broker and Company ID on all Gateways that the deployer logs into.

An admin user will see the Algo Definition.

Y

Non-administrative TTORD

All users mapped to Gateway XXX with the same Member and Group (M/G) IDs, as well as same Broker and Company IDs can see and run the algorithm.

The algorithm will not be visible to a user mapped to an exchange trader ID – even if the deployer’s TTORD is mapped to this exchange trader ID.

An admin user will see the Algo Definition.

Y

Exchange trader ID

All users mapped to the same Gateway with the same Member and Group (M/G) IDs, as well as same Broker and Company IDs can see and run the algorithm.

The algorithm will not be visible to a user mapped to a TTORD – even if this TTORD is mapped to the exchange trader ID used by the deployer.

An admin user will see the Algo Definition.

Y

Mid-level Administrative TTORD (GroupID=MGR)

All users mapped to Gateway XXX with the same Member ID, as well as Broker and Company ID can see and run the algorithm.*

Y

Super Administrator with Member=TTADM

All users mapped to the same Gateway with the same Broker and Company ID can see and run the algorithm.*

* Because administrative credentials are not permitted to route orders, these algorithm owners can see but cannot run their deployed algorithms.

Note

Because users with administrative credentials cannot submit orders, Algo SE makes all algorithms deployed by an administrator sharable for all users able to see the algorithms.

Sharing Algorithms in a Single-Broker Environment

The following table illustrates how algorithm sharing is impacted by the credentials used to deploy an algorithm in a single-broker environment.

Sharable?

Deployer Credentials

Visibility by Other Users

N

Any

Only other users mapped to the same M/G/T on the Algo SE server can see and run the algorithm.

Y

Non-administrative TTORD

All users mapped to the Algo SE server with the same Member and Group (M/G) IDs can see and run the algorithm.

If a user is mapped to the Algo SE with a non-administrative TTORD login and this non-administrative TTORD is mapped to an exchange trader ID, algorithms deployed by this user will not be visible to a user who is mapped to the exchange trader ID on Algo SE regardless of whether it is sharable or not.

Y

Exchange trader ID

All users mapped to the Algo SE server with the same Member and Group (M/G) IDs can see and run the algorithm.

Algorithms deployed by a user who is mapped to an exchange trader ID on Algo SE will not be visible to any user who is mapped to a TTORD for Algo SE which is, in turn, mapped to this exchange trader ID.

Y

Administrative TTORD (GroupID=MGR)

All users mapped to the Algo SE server with the same Member ID can see and run the algorithm.*

Y

Administrator with Member=TTADM

All users mapped to the Algo SE server can see and run the algorithm.*

* Because administrative credentials are not permitted to route orders, these algorithm owners can see but cannot run their deployed algorithms.
Note

Because users with administrative credentials cannot submit orders, Algo SE automatically makes all algorithms deployed by an administrator sharable for all users able to see the algorithms.

Sharing Algorithms Illustrated

To help illustrate how the relationship between the deployer and other credentials affects algorithm sharing, assume that the following algorithm designers create and deploy algorithms as shown.

Strategy Deployer

Deployer Algo SE Credentials

Strategy Name

Sharable?

Alex

TTORDPM/001/001

6E-Volume

N

Chris

TTORDPM/002/002

ZB-Bear

Y

Mike

TTORDPM/XXX/MGR

ZB-Bull

Y

Sally

TTADM/XXX/MGR

Aggressor

Y

Now, assume that the traders shown in the following table log into the same Algo SE server with the specified credentials. For each of the four deployed algorithms, the table explains why each trader can or cannot see and run the algorithm.

Trader and Credentials

Strategy

See/Run?

Reason

Barbara

TTORDPM/001/001

6E-Volume

Y

Barbara is mapped to the same credentials as Alex, who deployed the algorithm, so she can run the algorithm even though Alex did not share it

ZB-Bear

N

Barbara is mapped to credentials with a different Group ID (002) than Chris (001), so she cannot see the algorithm.

ZB-Bull

Y

Mike and Barbara are mapped to credentials with the same Member ID (TTORDPM), and all traders with the same Member ID as the deployer can see any algorithm deployed by a group administrator (MGR).

Aggressor

Y

Because Sally is mapped to a TTADM login, all traders who can connect to the Algo SE server can use the algorithm.

David

TTORDPM/001/XYZ

6E-Volume

N

Alex did not share the algorithm, so even though David is mapped to credentials with the same Member and Group IDs (TTORDPM/001), David cannot see the algorithm because the credentials are not identical.

ZB-Bear

N

Chris shared the algorithm, but only for those traders who share an order book. David is mapped to credentials with a different Group ID (001) than Chris (002).

ZB-Bull

Y

Because Mike is mapped to credentials with administrative credentials (XXX/MGR), all traders with the same Member ID (TTORDPM) can run the algorithm.

Aggressor

Y

Because Sally is mapped to credentials with a TTADM login, all traders who can connect to the Algo SE server can run the algorithm.

Felix

TTORDPM/002/ABC

6E-Volume

N

Alex did not share the algorithm, so Felix cannot see the algorithm because the credentials are not identical.

ZB-Bear

Y

Chris deployed an algorithm sharable by any trader with the same Member and Group IDs (TTORDPM/002). Because Chris and Felix share an order book, Felix can run the algorithm.

ZB-Bull

Y

Because Mike uses administrative credentials (XXX/MGR), all traders mapped to credentials with the same Member ID (TTORDPM) can run the algorithm.

Aggressor

Y

Because Sally is mapped to credentials with a TTADM login, all traders who can connect to the Algo SE server can use the algorithm.

Tom

TTORDAB/001/ABC

6E-Volume

N

Alex did not share the algorithm, so Tom cannot see the algorithm because the credentials are not identical.

ZB-Bear

N

Chris shared the algorithm, but only for those traders who share an order book. Tom is mapped to credentials with a different Member ID (TTORDAB) than Chris (TTORDPM), so do not share an order book.

ZB-Bull

N

Mike uses Member-level manager credentials, so all traders with the same Member ID (TTORDPM) can run the algorithm. However, Tom is mapped to credentials with a different Member ID (TTORDAB), so he cannot see or use the algorithm.

Aggressor

Y

Because Sally is mapped to credentials with a TTADM login, all traders who can connect to the Algo SE server can use the algorithm.

Persisting Algorithms

When an algorithm is deployed, the source of the algorithm is sent to the Algo SE server. The Algo SE server then compiles the source and loads the compiled code into memory. The source can be optionally persisted. Specifically, if the persistence configuration option is enabled when an algorithm is deployed, the algorithm source is saved to disk.

Persisted algorithms are recompiled and reloaded into memory when an Algo SE Server starts. Algorithms that are not persisted are no longer accessible when an Algo SE Server terminates.

Any user who can see a persisted algorithm can request the source for the algorithm. A user who deploys a persisted algorithm can also specify an optional password which will be required from any user requesting its source.

An owner of an algorithm, i.e. the M/G/T, or an administrator relative to the owner's M/G, can remove a persisted algorithm. Removing deployed algorithms does not require a password even if one was specified when it was deployed. When an algorithm definition is removed, any running instances of that algorithm remain unaffected.

Note

A user must be configured in TT User Setup with the ability to deploy algorithms in order to be able to delete algorithms on the server.