MEXC offers two kinds of contracts: the USDT Contract and the Inverse Contract. The USDT contract is quoted in USDT and settled in USDT while the Inverse Contract is quoted in USDT and settled in BTC. This article will focus on how margin and PnL is computed in these two contract types.
1. Margins Explained
Margin refers to the cost of entering a leveraged position.
Successful trading with leverage requires an understanding of the following concepts:
Starting Margin: This minimum margin required to open a position. Your starting margin is dependent on margin rate requirements.
Maintenance Margin: The minimum margin requirement for maintaining a position below which additional funds will have to be deposited or forced liquidation may occur.
Opening Cost: The total amount of funds required to open a position, including the initial margin for opening a position and transaction fees.
Actual leverage: The current position includes the leverage ratio of unrealized gains and losses.
2. Margin calculation
In perpetual contracts, the order cost is the margin required to open a position. The actual cost is determined by whether the order is executed by a maker or taker because varying fees apply.
The general formula is as follows:
Inverse contract: Order cost (margin) = Position total * face value / (leverage multiplier * position avg. price)
USDT contract: Order cost (margin) = position avg. price * position total * face value / leverage multiplier
What follows are a series of examples that will provide more clarity on margin required when opening a position in USDT/Inverse Contracts.
Inverse Contract
If a trader wants to purchase 10,000 cont. BTC/USDT perpetual contracts at the price of $7,000 with a leverage multiplier of 25, and the face value of the contract is 1 USDT, then the margin required = 10000x1/ (7000x25 ) = 0.0571BTC;
USDT Contract
If a trader wants to purchase 10,000 cont. BTC/USDT perpetual contract at the price of $7,000 with leverage multiplier of 25, and the face value of the contract is 0.0001BTC, then the margin required = 10000x1x7000/25= 280 USDT;
3. PnL Calculation
PnL calculation includes fee income or expenditure, funding fee income or expenditure, and PnL upon closing a position.
Fee
The expenditure of taker = Position value* Taker fee rate
The income of the maker = Position value* Maker fee rate
Funding fee
According to the negative or positive funding fee rate and the long or short position held, the trader will pay or receive funding fee.
Funding fee = Funding fee rate* position value
Closing PnL:
USDT Contract
Long position = (closing price - opening avg. price)* position total* face value
Short position= (opening avg. price - closing price)* position total* face value
Inverse contract
Long position = (1/opening avg. price - 1/closing avg. price)* position total* face value
Short position = (1/closing avg. price - 1/opening avg. price)* position total* face value
Floating PnL
USDT contract
Long position = (fair price - opening avg. price)* position total* face value
Long position = (opening avg. price - fair price)* position total* face value
Inverse Contract
Long position = (1/opening avg. price - 1/fair price)* position total* face value
Short position = (1/fair price - 1/opening avg. price)* position total* face value
For example, a trader purchases 10,000 cont. long for BTC/USDT perpetual contract at the price of $7,000 as a taker. If the taker fee is 0.05%, the maker fee is -0.05% and the funding fee rate is -0.025%, then the trader shall pay a taker fee of:
7000*10000*0.0001*0.05% = 3.5USDT
and the trader pays a funding fee of:
7000*10000*0.0001*-0.025% = -1.75USDT
In this situation, the negative value means that the trader receives the funding fee instead.
When said trader closes 10,000 cont. BTC/USDT perpetual contract at $8,000, then the closing PnL is:
(8000-7000) *10000*0.0001 = 1000 USDT
And the closing fee can be calculated as follows:
8000*10000*0.0001*-0.05%=-4 USDT
In this situation, the negative value means that the trader receives the funding fee instead.
The total PnL of the trader is therefore:
Closing PnL - Maker Fee - Funding Fee - Taker Fee
1000 - (-4) - (-1.75) -3.5 = 1002.25
Comments
0 comments
Article is closed for comments.