Calculation of contract‘s profit and loss
Dipublikasikan Pada 20 Jun 2022Diperbarui Pada 15 Mei 2024Baca 6 mnt
1. Single-currency margin: cross margin
In single-currency margin mode, perpetual/futures support both Hedge mode and One-way mode, as shown in the following figures:
(1)Hedge mode
![iii-calculation-of-contract-profit-and-loss-6-20-2022 image 1](http://static.okx.com/cdn/assets/plugins/announcements/contentful/tofttmniq0qv/6WJgO7tvaaRwVKYQ4WhnU3/d6149ad93b34565430e252aa5958d3cc/https___www.okx.com_cdn_assets_plugins_announcements_contentful_13193645151501.jpg)
(2)One-way mode
![iii-calculation-of-contract-profit-and-loss-6-20-2022 image 2](http://static.okx.com/cdn/assets/plugins/announcements/contentful/tofttmniq0qv/43aDhV8rvFghsuGdsaz3k8/6fa9050387bc34a4210b8d1b86e662dc/https___www.okx.com_cdn_assets_plugins_announcements_contentful_13193636177933.jpg)
Term | Definition |
Total | For the One-way mode, the total of long positions is a positive number, and the total of short positions is a negative number. |
Avail. | Only shown in Hedge mode Avail. = total positions – positions of pending close orders |
P&L | Unrealized profit or loss of current position (1) Coin-margined futures/perpetual swap P&L of long positions = face value * |number of contracts|* multiplier * (1 / avg. open price – 1 / mark price) P&L of short positions = face value * |number of contracts| * multiplier * (1 / mark price – 1 / avg. open price) (2) USDT-margined futures/perpetual swapP&L of long positions = face value * |number of contracts| * multiplier * (mark price – avg. open price) P&L of short positions = face value * |number of contracts| * multiplier * (avg. open price - mark price) |
P&L ratio | P&L/initial margin |
Initial margin | 1) Coin-margined futures/perpetual swap Initial margin = face value * |number of contracts| * multiplier / (mark price * leverage)2) USDT-margined futures/perpetual swap Initial margin = face value * |number of contracts| * multiplier * mark price / leverage |
Maintenance margin | 1) Coin-margined futures/perpetual swap Maintenance margin = face value * |number of contracts| * multiplier * maintenance margin ratio / mark price2) USDT-margined futures/perpetual swapMaintenance margin = face value * |number of contracts| * multiplier * maintenance margin ratio * mark price |
2. Multi-currency margin mode: cross margin
Under the multi-currency margin mode, perpetual/futures derivatives support both Hedge and One-way mode, as shown in the following:
(1)Hedge mode
![iii-calculation-of-contract-profit-and-loss-6-20-2022 image 3](http://static.okx.com/cdn/assets/plugins/announcements/contentful/tofttmniq0qv/6WnAsAfyYc3ETqSE5mkWZh/668c51ef986bca3d034417f7a48ebcd5/https___www.okx.com_cdn_assets_plugins_announcements_contentful_13193645201677.jpg)
(2)One-way mode
![iii-calculation-of-contract-profit-and-loss-6-20-2022 image 4](http://static.okx.com/cdn/assets/plugins/announcements/contentful/tofttmniq0qv/2fBWpneyU9V4x4Vao1K0m6/48c0b8417d1b534a2b512eb2905646ec/https___www.okx.com_cdn_assets_plugins_announcements_contentful_13193686567565.jpg)
Term | Definition |
Total | For the One-way mode, the total of long positions is a positive number, and the total of short positions is a negative number. |
Avail. | Only shown under Hedge mode Avail. = Total – Positions of pending close orders |
PnL |
Unrealized profit and loss of current positions (1) Crypto-margined futures/perpetual swap PnL of long positions = Face value * |Number of contracts| * Multiplier * (1/Avg. open price – 1/Mark price) PnL of short positions = Face value * |Number of contracts| * Multiplier * (1/Mark price – 1/Avg. open price) (2) USDT margined futures/perpetual swap PnL of long positions = Face value * |Number of contracts| * Multiplier * (Mark price – Avg. open price) PnL of short positions = Face value * |Number of contracts| * Multiplier * (Avg. open price – Mark price) |
PnL ratio | PnL/Position-opening margin |
Initial margin | (1) Crypto-margined futures/perpetual swap Initial margin = Face value * |Number of contracts| * Multiplier / (Mark price * leverage) (2) USDT-margined futures/perpetual swap Initial margin = Face value * |Number of contracts| * Multiplier * Mark price / Leverage |
Maintenance margin | (1) Crypto-margined futures/perpetual swap Maintenance margin = Face value * |Number of contracts| * Multiplier * Maintenance margin ratio / Mark price (2) USDT margined futures/perpetual swap Maintenance margin = Face value * |Number of contracts| * Multiplier * Maintenance margin ratio * Mark price |
3. The isolated mode of Single/Multi-currency/Portfolio margin
In isolated margin mode, perpetual/futures support both Hedge mode and One-way mode, as shown in the following figures:
(1)Hedge mode
![iii-calculation-of-contract-profit-and-loss-6-20-2022 image 5](http://static.okx.com/cdn/assets/plugins/announcements/contentful/tofttmniq0qv/2FN2JpP6mXAfjtjnkkBrFt/919ef64011d1636e14a816ece120cf18/https___www.okx.com_cdn_assets_plugins_announcements_contentful_13193645236749.jpg)
(2)One-way mode
![iii-calculation-of-contract-profit-and-loss-6-20-2022 image 6](http://static.okx.com/cdn/assets/plugins/announcements/contentful/tofttmniq0qv/56ACemBYgMwet3HZOoVH80/75da7327bf3be626155f9b25faf215d0/https___www.okx.com_cdn_assets_plugins_announcements_contentful_13193645234445.jpg)
Term | Definition |
Total | For the One-way mode, the total of long positions is a positive number, and the total of short positions is a negative number. |
Avail. | Only shown in Hedge mode Avail. = total – positions of pending close orders |
P&L | Unrealized profit or loss of current position(1)Coin-margined futures/perpetual swapP&L of long positions = face value * |contracts| * multiplier * (1 / avg. open price – 1 / mark price)P&L of short positions = face value * |contracts| * multiplier * (1 / mark price – 1 / avg. open price)(2)USDT-margined futures/perpetual swapP&L of long positions = face value * |contracts| * multiplier * (mark price – avg. open price)P&L of short positions = face value * |contracts| * multiplier * (avg. open price – mark price) |
P&L ratio | P&L/initial margin |
liquidation price | (1)Coin-margined futures/perpetual swapLong positions: Est. liquidation price = face value * |number of contracts| * (maintenance margin ratio + fee rate + 1) / (margin balance + face value * |number of contracts| / avg. open price)Short positions: Est. liquidation price = face value * |number of contracts| * (maintenance margin ratio + fee rate - 1) / (margin balance - face value * |number of contracts| / avg. open price)(2)USDT-margined futures/perpetual swapLong positions: Est. liquidation price = (margin balance - face value * |number of contracts| * avg. open price) / [face value * |number of contracts| * (maintenance margin ratio + fee rate - 1)]Short positions: Est. liquidation price = (margin balance + face value * |number of contracts| * avg. open price) / [face value * |number of contracts| * (maintenance margin ratio + fee rate + 1)] |
Margin balance | Initial margin + margin added to or reduced from this position |
Maintenance margin | (1)Coin-margined futures/perpetual swapMaintenance margin = face value * |number of contracts| * multiplier * maintenance margin ratio / mark price(2)USDT-margined futures/perpetual swapMaintenance margin = face value * |number of contracts| * multiplier * maintenance margin ratio * mark price |
Margin level | (Margin balance + P&L) / [position value * (maintenance margin ratio + fee rate)] (1) Coin-margined futures/perpetual swap Margin level = (margin balance + P&L)/ [face value * |number of contracts| / mark price * (maintenance margin ratio + fee rate)] (2) USDT-margined futures/perpetual swap Margin level = (margin balance + P&L)/ [face value * |number of contracts| * mark price * (maintenance margin ratio + fee rate)] |