The Lab

Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

Synopsis

In order for Reflector to accurately enforce risk limits, the system must have a logical method to determine the net open position (NOP) of a user at a given time. Reflector achieves this using the methods outlined below.

Overview

Reflector tracks positions in two separate places:

...

The database, in contrast, runs at a moderate rate maintaining track of the details that relate to the identity & position of every execution. Therefore, during the rollover, a list of updates that must be applied to the reflector runtime process is computed, stored into an event log, and then executed from that log.

Calculation

Every reflector instance has an associated fill database. The database is queried for every fill that belongs to a customer or user (e.g ExampleFund Ltd) where fills are deemed eligible for entry if they are deemed valid and have not expired*. 

...


Reflector begins by identifying the user account, before connecting to the fill database. Reflector will then identify the relevant schema for the user before running a query for the entire set of fills (belonging to the credentials of the user that are valid and have not expired) an example of what such results may look like is displayed in the table below.

 


exec_idcredential_idseq_numinternalvaliditybuy_ccysell_ccybuy_amtsell_amttrade_datesettle_datevenue_namecomp_idtakerclient_idexpires_at_settlement
1232174119ftNZDEUR60114.96360002017012420170130FIX_Venue76000/109331True6792True
12342174172ftNZDEUR83491.5500002017012420170130FIX_Venue76000/109331True6792True
123452174284ftNZDEUR417382.52500002017012420170130FIX_Venue76000/109331True6792True
1234562174293ftNZDEUR83476.5500002017012420170130FIX_Venue76000/109331True6792True
12345672174294ftNZDEUR2504281500002017012420170130FIX_Venue76000/109331True6792True
123456782174737ftNZDEUR1017186.56050002017012420170130FIX_Venue76000/109331True6792True

...


In the example above the trades, all involve the same security pairs. Therefore, it is straightforward to determine the user's present position by creating a total of the NZD amounts and the EUR Amounts, where the user is up in NZD (upside) and down EUR (downside) as the user has orders to buy NZD and sell EUR.