How to Calculate Your Closing P&L After Each Settlement in Coin-Margined Perpetual Swaps

·

Understanding how your profits and losses are calculated in coin-margined perpetual swaps is essential for effective trading, especially around settlement times. This guide breaks down the entire process, step by step.

What Are Coin-Margined Perpetual Swaps?

Coin-margined perpetual swaps are a type of derivatives contract that allows traders to speculate on the future price of a cryptocurrency without an expiry date. Unlike futures contracts, they do not have a settlement date. Instead, they use a funding rate mechanism and undergo periodic settlements to track the underlying spot market price accurately.

A key feature is that the contract is margined and settled in the base cryptocurrency (e.g., a BTC contract uses BTC as margin). Your final profit or loss from a trade is the sum of all the periodic settlements that occurred during your holding period plus the result of your final closing trade.

The Settlement Process Explained

Settlement is a periodic event where outstanding contracts are marked to a official Settlement Price. For coin-margined perpetual swaps, this typically happens every eight hours. The standard settlement times are 00:00, 08:00, and 16:00 (UTC+8).

During each settlement:

Key Concepts: Opening Price vs. Holding Price

To avoid confusion, it's vital to distinguish between these two prices:

Calculating P&L: A Step-by-Step Guide with Examples

The general formula for calculating the unrealized P&L for a long position in a coin-margined contract is:

Long Unrealized P&L = (1 / Average Holding Price - 1 / Latest Mark Price) Number of Contracts Contract Face Value

Let's walk through a detailed example to see how this works before and after settlement.

Example Scenario: A Long Trade on BTC

Assume the contract face value is 100 USD.

Phase 1: Before the First Settlement

  1. On 2020/4/23 at 10:00 (UTC+8), you open a long position of 1000 contracts at a price of 6000 USD. Your Average Opening Price and Average Holding Price are both 6000 USD.
  2. By 15:30 (UTC+8), the mark price of the BTC contract has risen to 6150 USD.
  3. Your unrealized P&L is calculated as:

    • Unrealized P&L = (1/6000 - 1/6150) 1000 100
    • Unrealized P&L = (0.00016667 - 0.00016260) * 100,000
    • Unrealized P&L ≈ 0.4065 BTC

Since the position hasn't been settled yet, your total profit is this entire 0.4065 BTC.

Phase 2: After the First Settlement

  1. At the 16:00 (UTC+8) settlement, the official Settlement Price is determined to be 6200 USD.
  2. The system settles your unrealized profit. The 0.4065 BTC (now calculated against the 6200 USD price) is credited to your account balance. You can find this in your history as "Settled Unrealized P&L."
  3. Your Average Holding Price is reset to the settlement price of 6200 USD. Your Average Opening Price stays at 6000 USD.
  4. Later, at 17:00 (UTC+8), the mark price moves to 6180 USD.
  5. Your new unrealized P&L for the current period is calculated from the new holding price:

    • Unrealized P&L = (1/6200 - 1/6180) 1000 100
    • Unrealized P&L = (0.00016129 - 0.00016181) * 100,000
    • Unrealized P&L ≈ -0.0521 BTC (a small loss for this period)
  6. Your Total Position Gain is the sum of your settled P&L and your new unrealized P&L:

    • Total Gain = Settled P&L + Current Unrealized P&L
    • Total Gain = 0.4065 BTC + (-0.0521 BTC)
    • Total Gain ≈ 0.4854 BTC

👉 Discover advanced trading calculators and tools

Calculating Final Profit Upon Closing

If you decide to close your entire position at 6180 USD at this point:

This is why a position might show a positive gain on the interface but the closing trade shows a negative; the interface might only be displaying the P&L for the current period since the last settlement. Your true profit is the cumulative amount.

How to View Your Settlement History

You can review all your settled P&L and closing P&L in your account's financial records:

Tracking this history is the only way to see the complete picture of your trading performance across settlement cycles.

Frequently Asked Questions

What happens if I hold a position through multiple settlements?
Your profit is the sum of the settled unrealized P&L from every settlement cycle during which you held the position, plus the final closing P&L from your last trade. Each settlement locks in the gains or losses for that period.

Why does my holding price change after settlement?
The holding price is reset to the settlement price to act as the new cost basis for calculating the next period's unrealized P&L. This is an accounting update and does not change your original entry cost or your overall accumulated profit.

Where can I find a reliable calculator for these figures?
Most major trading platforms provide built-in calculators within their contract trading interface. You can input your entry price, leverage, and other details to simulate P&L. 👉 Explore more strategies and analytical tools

My closing trade showed a loss, but my overall position was profitable. Why?
This occurs because the profit was already partially or fully realized and credited to your account during previous settlements. The closing P&L only reflects the profit or loss generated from the last settlement price to your closing price.

Is the settled P&L immediately available for trading?
Yes, once the settlement is complete, the settled unrealized P&L (whether positive or negative) is immediately added to or deducted from your available contract account balance.

Can I avoid this settlement process?
No, periodic settlement is a fundamental mechanism of perpetual swap contracts. The only way to avoid it is to close your position before a settlement occurs.