The Lab

Versions Compared

Key

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

...

User groups, represented by TRADER in this diagram, contain only credentials and represent the most granular division of risk available in Reflector. Individual credential entries do not keep their own positions.

TODO DIAGRAM

Position Model


Gliffy Diagram
displayNameRiskPoolHierarchy
nameRiskPoolHierarchy
pagePin4

Position Model

Inside a risk pool, position is stored as an array of arrays.

  • The outside array is indexed by currency.
  • The inside array is an ordered 4-truple of non-negative values: { Buying, Selling, Bought, Sold }.

Expressed more formally:

A position p is an aggregation of outlays of both open and filled portions of orders made by a set of traders.
A formula f is a mapping from positions to non-negative real numbers. f must be convex.
A limit l is an ordered pair of (f, v) where f is a formula and v is a non-negative real number.
A Position p is said to be in violation of limit l under formula f if and only if f(p) > v.

Volatility

Volatility is essentially an additional and independent multiplier that is applied per-currency to allow Risk managers to treat certain currencies as particularly more or less risky than others.

Valid volatility values range from 0.01 to 100.00, inclusive.
All volatility values default to 1.00, and the USD (Reserve Currency) volatility is currently fixed at a baseline of 1.00
Each risk pool can define its own set of volatility values.

Limits

Limits may be categorized as follows:

...

LaTeX Math Inline
bodyPendingValue = \frac{1}{2} \sum_{c \in currency} ( buying_c + selling_c ) * ExchangeRate_c * Volatility_c

Per-Currency Exposure Limits

A vector of exposure limits, each applying to a single currency, expressed in that currency. This limit can be expressed in either its native currency or in USD (the Reserve Currency), based on a global setting that is loaded at startup:

LaTeX Math Inline
bodyNativeCcyExposureValue_c = max ( buying_c + bought_c - sold_c, selling_c + sold_c - bought_c ) \\ ReserveCurrencyExposureValue_c = NativeCcyExposureValue_c * ExchangeRate_c * Volatility_c


Two levels of enforcement are offered: nothing or everything.

Info

By default, this option is disabled, and  per-currency exposure limits are not enforced; meaning the trader is allowed to accumulate any position in any currency, provided that they do not violate other limits.

If When enabled, then currency limits become mandatory: traders will not be able to trade in a given currency without a limit.

...

Info
By default, this option is disabled, and the trader is allowed to accumulate any position in any currency basket, provided that they do not violate other limits.
If enabled, then currency basket limits become mandatory: traders will not be able to trade in currencies that do not belong to a basket.

Daily Settlement Limit

If ZEBRA_DSL is defined, then daily positions are kept. DSL uses whichever position tracking type is chosen for NOP.

Credit Limits

Net Open Position

Reflector uses the following terms to quantify NOP: Downside, Upside, Exposure, Displacement.

Downside Limit

An upper bound on how much the trader can lose.
This limit first assumes that the upside of every pending trade is gone but the downside remains.
Then, it assumes that all the credited currencies are gone while the debited currencies remain.


LaTeX Math Inline
bodyDownsideValue = \sum_{c \in currency} max ( 0, selling_c + sold_c - bought_c ) * ExchangeRate_c * Volatility_c


Upside Limit

An upper bound on how much the trader can make.
This limit first assumes that the downside of every pending trade is gone but the upside remains.
Then, it assumes that all the debited currencies are gone while the credited currencies remain.


LaTeX Math Inline
bodyUpsideValue = \sum_{c \in currency} max ( 0, buying_c + bought_c - sold_c ) * ExchangeRate_c * Volatility_c

Exposure Limit

This formula nominates one currency (usually USD) as a risk-free asset, then considers positions in all other currencies as risk carrying, pursuant to their absolute value, then scaled by the exchange rate & volatility.


LaTeX Math Inline
bodyExposureValue = \sum_{\substack{c \in currency \\ c \neq USD}} max ( buying_c + bought_c - sold_c, selling_c + sold_c - bought_c ) * ExchangeRate_c * Volatility_c

Displacement Limit

This formula is very similar to the Exposure Limit formula.
In the exposure formula, the upside and downside are reconciled per currency, then summed up. In this formula, they are summed up independently, then reconciled.

LaTeX Math Inline
bodyDisplacementValue = max ( DownsideValue, UpsideValue )

Risk Modes

Reflector has four different risk modes as itemised below (ordered in increasing constriction):

...