How to Calculate a Margin Closeout

What is Margin?

To ensure you can cover any losses you might incur on your positions, OANDA requires sufficient collateral. This collateral is typically referred to as margin.

This page explains how to calculate margin requirements on a trade. For more general information, see the introductory information on margin trading and OANDA's margin policies


Why are Margin Calculations Important?

As a trader, you are often faced with the following questions:

  • How much margin do I have available?
  • What is the largest trade I can make given my available margin?
  • How much margin do I need to make a trade at a particular size?
  • How close am I to a margin closeout?

All of this information is available on the fxTrade platform and by the OANDA Margin Calculator. For example,

  • The "Margin Available" field in the Account Summary Table of the fxTrade user interface tells you how much margin you have available;
  • The Buy/Sell window displays the maximum number of units you can trade, given your available margin. (Also refer to the Units Available Calculator);
  • The Margin Calculator tells you how much margin you need for a particular trade; and
  • The Account Summary of the User Interface indicates how far away from a margin closeout you are with the "Margin Closeout" field.

Calculating Margin

Margin information provided on the fxTrade platform is sufficient for most traders’ needs, and tips for avoiding margin closeouts are outlined in OANDA’s margin rules. The rest of this document provides details on how margin is calculated and includes examples as we go through the following steps:

Calculating the Net Asset Value

The term Net Asset Value represents the current value of your account. It is the total of your Account Balance and all unrealized profits or losses associated with your open positions.

If you have open positions the Net Asset Value is the sum of your Account Balance and your account’s Unrealized P/L. The Net Asset Value of your Account continuously fluctuates with the current exchange rates if you have open positions and is displayed in the "Account Summary" section of the fxTrade user interface.

Unrealized P/L refers to the profit or loss held in your current open positions. This is equal to the profit or loss that would be realized if all your open positions were closed immediately. Your Unrealized P/L continuously fluctuates with the current exchange rates if you have open positions and is displayed in the "Account Summary" section of the fxTrade user interface.

Example:

If your account is in USD and you are currently long 10,000 units EUR/USD, which was bought at 1.2581, and the current exchange rate for EUR/USD is 1.2570/72, then that position represents 10,000 x (1.2570 - 1.2581) = 10,000 x (- 0.0011) = - 11, or an unrealized loss of $11 USD.


Calculating Margin Used

Margin Used is equal to Position Value multiplied by the margin requirement, summed up over all open positions. Position Value is the size of the position (in units) converted from the base currency of the currency pair in question to your account currency using the current ask rate if the position is long and the current bid rate if the position is short.

Example:
You have a CAD account and the following open positions: 10,000 long EUR/USD and 20,000 short EUR/CZK. The current EUR/CAD rate is 1.2518/20.

Required Margin depends on the currency pair and the maximum leverage set for your account:

You have set your maximum leverage to 50:1.

The Position Value of a 10,000 EUR/USD long position is 10,000 EUR converted to CAD, which is equal to 10,000 x 1.2520, or $12,520 CAD. The margin requirement for EUR/USD is 2% (when the account maximum leverage is set to 50:1). As a result, the margin required on this EUR/USD position is equal to $12,520 x 0.02, or $250.40 CAD.

The Position Value of a 20,000 EUR/CZK short position is 20,000 EUR converted to CAD, which is equal to 20,000 x 1.2518, or $25,036 CAD. The margin requirement for EUR/CZK is 5% (when the account maximum leverage is set to 50:1). As a result, the margin required on this EUR/CZK position is equal to $25,036 x 0.05, or $1,251.80 CAD.

The Position Value of your account is $12,520 + $25,036 = $37,556 CAD. The Margin Used on your open positions is $250.40 + $1,251.80 = $1,502.20 CAD.

Example:
Same example as above but with maximum leverage set to 20:1.

The Position Values remain the same, but the margin required is equal to 5% of the Position Value, which is ($12,520 x 0.05) + ($25,036 x 0.05) = $626.00 + $1,251.80. Hence, the Margin Used on open positions is equal to $1,877.80 CAD.


Calculating Margin Available

Now we can calculate the margin available to initiate new trades.

Margin Available is equal to the greater of $0 or “Net Asset Value” minus the “Margin Used”. This value continuously fluctuates if you have open positions: the Net Asset Value changes with the value of your open positions, and Margin Used changes over time as the exchange rates change. If Margin Available is $0, then you cannot open new positions or increase existing positions.

Example:
If your Net Asset Value is equal to $12,000 USD, your maximum leverage is set to 50:1, and:

(a) the Total Position Value is $100,000 USD for a position which is comprised of a Major Currency Pair, then the Margin Available is equal to 12,000 - (0.02 x 100,000) = 12,000 - 2,000 = $10,000 USD. On the other hand, if Net Asset Value is equal to $1,990 USD, then the Margin Available is equal to $0, because 1,990 - 2,000 = - 10, which is less than $0.

