The margin is charged for securing traders' open positions and orders.

The first stage of the margin calculation is defining if an account has positions or pending orders for the symbol, for which a trade is performed.

If the account has no positions and orders for the symbol, the margin is calculated using the formulas below.

If the account has an open position, and an order of any type with the volume being less or equal to the current position is placed in the opposite direction, the total margin is equal to the current position's one. Example: we have a 1 lot EURUSD Buy position and place an order to Sell 1 lot EURUSD (similarly for Sell Limit, Sell Stop and Sell Stop Limit).

If the account has an open position, and an order of any type is placed in the same direction, the total margin is equal to the sum of the current position's and placed order's margins.

If the account has an open position, and an order of any type with the volume exceeding the current position is placed in the opposite direction, two margin values are calculated - for the current position and for the placed order. The final margin is taken according to the highest of the two calculated values.

If the account has two or more oppositely directed market and limit orders, the margin is calculated for each direction (Buy and Sell). The final margin is taken according to the highest of the two calculated values. For all other order types (Stop and Stop Limit), the margin is summed up (charged for each order).

Below are the symbol margin calculation formulas according to their type and settings. The final margin is calculated in three stages:

Generally, margin requirements currency and symbol's base currency are the same. If the margin currency is different, calculation results are displayed in that currency instead of the symbol's base one.

In this mode, a trader leverage is taken into account even if a fixed margin is set.

This type of calculation is also used for Forex symbols. But unlike the previous one, it does not take into account the trader's leverage:

Volume in lots * Contract size

For example, let's calculate the margin requirements for buying one lot of EURUSD, while the size of one contract is 100 000 and the leverage is 1:100. After placing the appropriate values to the equation, we will obtain the following result:

1 * 100 000 = 100 000 EUR

So, now we have the margin requirements value in base currency (or margin currency) of the symbol.

Generally, margin requirements currency and symbol's base currency are the same. If the margin currency is different, calculation results are displayed in that currency instead of the symbol's base one.

Contracts, Exchange Stocks

The margin requirements for contracts and stocks are calculated using the following equation:

Volume in lots * Contract size * Open market price

The current market Ask price is used for buy deals, while the current Bid price is used for sell ones.

For example, let's calculate the margin requirements for buying one lot of #AA, the size of the contract is 100 units, the current Ask price is 33.00 USD.

After placing the appropriate values to the equation, we will obtain the following result:

1 * 100 * 33.00 = 3 300 USD

So, now we have the margin value in base currency (or margin currency) of the symbol.

Contracts Leverage

The leverage is also considered in this type of margin requirement calculation for contracts:

The bond margin is calculated as part of the position value. Bond prices are provided as a face value percentage, so the position value is calculated as follows:

Volume in lots * Contract size * Face value * Price / 100

The part of the position value to be reserved for maintenance is determined by margin ratios.

FORTS Futures

The margin for the futures contracts of the Moscow Exchange derivative section is calculated separately for each symbol: First, the margin is calculated for the open position and all Buy orders. Then the margin for the same position and all Sell orders is calculated.

MarginBuy = MarginPos + Sum(MarginBuyOrder)

MarginSell = MarginPos + Sum(MarginSellOrder))

The largest one of the calculated values is used as the final margin value for the symbol.

Thus, the same position is used in the calculation of both values. In the first formula (which includes Buy orders), the position margin is calculated as follows:

The Highest and the Lowest price of the contract for the current session is used for not yet executed market or stop Buy and Sell orders, respectively. Since the price is not specified in market orders, the trader is charged the maximum possible margin. Once triggered, stop orders behave similar to market orders.

The order price is used for limit orders.

The Stop Limit price is used for stop limit orders.

Other parameters in the formulas:

InitialMarginBuy — the initial margin for the Buy operation.

InitialMarginSell — the initial margin for the Sell operation.

Currency margin rate is the rate change radius of the currency, a futures contract is denominated in, relative to the Russian ruble

SettlementPrice — settlement price of an instrument for the current session.

All these parameters for calculation are provided by the Moscow Exchange.

InitialMarginBuy is written to the "Initial margin" field, InitialMarginSell is written to the "Maintenance Margin" field in symbol properties.

Calculation example

The below example shows the calculation of margin requirements for the following trading account state:

If the "Initial margin" field of the symbol specification contains any non-zero value, the margin calculation formulas specified above are not applied (except for the calculation of futures, as everything remains the same there). In this case, for all types of calculations (except for Forex and Contracts Leverage), the margin is calculated like for the "Futures" calculation type:

Volume in lots * Initial margin

Volume in lots * Maintenance margin

Calculations of the Forex and Contracts Leverage types additionally allow for leverage:

Volume in lots * Initial margin / Leverage

Volume in lots * Maintenance margin / Leverage

If the amount of the maintenance margin is not specified, the initial margin value is used instead.

