Objective
Compute P&L for any sequence of trades, long or short, including the costs of carrying the position, and explain the numbers to an interviewer.
One identity
Let be your signed position (positive long, negative short). Over any interval in which the position does not change,
Equivalently, total P&L = cash flows + current market value of the position. Buying spends cash; selling raises it; the position is marked at the current price (usually the mid, or the price you could actually exit at). This cash-plus-position view never goes wrong and is the best way to check any answer.
Realised versus unrealised
- Unrealised (open) P&L: the gain on the position you still hold, , where is the average cost.
- Realised P&L: locked in when you reduce a position, quantity closed (sign flipped for shorts).
Under the average-cost method, buys that add to a long update as a size-weighted average; sales do not change , they just realise P&L against it. FIFO accounting matches each sale to the oldest lot instead. The split between realised and unrealised differs between methods; total P&L does not.
Worked example
a multi-trade day
You trade a stock as follows: buy 100 at 50; buy 200 at 53; sell 150 at 55; sell 250 at 52. The stock closes at 50. Using average cost, find realised, unrealised and total P&L.
Show solutionHide solution
After the buys: 300 shares, average cost .
Sell 150 at 55: realised . Now long 150 at 52.
Sell 250 at 52: the first 150 close the long at realised. The remaining 100 open a new short of 100 at 52.
Mark at 50: unrealised on the short .
Total .
Cash check: cash flows ; position value ; total . ✓
Short selling
To sell what you do not own:
- Borrow the shares through your broker from a lender (often an index fund or custodian).
- Sell them in the market. The proceeds are held as collateral, and you post extra margin.
- While short, you owe the lender any dividends (a "manufactured dividend") and pay a borrow fee, an annualised rate on the value of the shares borrowed. Easy-to-borrow names cost a fraction of a percent; hard-to-borrow names can cost tens of percent.
- Cover: buy the shares back and return them.
Risks specific to shorts: losses are unbounded; the lender can recall the shares, forcing you to cover at a bad time; and a rising price grows your position's size against you, which can trigger margin calls and a short squeeze when many shorts cover at once.
A useful sign convention: a short position's P&L is with shares short, minus dividends paid, minus borrow fees, plus interest earned on the collateral (the "short rebate", when your broker pays it).
Worked example
the full cost of a short
You short 1,000 shares at $80. The borrow fee is 3% a year on the position value. During the 73 days you are short, the stock pays a $0.50 dividend. You cover at $72. What is your net P&L? (Charge the fee on the initial value; ignore interest on collateral.)
Show solutionHide solution
- Price gain: dollars.
- Dividend owed to the lender: dollars.
- Borrow fee: dollars.
Net dollars. In practice the fee accrues daily on the marked value, so it shrinks as the price falls, but the order of magnitude is the point: carry costs matter for shorts.
Leverage and returns
With equity controlling a position of size , the borrowed part costs a financing rate . The return on equity is
where is the asset return. Leverage scales both the mean and the volatility by , so it does not change the Sharpe ratio of the excess return, but it does raise the chance of a margin call or wipe-out: at , a 20% fall loses all the equity.
Percentages versus dollars
Percentage returns are natural for a long position bought with your own money. They get slippery elsewhere:
- A short has no natural denominator (you received cash rather than spending it). Quote its P&L in dollars, or as a return on the margin or capital allocated.
- Percentage moves are not symmetric: down 50% then up 50% leaves you at 75% of where you started. Dollar P&L adds across trades; simple percentage returns do not (log returns add over time, simple returns add across positions).
- A long's percentage loss is capped at 100%; a short's is not. A short at 40 that rises to 60 loses 20 a share, 50% of the initial proceeds, and keeps losing as the price rises.
On a desk, P&L is reported in dollars and risk in dollars per unit move; percentages are for comparing strategies of different sizes.
Knowledge check
You buy 200 shares at 10 and 200 at 14, then sell 300 at 15. Using average cost, what is the realised P&L?
Knowledge check
You run 3× leverage: equity of 100, a position of 300, borrowing 200 at 4% a year. The asset returns 5% over the year. What is your return on equity?
Knowledge check
Which is NOT a cost or risk specific to holding a short stock position?
Key takeaways
- ; total P&L = cash flows + marked position value.
- Average cost changes only when you add to a position; reducing it realises P&L against the average.
- Shorts pay dividends and borrow fees, face recall and squeeze risk, and have unbounded losses.
- Leverage: ; it scales risk as well as return.
- Report P&L in dollars; percentages are asymmetric and ill-defined for shorts.
Practice problems
Finished reading?
Answer the 3 knowledge checks to complete this lesson (0 done).