# Сalculations for "Margin" and "Commission-free" Accounts

Modified on Fri, 29 Mar 2024 at 07:53 AM

Profit = Σ((Volume * Close price * CCR) - (Volume * Open Price * OCR)),
Net Profit = Profit,
Investments = Σ(Close price * Volume * CCR),
My Portfolio = Balance + Net Profit,
Available To Invest = My Portfolio - Investments,

where
Close price is the current price of Instrument,
Volume is the number of contracts that were bought or sold,
CCR is the current conversion rate (for conversion into account currency),
OCR is the conversion rate at the time of opening Deal.

Example 1.
Balance of Account is 100 000 USD.
Shares that were bought: 327 shares of 'А' at 130.46 USD and 523 shares of 'B' at 52.32 USD
Current share price: 'A' -  130.39 USD, 'B' - 52.44 USD.

Investments = Investments А + Investments B = 327 * 130.39 + 523 * 52.44 = 70 063.65 USD
Profit = Profit A + Profit B = ((327 * 130.39) - (327 * 130.46)) + ((523 * 52.44) - (523 * 52.32)) = 39.87 USD
My Portfolio = 100 000 + 39.87 = 100 039.87 USD
Available To Invest = 100 039.87 - 70 063.65 = 29976.22 USD.

Example 2.
Balance of Account is 10 000 EUR.
Shares that were bought: 5 shares of 'A' at  40 USD and 3 shares of 'B' at 30 USD. Сonversion rate is 1 USD : 0,80 EUR.
Current share price: 'A' - 42 USD, 'B' - 28 USD. Сurrent conversion rate is 1 USD : 0,82 EUR.

Profit = Profit A + Profit B = ((5 * 42 USD * 0.82) - (5 * 40 USD * 0.80)) + ((3 * 28 USD * 0,82) - (3 * 30 USD * 0,80)) = 8.88 EUR
Investments = Investments А + Investments B = (42 USD * 5 * 0,82) + (28 USD * 3 * 0,82) = 241.08 EUR
My Portfolio = 10 000 EUR + 8,88 EUR = 10 008.88 EUR
Available To Invest = 10 008.88 EUR  - 241.08 EUR = 9767.8 EUR.

Margin Account:

Margin= Σ((Open price*Volume/Leverage)*OCR),
Profit =Σ((Close price - Open price)* Volume* СCR),
Net profit = Profit + Commission + swap,
Equity = Balance + Net profit,
Free Margin = Equity - Margin,
Margin Level = Equity/Margin*100,

where
Open price is the price of open Deal,
Close price is the current price of Instrument,
Volume is the number of contracts that were bought or sold,
Leverage is the size of Leverage,
CCR is the current conversion rate for conversion into account currency.

Example.
Balance of Account is 10 000 EUR.
Leverage is 1:1.
Shares that were bought:  5 shares of 'A' at 40 USD and 3 shares of 'Bat 30 USD. Сonversion rate is 1 USD : 0,80 EUR.
Current share price:  'A' - 42 USD и 'B' - 28 USD. Сurrent conversion rate is 1 USD : 0,82 EUR.
Commission - 0.5 EUR.

Margin = (40 USD * 5 * 0.80) + (30 USD * 3 * 0.80) = 232 EUR
Profit = ((42 - 40) * 5 * 0,82) + ((28 - 30) * 3 * 0,82)) = 3.28 EUR
Net profit = 3.28 EUR - 0.5 EUR = 2.78  EUR
Equity = 10 000 EUR + 2.78 EUR = 9997.22 EUR
Free Margin = 9997.22 EUR - 232 EUR = 9765.22 EUR.