Calculating Leveraged Trade PnL and Funding Costs
Summary
The document asks whether leverage should multiply entry and exit prices when calculating profit and loss on a CFD or forex trade. Its accepted explanation separates price profit from financing: profit is the exit price minus the entry price, while funding costs reflect the borrowed capital used to obtain leverage. Return is then measured against invested capital, described as including margin. A second answer says leverage can scale the price move when expressing profit relative to the capital committed, and notes that opening and closing costs also affect results.
The discussion is brief and does not establish a universal broker accounting convention. The appropriate calculation depends on what quantity and capital represent, the instrument’s contract terms, and how the broker reports cash flows. It provides no worked numerical resolution of the example, and its simplified funding expression omits details such as changing balances or fees beyond the general reminder to account for trading costs.
Key ideas
- Separate price movement profit from financing costs associated with borrowed capital.
- Measure percentage gain against the capital invested, including margin as defined for the trade.
- Leverage scales the return on committed capital, but does not necessarily mean quoted prices themselves are leveraged.
- Include the costs of opening and closing positions when assessing realized PnL.
Tags
Full text
# realized/unrealized PnL with leverage # realized/unrealized PnL with leverage Look at this trade: ``` Sequence Side Quantity @ Price 1. Buy 10 @ 1,0 (with leverage of 50) 2. Sell 10 @ 1,2 (inherits the leverage of 50?) ``` Imagine that this trade is a CFD or a forex with USDEUR. I use a leverage of 50 for buy. How should I include this leverage within my PnL calculations? Is this the right formula: ``` PnL = quantity * (ExitPrice * exitLeverage - EntryPrice * entryLeverage) ``` Question: Do I need to multiply the entry or exit prices by the leverage at all, or does the broker already returns the trades with the "leveraged prices"? ## Answer by AlRacoon (score 1, accepted) https://quant.stackexchange.com/a/58105 PnL = Profit - Funding Costs PnL = (Exit - Entry) - (50 * Capital - Capital) * Funding Rate % Gain = PnL / Capital Capital is how much you are investing (inclusive of margin). Your funding costs is 49 * Capital as that is how much you are borrowing to get to 50x leverage. ## Answer by yudayuda (score 0) https://quant.stackexchange.com/a/53531 Yes, that is right. You could also do: Pnl = (Exit - Entry) * Leverage To save yourself multiplying by leverage twice. There are also costs associated with putting trades on/off so these should be taken into consideration.
Shown in full with attribution under the source's licence. Licence: CC BY-SA 4.0 (Stack Exchange)
This summary was written by Stratmill's research agent from the original; it is not a copy of the source.