(b) the Total Position Value is $50,000 USD for a position which is comprised of an Non-Major Currency Pair, then the Margin Available is equal to 12,000 - (0.05 x 50,000) = 12,000 - 2,500 = $9,500 USD. On the other hand, if Net Asset Value is equal to $1,990 USD then the Margin Available is equal to $0, because 1,990 - 2,500 = - $510.

(c) the Total Position Value is $150,000 USD, made up of $100,000 USD for a position which is comprised of a Major Currency Pair and $50,000 USD for a position which is comprised of an Non-Major Currency Pair, then the Margin Available is equal to 12,000 – [(0.02 x 100,000) + (0.05 x 50,000)] = 12,000 - 4,500 = $7,500 USD. On the other hand, if account equity is equal to $1,990 USD, then the Margin Available is equal to $0, because 1,990 - 4,500 = - $2,610 USD.

Margin available is displayed in the Account Summary section of the fxTrade user interface.


Calculating the Margin Required for Opening New Trades

If you are creating a new position or are increasing an existing position, you can calculate the Margin Required for the new trade in the same manner as calculating Margin Used, as described above. If the Margin Required is less than or equal to the Margin Available, then you are allowed to make the trade. If the Margin Required is greater than the Margin Available, then you cannot enter the trade.

You are always able to reduces the size of an open position. If your trade reverses a position (that is, goes from long to short, or from short to long), then it is easiest to consider the margin requirements of your positions immediately after executing your order under the assumption your order is successfully executed. If the margin requirements are less than the Net Asset Value under that assumption, then you have sufficient margin to make the trade.


Calculating When a Margin Closeout Will Occur

You must maintain sufficient margin in your account to support your open positions. When accounts are undermargined, the fxTrade platform will automatically initiate a margin closeout, whereby all tradable open positions in the account are automatically closed using the current fxTrade rates at the time of closing in accordance with OANDA's Margin Rules.

Example:
You are using your entire account balance of $10,000 USD for a single trade, thus your Margin Used is also $10,000 USD.

The rate moves unfavorably against your open position. When the Margin Closeout Value, which equals your Account Balance plus the unrealized P/L of your open positions based on the midpoint of the bid and ask prices, declines to $5,250 USD you will be within 5% of half the Margin Used, and fxTrade will issue a first warning. In our example, ($10,000 / 2 ) x 1.05 = $5,250 USD

The rate continues to move unfavorably against your position. When the Margin Closeout Value declines to $5,125 USD you will be within 2.5% of half the Margin Used, and fxTrade will issue a second warning. In our example, ($10,000 / 2 ) x 1.025 = $5,125 USD

The rate continues to move unfavorably against your position. When the Margin Closeout Value declines to $5,000 USD, a margin closeout is triggered and fxTrade will automatically close your open position.

If trading is unavailable for certain open positions at the time of the margin closeout, those positions will remain open and the fxTrade platform will continue to monitor your margin requirements. When the markets reopen for the remaining open positions, another margin closeout may occur if your account remains undermargined.

Example:
You have open positions in the following currency pairs and metal pairs:

- EUR/USD
- EUR/JPY
- XAU/USD

A margin closeout is triggered on Monday at 5:30 p.m. EST, at which time OANDA is open for trading for all currency pairs but closed for all metal pairs. During the 5:30 p.m. margin closeout, all EUR/USD and EUR/JPY trades will automatically close. The XAU/USD positions, however, will remain open as trading metal pairs with OANDA is unavailable at the time of the margin closeout. Trading metal pairs with OANDA resumes at 6:00 p.m. EST – if your account remains in a margin closeout situation at this time, your XAU/USD will automatically close on Monday at 6:00 p.m. EST. If your account is no longer in a margin closeout situation at 6:00 p.m., your XAU/USD position will remain open.

For more information on what happens and what to do in the event of a margin closeout, go to OANDA's margin call rules.


DISCLAIMER: 

The Commodity Futures Trading Commission (CFTC) limits leverage available to retail forex traders in the United States to 50:1 on major currency pairs and 20:1 for all others. OANDA Asia Pacific offers maximum leverage of 50:1 to on FX products and limits to leverage offered on CFDs apply Leverage for OANDA Canada clients is determined by IIROC and is subject to change. Refer to our legal section for more infomation.

Please note, there are numerous factors that can affect the rate at which your closeout is executed, including spread, price volatility and market liquidity. While a margin closeout is a final measure to help preserve your remaining capital, it is not a substitution for using stop losses on trades. We encourage the use of stop losses as part of a risk management strategy.

This is for general information purposes only - Examples shown are for illustrative purposes and may not reflect current prices from OANDA. It is not investment advice or an inducement to trade. Past history is not an indication of future performance.

 

Get more help