๐งฎ P&L Calculation
Last updated
Last updated
In Rho Protocol, Profit and Loss (P&L) calculations for future contracts are executed using the Mark-to-Market (MTM) method. This approach relies on the last market-traded fixed rate for dynamic and immediate margin adjustment, providing a real-time snapshot of each position's profitability.
Rho Futures have two components: a fixed leg and a floating leg. The P&L is the difference between both legs. Below is the calculation of the P&L step by step.
The future value of the fixed leg at settlement is determined using the formula:
Here, T is the contract's maturity date, i represents individual trades and t0 is the trade date. Time is measured in seconds.
For the floating leg, we use the funding rates accumulated from the time of the trade until maturity. We store the accumulated interest rate in the floating index as a variable. The difference from the Floating Index at two timestamps represents the floating interest rate calculated over the period.
As the floating rate from the moment of evaluation until maturity is unknown, we use the rate from the futures to Mark- to-Mark the floating leg value.
The value of the floating leg of a trade i is calculated as follows:
Here, the Floating Rate Index at t0 and t is used to factor in the accrued value over time. i represents individual trades.
The Last_Fixed_Rate assures a mark-to-market dynamic calculation.