This stage is common for all calculation types. Conversion of the margin requirements calculated using one of the above-mentioned methods is performed in case their currency is different from the account deposit one.

The current exchange rate of a margin currency to a deposit one is used for conversion. The Ask price is used for buy deals, and the Bid price is used for sell deals.

For example, the basic size of the margin previously calculated for buying one lot of EURUSD is 1000 EUR. If the account deposit currency is USD, the current Ask price of EURUSD pair is used for conversion. For example, if the current rate is 1.2790, the total margin size is 1279 USD.

The final margin requirements value calculated taking into account the conversion into the deposit currency, is additionally multiplied by the appropriate rate.

For example, the previously calculated margin for buying one lot of EURUSD is 1279 USD. This sum is additionally multiplied by the long margin rate. For example, if it is equal to 1.15, the final margin is 1279 * 1.15 = 1470.85 USD.

The margin can be charged on preferential basis in case trading positions are in spread relative to each other. The spread trading is defined as the presence of the oppositely directed positions of correlated symbols. Reduced margin requirements provide more trading opportunities for traders. Configuration of spreads is described in a separate section.

If the hedging position accounting system is used, the margin is calculated using the same formulas and principles as described above. However, there are some additional features for multiple positions of the same symbol.

Positions/orders open in the same direction

Their volumes are summed up and the weighted average open price is calculated for them. The resulting values are used for calculating margin by the formula corresponding to the symbol type.

For pending orders (if the margin ratio is non-zero) margin is calculated separately.

Opposite Positions/Orders

Oppositely directed open positions of the same symbol are considered hedged or covered. Two margin calculation methods are possible for such positions. The calculation method is determined by the broker.

The resulting margin value is calculated as the sum of margins calculated at each step.

Calculation for uncovered volume

Calculation of the total volume of all positions and market orders for each of the legs — buy and sell.

Calculation of the weighted average position and market order open price for each leg: (open price of position or order 1 * volume of position or order 1 + ... + open price of position or order N * volume of position or order N) / (volume of position or order 1 + ... + volume of position or order N).

Calculation of uncovered volume (smaller leg volume is subtracted from the larger one).

The calculated volume and weighted average price are used then to calculate margin by the appropriate formula corresponding to the symbol type.

When considering a margin ratio, the larger leg ratio (buy or sell) is used.

Used if the "Hedged margin" value is specified in a contract specification. In this case margin is charged for hedged, as well as uncovered volume.

If the initial margin is specified for a symbol, the hedged margin is specified as an absolute value (in monetary terms).

If the initial margin is not specified (equal to 0), the contract size is specified in the "Hedged" field. The margin is calculated by the appropriate formula in accordance with the type of the financial instrument, using the specified contract size. For example, we have two positions Buy EURUSD 1 lot and Sell EURUSD 1 lot, the contract size is 100,000. If the value of 100,000 is specified in the "Hedged field", the margin for the two positions will be calculated as per 1 lot. If you specify 0, no margin is charged for the hedged (covered) volume.

Per each hedged lot of a position, the margin is charged in accordance with the value specified in the "Hedged Margin" field in the contract specification:

Calculation of hedged volume for all open positions and market orders (uncovered volume is subtracted from the larger leg).

Calculation of the weighted average position and market order open price: (open price of position or order 1 * volume of position or order 1 + ... + open price of position or order N * volume of position or order N) / (volume of position or order 1 + ... + volume of position or order N).

The calculated volume, weighted average price and the hedged margin value are used then to calculate margin by the appropriate formula corresponding to the symbol type.

When considering a margin ratio, the average value of the buy and sell order ratios is used: (Buy rate + Sell rate)/2.

When an order opposite to an existing position is placed, the margin on the hedged volume is always calculated using the "Hedge margin" value. For the non-hedged volume, the "Initial margin" value is used when placing an order, and "Maintenance margin" is applied after the appropriate position is opened.

These calculation specifics only apply for symbols, for which the initial and maintenance margin values are specified (calculation type "Fixed margin" or "Futures").

For example, the following parameters are used for EURUSD:

Initial margin = 1000

Maintenance margin = 500

Hedge margin = 500

A trader has a position Buy 1.00 BR-12.18 on a USD account. A margin of 500 USD (as per the "Maintenance margin") is reserved on the trader's account for this position.

To open Sell 2.00 BR-12.18, the trader needs the margin of 2000 USD: 500 USD for the existing position, 500 for 1 hedged lot of the new position (in accordance with the "Hedged margin" parameter) and 1000 for 1 non-hedged lot of the new position (as set in the "Initial margin" parameter).

Once the position is opened, a margin of 1000 USD will remain reserved on the trader's account: 500 USD for 1 hedged lot (in accordance with "Hedged margin") and 500 USD for 1 non-hedged lot (as specified in the "Maintenance margin").