Previous  Next

Exchange Risk Management Model

The trading platform provides different risk management models, which define the type of pre-trade control. At the moment, the following models are used:

Basic Terminology

Exposure

Assets — the current value of purchased financial instruments (of long positions) defined in a trader's deposit currency. The value is determined dynamically based on the price of the latest deal of the financial instrument, taking into account the liquidity margin rate. In fact, the amount of assets is equivalent to the amount of money that the trader would receive in case of immediate closure of long positions.

Assets = Size1 * Price1 * L1  + Size2 * Price2 * L2 + ... +SizeN * PriceN * LN

Where:

Only liquid instruments can be used as collateral.

Liabilities

Liabilities are obligations on current short positions calculated as the value of these positions at the current market price. In fact, the amount of liabilities is equivalent to the amount of money that the trader would pay in case of immediate closure of short positions.

Liabilities = Size1 * Price1  + Size2 * Price2 + ... +SizeN * PriceN

Where:

Balance (own funds)

Balance — the trader's own funds on the account.

Equity (portfolio value)

Equity is calculated by the following formula:

Equity = Own Funds + Assets - Liabilities - Commission

Margin

Calculation Features

On the spot market, as opposed to the futures and forward markets (characterized by margin movement), payment and receipt of assets (or liabilities in the event of repurchase) occur immediately at the moment of deal conclusion. Accordingly, the transaction value is immediately reflected on the trader's balance.

Since the payment for the instrument purchase or sale is always made in full, the margin is only used as an indication of the trading account state, which determines the possibility of opening new positions or necessity to close out existing positions.

Margin Calculation

The margin is the capitalized assessment of trader's positions:

Margin = Size1 * Price1 * MarginRate1  + Size2 * Price2 * MarginRate2 + ... + SizeN * PriceN * MarginRateN

Where:

Discounts

Example of Opening a Long Position

For example, the trader's initial balance is 1,000,000 RUR. The initial and maintenance margin rates are equal to 0.1 and 0.05. For simplicity, we do not take into account the commission size.

Trade operations and price fluctuations

Trader's account state

Buying 1000 shares of LKOH 150 RUR each

  • Balance: 1,000,000 RUR - 1000 * 150 RUR = 850,000 RUR
  • Assets: 1000 * 150 = 150,000 RUR
  • Liabilities: 0 RUR
  • Equity: 850,000 RUR + 150,000 RUR = 1,000,000 RUR
  • Initial margin: 15,000 RUR
  • Maintenance margin: 7,500 RUR

Price drop to 50 RUR per share

  • Balance: 850,000 RUR
  • Assets: 1000 * 50 = 50,000 RUR
  • Liabilities: 0 RUR
  • Equity: 850,000 RUR + 50,000 RUR = 900,000 RUR
  • Initial margin: 5,000 RUR
  • Maintenance margin: 2,500 RUR

Buying 20,000 shares 50 RUR each

  • Balance: 850 000 RUR - 20 000 * 50 RUR = -150 000 RUR (uses borrowed money)
  • Assets: (1,000 + 20,000) * 50 RUR = 1,050,000 RUR
  • Liabilities: 0 RUR
  • Equity: 1,050,000 RUR - 150,000 RUR = 900,000 RUR
  • Initial margin: 105,000 RUR
  • Maintenance margin: 52,500 RUR

Price drop to 10 RUR per share

  • Balance: -150 000 RUR
  • Assets: 21,000 * 10 RUR = 210,000 RUR
  • Liabilities: 0 RUR
  • Equity: 210,000 RUR - 150,000 RUR = 60,000 RUR
  • Initial margin: 21,000 RUR
  • Maintenance margin: 10,500 RUR

Price drop to 7.8 RUR per share

  • Balance: -150 000 RUR
  • Assets: 21,000 * 7.8 RUR = 163,800 RUR
  • Liabilities: 0 RUR
  • Equity: 163,800 RUR - 150,000 RUR = 13,800 RUR
  • Initial margin: 16,380 RUR
  • Maintenance margin: 8,190 RUR

Note: equity below the initial margin. A trader cannot open new positions, only close existing ones.

Price drop to 5 RUR per share

  • Balance: -150 000 RUR
  • Assets: 21,000 * 5 RUR = 110,000 RUR
  • Liabilities: 0 RUR
  • Equity: 110,000 RUR - 150,000 RUR = -40,000 RUR
  • Initial margin: 11 000 RUR
  • Maintenance margin: 5 500 RUR

