TradeBB supports multiple profit calculation methods for determining trade cost basis and realized profit calculations.
Currently supported methods include:
- FIFO (First In, First Out)
- Weighted Average
These methods affect how TradeBB calculates:
- Cost basis
- Realized profit and loss
- Partial position exits
- Multi-execution trades
The selected calculation method may impact displayed Net P&L values, especially when positions are scaled in or partially closed.
Where to Configure Profit Calculation Method
You can configure your preferred calculation method at:
Settings → Preference → Profit Calculation Method

Why This Setting Matters
Profit calculation methods become important when trades are executed across multiple entries and exits.
This commonly happens when:
- Scaling into positions
- Scaling out of positions
- Partial fills
- Multiple executions at different prices
In these situations, TradeBB needs to determine which execution prices should be matched together when calculating realized profit and loss.
Different calculation methods can produce different realized P&L results even when the final position outcome is the same.
FIFO (First In, First Out)
FIFO means:
- The earliest opened position is considered closed first
Example:
Buy:
- 100 shares at $10
- 100 shares at $12
Sell:
- 100 shares at $15
Using FIFO:
- The first 100 shares purchased at $10 are matched to the sell order
Realized profit:
- ($15 - $10) × 100 = $500
FIFO is commonly used by:
- Many stock brokers
- US brokerage accounts
- Tax reporting systems
FIFO is currently the default method in TradeBB.
Weighted Average
Weighted Average combines all open executions into a single average cost basis.
Using the same example:
Buy:
- 100 shares at $10
- 100 shares at $12
Average cost:
- ($10 + $12) ÷ 2 = $11
Sell:
- 100 shares at $15
Realized profit:
- ($15 - $11) × 100 = $400
Weighted Average simplifies position cost calculations and is commonly used in some international markets and portfolio accounting systems.
Why Profit Values May Differ From Your Broker
Different brokers may use different cost basis calculation methods.
Because of this:
- Profit values inside TradeBB may differ slightly from your broker statements if calculation methods are not the same
This is especially common when:
- Scaling into trades
- Scaling out of trades
- Trading options or futures
- Using partial fills
- Importing execution-level trade history
To achieve the closest match with your broker reports, we recommend selecting the same calculation method used by your broker account.
Important Notes
- Changing the calculation method does not modify your original trade executions
- TradeBB only changes how realized profit and cost basis are calculated
- Different methods may produce different Net P&L results during partial exits
- Final total portfolio performance may still converge over time depending on position activity
Which Method Should You Use?
We generally recommend:
- FIFO for most US stock and options traders
- Weighted Average for traders whose brokers or regions commonly use average cost accounting
If you are unsure, FIFO is usually the safest default option.
