Realized Partial Gain Calculation

When you close a position with multiple entries (scaling in/out), how your profit/loss is calculated matters. TraderSync offers three methods: FIFO, LIFO, and Weighted Average. These impact your trade detail page, especially the partial gains for each execution.

Intro to the Methods

  • FIFO (First In, First Out): Assumes you sell your earliest purchased shares first. Common for tax purposes.
  • LIFO (Last In, First Out): Assumes you sell your most recently purchased shares first. Less common in trading.
  • Weighted Average: Calculates an average purchase price across all entries, then uses that for exits.

Example

Impact on Partial Gains

Let’s say you:

  • Buy 100 shares at $10
  • Buy 100 shares at $12
  • Sell 100 shares at $15

Here’s how the partial gain on that sale is calculated differently:

  • FIFO:
    • Assume you sold the $10 shares first
    • Partial Gain: $500 (100 shares * ($15 – $10))
  • LIFO:
    • Assume you sold the $12 shares first
    • Partial Gain: $300 (100 shares * ($15 – $12))
  • Weighted Average:
    • Average Entry Price: $11 ((100 * $10) + (100 * $12)) / 200 shares)
    • Partial Gain: $400 (100 shares * ($15 – $11))

Formulas

  • FIFO: Partial Gain = (Exit Price – Price of Earliest Shares) * Quantity Sold
  • LIFO: Partial Gain = (Exit Price – Price of Latest Shares) * Quantity Sold
  • Weighted Average:
    • Avg Entry Price = (Total Entry Cost) / (Total Shares)
    • Partial Gain = (Exit Price – Avg Entry Price) * Quantity Sold

Changing Your Setting in TraderSync

  • Go to the Configuration page (bottom left icon)
  • Under “Trades“, find “Realized Partial Gain Calculation
  • Select your method (FIFO, LIFO, Weighted Average)
  • TraderSync will recalculate your partial PnLs.

Which Method is Right?

There’s no single “best” method. Consider your tax situation, trading style, and the insights you want. Experiment to see how each method impacts your trade analysis.