Skip to content
All library documents

Representing Short Positions with Signed Quantities in P&L Calculations

Article Quant Q&A · Author: WJA

Summary

The document shows how to account for a short position in open profit and loss using a signed position quantity. In its example, a short position is represented by a negative share count. When the current price falls below the entry price, the position has positive open P&L, while the same-sized long position has a loss. This follows from applying the position sign consistently in the P&L calculation.

The answer notes that a separate side label and a negative quantity encode the same direction information, so using both to reverse the result can accidentally apply a double negative. An implementation can use signed quantities without a separate short flag, or keep a side field and adjust the formula accordingly. The example addresses open P&L only; it does not explain realized or daily P&L treatment, transaction costs, financing, borrow fees, or corporate actions.

Key ideas

  • A short position can be represented as a negative quantity of shares.
  • A price decline produces a gain for a short position and a loss for an equal-sized long position.
  • Use either signed quantities or a side label to encode direction, avoiding a double adjustment.
  • The example covers open P&L and does not address financing or other trading costs.

Tags

Full text
# How does a Short position impact the PnL?


# How does a Short position impact the PnL?












I have several activity records which include several transaction types: `buy`, `sell`, `short`, `cover`, etc.

I understand the impact of `buy` and `sell` on the Unrealized, Daily and Realized P&L of a security or Portfolio.

However, how do you deal with a `short` position in a security? Is everything just in reverse (i.e. `buy * -1`)?

## Answer by amdopt (score 3, accepted)

https://quant.stackexchange.com/a/33488

Lots of ways to do this. Below is a pretty simple example:

```
Side    Position (Shares)   Entry Price Current Price   Open PnL
Long    1000                100         90              -10,000
Short   -1000               100         90               10,000
```

You don't need the Side and Position if you are going to use -ve values for Short positions. I just put both in for your benefit. Having Short and a -ve Position size is redundant and/or a double negative. Using either one to adjust your PnL formula will work. I personally use -ve numbers for Short positions and don't use an actual Short label.

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.