LogoLogo
WebsiteExchangeEarly Bird ActivitiesAffiliateLearning CenterBlog
  • TL;DR
  • Glossary
  • Introduction
    • Letter from the Founders
    • Industry Trends & Development Strategy
    • Market Challenges & User Demands
    • Competitive Landscape & Market Potential
      • Market Potential Overview
      • Key Competitors
  • EVEDEX Solution
    • The Concept
    • Mission & Core Values
  • Strategic Approach
    • Empowering Users Through Decentralization
    • Enhancing User Experience & Accessibility
    • Strengthening Privacy & Security
    • Providing Comprehensive Education
    • Fostering Community-Oriented Governance
    • Ensuring Fair & Transparent Copy Trading
    • Expanding the Ecosystem
    • Promoting Financial Inclusion
  • Key Features & Components
    • Advanced Layer 3 Infrastructure
      • What is Rollup?
      • Prerequisites & Advantages of Choosing custom L3
      • Eventum L3 Solution
    • Trading Platform & Matching Engine
      • Perpetual Futures Trading Fundamentals
      • Technical Overview
      • Arbitrum L3 and on-chain settlement
      • Off-chain Orderbook
        • Matching Engine Overview
      • Take-Profit and Stop-Loss (TP/SL)
      • Entry price and PnL (Profit and Loss)
      • Order Types
      • Index Price and Mark Price
      • Margins
      • Liquidations and Auto-Deleveraging (ADL)
      • Trading Fees
      • One-Click Trading
      • Funding Rate
      • Deposit & Withdraw
      • Market Makers and Liquidity Provision
      • Contract Specifications
    • Enhanced User Experience & Account Abstraction
      • What is Account Abstraction?
      • Benefits of Account Abstraction
      • Technical Implementation
    • Comprehensive Educational Resources
      • EVEDEX Academy
      • Core Educational Areas
      • Risk Disclosure
    • Transparent & Fair Copy Trading
      • Copy Trading Quality Assurance & Certification
    • Gamification & Loyalty Program
      • Affiliate Program
      • Level Progression & Skill Allocation
      • Subscription Tiers: Prime & Ultimate
  • Deployed Contracts
  • Roadmap
  • FAQ
  • Guides
    • Futures Trading
  • Legal
    • European Union (EU)
      • Terms of Use - European Union
      • Privacy Policy - European Union
      • Cookie Policy - European Union
      • Affiliate Agreement
    • Global
      • Terms of Use - Global
      • Privacy Policy - Global
      • Cookie Policy - Global
      • Affiliate Agreement
Powered by GitBook
On this page
  • Calculating the Average Price
  • Types of P&L
  • Unrealized P&L
  • Realized P&L
  • Closed P&L
  • Key Considerations in P&L Calculations
  • Leverage Impact on ROI
Edit on GitLab
  1. Key Features & Components
  2. Trading Platform & Matching Engine

Entry price and PnL (Profit and Loss)

Profit and Loss (P&L) is a crucial metric determining the financial outcome of trading positions. It is calculated based on the entry price and the current market price. There are three primary types of P&L: Unrealized P&L, Realized P&L and Closed P&L. Understanding these concepts is essential for managing risks and maximizing profitability.

Calculating the Average Price

At this stage, EVEDEX supports only a single position per contract, which can be either long or short. When traders adjust their position by buying or selling additional contracts, the average price is recalculated within that same contract. Consequently, all P&L calculations are based on this new average price.

The average price of an asset is calculated using the following formula:

Average Price = Total Coin Value / Total Coins

Where Total Coin Value is determined as:

(Quantity1 × Price1) + (Quantity2 × Price2) + ...

Example:

  • First trade: 0.5 BTC purchased at $15,000

  • Second trade: 0.2 BTC purchased at $14,000

Total Coin Value: (0.5 × 15,000) + (0.2 × 14,000) = 10,300

Total Coins: 0.5 + 0.2 = 0.7

Average Price: $14,714

Types of P&L

Unrealized P&L

Unrealized P&L represents the potential profit or loss of an open position. It fluctuates in real-time based on market price movements and is not finalized until the position is closed.

Unrealized P&L Calculation

For long positions:

Unrealized P&L = Quantity × (Last Price - Entry Price)

For short positions:

Unrealized P&L = Quantity × (Entry Price - Last Price)

Example:

A trader buys 0.5 BTC at $15,000. If the last market price is $15,500, then:

Unrealized P&L = 0.5 × (15,500 - 15,000) = 250 USDT

For a short position, if the trader enters at $15,000 and the market price increases to $15,500, then:

Unrealized P&L = 0.5 × (15,000 - 15,500) = -250 USDT (a loss of 250 USDT)

Realized P&L

Realized P&L indicates actual profits or losses from closed or partially closed trades, including fees and funding.

Example:

A trader initially holds 0.5 BTC at $15,000. They decide to sell 0.25 BTC at $14,000.

Position's P&L = 0.25 × (15,000 - 14,000) = 250 USDT

  • Opening fee: 0.25 × 15,000 × 0.02% = 0.75 USDT

  • Closing fee: 0.25 × 14,000 × 0.02% = 0.7 USDT

  • Funding fee: 2 USDT

Final Realized P&L = 250 - (0.75 + 0.7 + 2) = 246.55 USDT

The trader now holds 0.25 BTC. They decide to buy an additional 0.2 BTC at $13,500.

Opening Fee: 0.2 × 13,500 × 0.02% = 0.54 USDT

Updated Realized P&L = 246.55 - 0.54 = 246.01 USDT

The trader’s current position is 0.45 BTC, which is short. If the trader chooses to open long on 1 BTC, the existing short position on 0.45 BTC will be closed, and the Realized P&L will be calculated for the remaining 0.55 BTC in the long position.

Closed P&L

Closed P&L represents the final profit or loss once all positions are closed. It factors in all trading fees, funding fees, and executed orders.

Key Considerations in P&L Calculations

  • Leverage does not directly affect P&L amounts but changes the margin requirements.

  • Higher leverage decreases margin but increases risk.

  • P&L scales with position size and price movement.

  • Fee structures impact realized and closed P&L.

Leverage Impact on ROI

  • 10x leverage: 250 USDT profit → 33.27% ROI

  • 5x leverage: 250 USDT profit → 16.63% ROI

  • 20x leverage: 250 USDT profit → 66.54% ROI

PreviousTake-Profit and Stop-Loss (TP/SL)NextOrder Types

Last updated 3 months ago