디지털자산 커뮤니티 앤츠코인넷

How is your Portfolio’s Profit & Loss calculated

작성자 와지르엑스 조회수 110 작성일 22.02.10  21:55

Update: This feature is under beta testing and will be rolled out to all users gradually.

Contents

  1. Average Buy Price (ABP)
  2. Invested value
  3. Unrealized P&L (Profit & Loss)
  4. Realized P&L
  5. Impact of events other than trades
  • Average Buy Price

The most important component of the P&L (Profit & Loss) and related metrics is the Average Buy Price (ABP). Calculating the ABP is very simple as long as one has never sold the asset (coin/token), but as soon as there are sell transactions for the asset, there are multiple possible approaches to calculate the updated ABP of the remaining asset balance.

 

The approach we have taken to calculate the ABP is based on FIFO (First In First Out) methodology, which is also commonly used for tax reporting purposes. Lets try to understand this with the help of an example:

Trnx no.

Date

Asset

Side

Quantity

Price

Value

1

12/5/2021

BTC

Buy

5

100

500

2

15/5/2021

BTC

Buy

10

150

1500

3

20/5/2021

BTC

Sell

3

200

200

4

25/5/2021

BTC

Sell

5

120

600

 

Lets calculate the ABP (Average Buy Price) after each transaction-

 

Transaction 1: You just bought your first 5 BTC coins at the rate of 100 per token, the ABP (Average Buy Price) will also be 100

 

Transaction 2: You bought 10 more tokens at the rate of 150 per token, by calculating the weighted average, the ABP will become (5*100 + 10*150)/(5+10) = 133.3

 

Transaction 3: When you sell 3 BTC coins, the FIFO approach requires us to assume that the coins bought first are also sold first, i.e although you have 15 BTC coins in your account, we’ll assume that the 3 coins sold were from the first batch of 5 coins bought at price of 100

 

Hence, after this transaction, you are left with 5-3 = 2 coins from the first transaction bought at the rate of 100 per coin and all 10 coins from the 2nd transaction bought at the rate of 150 per coin. Therefore, the new ABP of the remaining 12 coins in your account would be

(2*100 + 10*150) / (2+10) = 141.6

 

Transaction 4: Now when you sell 5 more BTC coins, using the same approach as above, we’ll assume that the 2 remaining coins from 1st purchase would be sold first followed by 3 coins from the second purchase. 

 

Hence, after this transaction, you would have sold all the coins from your first purchased batch of 5 coins and 3 from the second batch. And you would be left with 7 coins, all from the 2nd batch of coins purchased at the rate of 150 per coin, hence the average buying price of the remaining 7 coins would also be 150. To get the same result from the formula we have been using

 

(0*100 + 7*150) /(0+7) = 7*150/7 = 150

 

Now that we have understood how ABP (Average Buy Price) is calculated. Lets see how it is used to calculate multiple P&L-related metrics.



  • Invested Value

For any coin, the invested value is the product of ABP and the current balance of the coins. In the above example, after 4th transaction, the invested value can be calculated as following-

Average Buy Price = 150

Coin balance = 7

Hence, Invested value = 150*7 = 1050

 

The sum of invested value of all the coins becomes the invest value for your total portfolio.



  • Unrealized P&L (or All time Gains)

The unrealized P&L, commonly referred to as just P&L or Gains, is the difference between the invested value and the current value of that coin. In the above example, after 4th transaction, say on 26/5/2021, if the market price of the coin is 180, The P&L can be calculated as following-

 

Invested value (ABP*balance) = 150*7 = 1050

Current market price = 180

Current value = 180 *7 = 1260

P&L (All time Gains) = Current value - invested value = 1260- 1050 = 210

 

The sum of All Time Gains of all the coins gives us the Gains at the portfolio level.

 

P&L as percentage: There are two ways to look at percentage gains for your portfolio. It is the percentage difference between the invested value and current value of the coin or alternatively the difference between the ABP and current price of the coin. In the above example, calculating it using the investment and current value

Invested value = 1050

Current value = 1260

P&L % = (1260-1050)/1050 *100% = 210/1050*100% = 20% 

 

Positive value of P&L% means the coin or portfolio is in profit while negative % value means it is in loss

 

 

  • Realized P&L

 

The Unrealised P&L and percentage change we have explained above is what you would commonly see in most portfolios across investment apps. Wherever you find just P&L or Gains, it's usually referring to ‘Unrealised’ P&L or Gains. i.e the current state of Profit or Loss on the asset you still hold in your portfolio. The other counterpart here is ‘Realized P&L’ or ‘Realized Gains’, which is the Profit or Loss made on the tokens you have already sold off. These are not displayed in the Phase-1 of WazirX’s portfolio tracker, but we will be working on adding them in future phases. 

 

Realized P&L can be calculated using the difference between the Avg Buy Price of the asset sold and its selling price. Using the sample transactions shown above. Lets calculate the realized gains for the second Sell transaction (Trnx #4)

 

As explained in section 2 above. Using the FIFO approach, we assume that the 5 coins sold in this sell order consist of 2 coins from the first purchase batch and 3 from the second batch. 

 

Hence, their avg buy price would be = (2*100 + 3*150)/5 = 130

Total buy value = 130*5 = 650

The sell price = 120

Total sell value = 120*5 = 600

 

Therefore total Realized P&L = 600- 650 = -50 (negative represents loss)

 

The percentage Realized P&L can be calculated as the % difference between selling and avg buy value

 

P&L % = (sell value- buy value)/sell value * 100 

=  (600-650)/600*100% = -50/600*100% = -8.3%



  • Impact of events other than trades

Coin balance in your WazirX wallet can increase or decrease due to factors other than buy/sell transactions. Some common cases could be Referral rewards, Airdrops and direct crypto deposits or withdrawals to Binance or any crypto wallet. For the P&L calculation to be accurate, all such cases need to be handled carefully by attributing an appropriate buy or sell price to them. Following are some of the common events which lead to addition or removal of coin balance from WazirX wallet and the buy and sell price attributed to them for P&L calculation on the WazirX App.



#

Event

Buy Price

Sell Price

Comment

1

Coins received as referral reward

Zero

NA

They are assumed to be received at zero cost as user does not pay for these coins

2

Coupons

Zero

NA

They are assumed to be received at zero cost as user does not pay for these coins

3

Crypto Deposits

Market Price

NA

Considered to be bought at market price at the time of transfer. As there is no information about the actual time, price and source of purchase 

4

Crypto Withdrawals

NA

Market Price

Considered to be sold at market price at the time of transfer. As there is no information about the purpose and receiver 

5

Rewards from campaigns   

Zero

NA

They are assumed to be received at zero cost as user does not pay for these coins

6

Crypto paid as trading fee

NA

Market Price

As it served the same purpose as the corresponding value of INR would have done when used to pay trading fee

7

Penalties

NA

Zero

As user does not receive any value in return

 

Please reach out to the support team via support.wazirx.com for any other questions on the P&L calculation approach.






다음글 Why do you need to provide the crypto withdrawal declaration?
이전글 Transfer funds between WazirX and Binance account