Skip to main content

Margin Calculation

The trading platform provides several margin calculation types based on the trading symbol. You can select the calculation type in the "Trading" tab under the calculation field. The margin calculation formula for each trading symbol depends on the risk type used by the client's account group.

info

The risk type refers to the "configuration" type in the "account group", i.e., whether the trading account is in hedging mode or netting mode.

Basic calculation is the first stage in determining the final margin value. In this stage, detailed calculation schemes are provided for each risk mode:

The margin amount is calculated in two stages. After the basic calculation, if the assumed value differs from the account's base currency, a currency conversion is required:

Forex

The margin for forex market trading symbols is calculated using the following formula:

    Volume in Lots * Contract Size / Leverage

For example, let's calculate the margin required to buy 1 lot of EURUSD, where the contract size is 100,000, and the leverage is 1:100. Substituting the respective values into the formula, we get:

    1 * 100000 / 100 = 1000 EUR

Thus, we have obtained the required margin value for the trading symbol in the margin currency.

CFD

The margin requirement for Contracts for Difference (CFDs) is calculated using the following formula:

    Volume in Lots * Contract Size * Market Opening Price / Leverage

The current market bid price is used for sell trades, while the ask price is used for buy trades.

For example, let's calculate the margin required to buy 1 lot of oil, where the contract size is 100 barrels, the current ask price is 80 USD, and the leverage is 1:100. Substituting the respective values into the formula, we get:

    1 * 100 * 80 / 100 = 80 USD

Thus, we have obtained the required margin value for the trading symbol in the margin currency.

Fixed Margin

If the current mode is set to "Fixed Margin" in the "Margin" tab, no calculation formulas specified in the "Calculation" field will be applied. In this case, the margin is calculated the same way for all types of symbols (Forex and CFDs):

Volume in Lots * Initial Margin

Margin Currency Conversion

Assume that the basic calculation for buying 1 lot of EURUSD results in a required margin of 1,000 EUR (noting that the margin currency for EURUSD is EUR).

If the account deposit currency is USD, the conversion will use the current bid price of the EURUSD currency pair. For example, if the current exchange rate is 1.2790, the total margin required will be 1,279 USD.

Basic Calculation for Netting Mode

This margin calculation mode is used for accounts operating in netting mode and differs from hedging mode accounts.

  • The first step in margin calculation is to determine whether there are existing positions or pending orders for a trading symbol in the account.

  • If there are no positions or orders for the trading symbol in the account, the basic margin calculation is used.

  • If there is an open position in the account, and the volume of a new order in the opposite direction is less than or equal to the current position, the total margin equals the margin for the current position.
    Example: The account holds a buy 1 lot EURUSD position, and a sell 1 lot EURUSD order is placed (including Sell Limit, Sell Stop, and Sell Stop Limit orders).

  • If there is an open position in the account, and an order in the same direction is placed, the total margin equals the sum of the margin for the current position and the new order.

  • If there is an open position, and the volume of a new order in the opposite direction exceeds the current position, two margin values must be calculated: one for the current position and one for the new order. The final margin is the higher of the two values.

  • If the account has two or more market and limit orders in opposite directions, the margin must be calculated separately for each direction (buy and sell). The final margin is the higher value from the two calculations. For all other order types (Stop Loss and Stop Limit), the margins are summed (charged for each order).

Basic Calculation for Hedging Mode

Hedging accounts allow multiple positions for the same trading symbol, which is reflected in margin calculations.

Positions/Orders in the Same Direction

The trading volumes are aggregated, and a weighted average opening price is calculated. The resulting value is used in the corresponding margin formula for the trading symbol type.

Example: The account has the following positions and orders:

    Buy 1 lot at 15.436
Buy 2 lots at 15.432

The CFD leverage calculation type is used for this trading symbol, with a contract size of 5,000 and leverage of 1:100.

Calculate the weighted average opening price for the buy positions:

(1 * 15.436 + 2 * 15.432)/(1 + 2) = 15.433333333

Calculate the margin for the aggregated volume using the CFD margin formula:

3 * 5 000  * 15.433333333 / 100 = 2 315.00

If necessary, this value can be converted into the deposit currency of the account.

Opposite Positions/Orders

This scenario depends on whether the "Charge margin on the larger side only" option is enabled in the trading symbol settings.

If the "Charge margin on the larger side only" option is enabled:

  • Calculate the margin for all buy and sell positions and market orders.

  • Calculate the margin separately for each direction (buy or sell).

  • Aggregate the margin for all buy positions and market orders.

  • Aggregate the margin for all sell positions and market orders.

  • The highest value among all calculations is used as the final margin.