Skip to main content

Position Maintenance

Use case: Initialize trading history

As a PM, when I deploy a strategy in Deltix, I want to be able to initialize its trading history in Deltix to see the strategy P&L curve and overall performance reports, because the strategy was previously traded outside of Deltix. Two options:

  1. Load only initial positions. Solution: You can use Ember's Java API to send series of PositionSnapshot messages as shown in this Java sample or you can use adjust position REST API as shown in this JavaScript sample.
  2. Load all historical executions. Solution: Refer to UHF History Exporter. This utility analyzes historical trades in SQL database and for each trade it injects an order and trade event into Ember Journal.

Use case: Prune trading history

As a PM, when I deploy a strategy in Deltix, I want to be able to clean up its previous trading history in Deltix, because I want to start the strategy:

  1. From scratch (delete the entire history for the strategy).
  2. Keep only trading history for the last N trading days (for daily traders who do not have GTC orders).

Solution: Please note that automatic trading history prunning already built into ember journal compactor. As time goes by, older orders are discarded from journal, their cumulative trade effect on actual position is preserved using position snapshots.

Alternatively you can use journal transformer if you want to implement custom history prunning.

note

Ember Journal Compactor automatically prunes trading history. This process expunges old inactive orders and compresses historical trades into position snapshots.

Use case: Reconcile positions

As a PM, when the trading history has discrepancies, I want to reconcile positions in Deltix against my brokerage reports, because positions in Deltix needs to be in-synch with positions on the broker side:

  1. Reconcile only positions against the broker’s EOD ones.
  2. Reconcile executions against the cleared executions from the broker.

Solution: Use Adjust Position button on Positions panel of Ember Monitor.

In some cases your reconsilation report may show a few trades that were not registered on Deltix side. One way of adjusting position is entering dummy order into special Ember algorithm like SIM or CORRECTION. These algorithms allow to auto-fill any input order according to limit price.

Use case: Remove obsolete instruments

As a PM, when I delete an instrument from Deltix, I want to be able to smoothly remove it everywhere in Deltix, because the instrument is not needed anymore (i.e., outdated, expired, used for testing purpose only, added mistakenly), I do not need its trading history in Deltix

Solution: Ember solves this case automatically. Eventually Journal Compactor will expunge orders for obsolete instruments from the journal (assuming they all in final states). Position snapshot for obsolete instrument can be expunged using journal transformer.

TODO: transformer function example.

Use case: external trades

As a PM, when I have some trades outside of Deltix (i.e., done by phone, due to Deltix outage, not reported by the broker via FIX), I want to be able to add those trades into Deltix, insert into the existing history retrospectively, because it is important for me to see the historical PNL curve, calculate year-to-date, quarter-to-date, month-to-day, week-to-date PNL

Solution: Use SIM or CORRECTION algorithms.