Note: equity below the maintenance margin. Broker forcibly closes the trader's position.

Example of Opening a Short Position

For example, the trader's initial balance is 1,000,000 RUR. The initial and maintenance margin rates are equal to 0.1 and 0.05. For simplicity, we do not take into account the commission size.

Trade operations and price fluctuations

Trader's account state

Selling 1000 shares of LKOH 150 RUR each

  • Balance: 1,000,000 RUR + 1,000 * 150 RUR = 1,150,000 RUR
  • Assets: 0 RUR
  • Liabilities: -1,000 * 150 RUR = -150,000 RUR
  • Equity: 1,150,000 RUR - 150,000 RUR = 1,000,000 RUR
  • Initial margin: 15,000 RUR
  • Maintenance margin: 7,500 RUR

Price grows to 300 RUR per share

  • Balance: 1,150,000 RUR
  • Assets: 0 RUR
  • Liabilities: -1000 * 300 RUR = -300,000 RUR
  • Equity: 1,150,000 RUR - 300,000 RUR = 850,000 RUR
  • Initial margin: 30,000 RUR
  • Maintenance margin: 15,000 RUR

Price grows to 1000 RUR per share

  • Balance: 1,150,000 RUR
  • Assets: 0 RUR
  • Liabilities: -1000 * 1000 RUR = -1,000,000 RUR
  • Equity: 1,150,000 RUR - 1,000,000 RUR = 150,000 RUR
  • Initial margin: 100,000 RUR
  • Maintenance margin: 50,000 RUR

Price grows to 1100 RUR per share

  • Balance: 1,150,000 RUR
  • Assets: 0 RUR
  • Liabilities: -1000 * 1100 RUR = -1,100,000 RUR
  • Equity: 1,150,000 RUR - 1,100,000 RUR = 50,000 RUR
  • Initial margin: 110,000 RUR
  • Maintenance margin: 55,000 RUR

Note: equity below the initial margin. A trader cannot open new positions, only close existing ones.

Price grows to 1200 RUR per share

  • Balance: 1,150,000 RUR
  • Assets: 0 RUR
  • Liabilities: -1000 * 1200 RUR = -1,200,000 RUR
  • Equity: 1,150,000 RUR - 1,200,000 RUR = -50,000 RUR
  • Initial margin: 120,000 RUR
  • Maintenance margin: 60,000 RUR

Note: equity below the maintenance margin. Broker forcibly closes the trader's position.

Adjusted Initial Margin Calculation

If a trader has limit orders, then the following formula is used for calculating the initial margin when opening a position.

The adjusted margin is always calculated on the larger side — the aggregate amount of Buy or Sell positions and orders.

Corrected Margin = Max(Margin Buy;Margin Sell)

Long side calculation:

Margin Buy = PositionSize * (PriceMarket - PriceMin) + (PositionSize + OrdersBuySize) * PriceMin * MarginRate + (OrdersBuyValue - OrdersBuySize * PriceMin)

Where:

If the trader's current position is short, and its size is greater than or equal to OrdersBuySize, then Margin Buy is not calculated and is assumed to be 0. In fact, this is a situation where, even if all the trader's buy limit orders are filled, the trader will still have a short position or the position will be completely eliminated.

Short side calculation:

Margin Sell = -PositionSize * (PriceMax - PriceMarket) - (PositionSize - OrdersSellSize) * PriceMax * MarginRate + (OrdersSellSize * PriceMax - OrdersSellValue)

Where:

If the trader's current position is long, and its size is greater than or equal to OrdersSellSize, then Margin Sell is not calculated and is assumed to be 0. In fact, this is a situation where, even if all the trader's sell limit orders are filled, the trader will still have a long position or the position will be completely eliminated.

Let's consider the following example. The trader has:

Calculation:

PriceMin = 40
Price Market = 100
OrdersBuySize = 500 + 300 + 100 = 900
OrdersBuyValue = 500 * 80 + 300 * 60 + 100 * 40 = 62 000
Margin Buy = 1000 * (100 - 40) + (1000 + 900) * 40 * 0.1 + (62 000  - 900 * 40) = 87 900

The total amount of the adjusted initial margin is equal to 87,900.