---
title: Trader P&L
description: Track fills and realized P&L across every brokerage account, with profitability and tax-liability reports.
---

::callout{type="info"}
This app's labels ship in US English first. They can be translated for the
whole platform, and a workspace admin can override any of them.
::

# Trader P&L

Trader P&L keeps one ledger for a book of brokerage accounts. You import fills
and cash events from each broker; it works out what you actually made, what you
still hold, and what the year looks like for tax — as Excel workbooks you can
hand to an accountant.

::alert{type="warning"}
**The tax reports are an estimate, not tax advice.** They apply the rates you
enter to computed character buckets. They do not model tax brackets, deductions,
prior-year carryforwards, AMT, state tax, the trader mark-to-market election, or
straddle rules. Have a tax professional review the numbers before you file.
::

Trader P&L is a private app. An administrator grants it to your workspace before
it appears in the Marketplace — ask your account contact if you do not see it.

## What you get

- **Accounts** — every brokerage account in one place: taxable, traditional IRA,
  Roth IRA, or an entity account. The account type matters, because gains inside
  an IRA are not taxable *and* an IRA purchase can permanently disallow a loss
  taken in a taxable account.
- **Instruments** — equities, equity options, futures and crypto, each with its
  contract multiplier and the mark used to value open positions.
- **Fills** — the immutable record of every execution, keyed by the broker's own
  execution id so re-importing a statement never double-counts.
- **Cash events** — dividends, interest, margin interest, borrow and platform
  fees, staking rewards, deposits and withdrawals.
- **Statement reconciliation** — a board that walks each month's statement from
  Imported to Reconciled, with a discrepancy lane and a note trail.
- **Tax years** — a close workflow that cannot be marked final until a frozen
  snapshot stands behind it.
- **Three Excel reports** — account P&L, a portfolio roll-up, and a tax pack.

## Import your fills

Trader P&L uses the standard import wizard, so any broker that exports CSV or
Excel works.

1. Export your trade confirmations or activity statement from the broker.
2. Open **Fills** and choose **Import**.
3. Map the broker's columns to these fields:

   | Field | What it holds | Required |
   |---|---|---|
   | `broker_exec_id` | The broker's own execution / trade id | Yes |
   | `broker_account_id` | Which account the fill belongs to | Yes |
   | `instrument_id` | Which instrument was traded | Yes |
   | `side` | `buy`, `sell`, `sell_short`, `buy_to_cover` | Yes |
   | `quantity` | Units, always positive — `side` carries the sign | Yes |
   | `price` | Price per unit, before the multiplier | Yes |
   | `commission`, `fees` | Split, because only commission uniformly adjusts basis | No |
   | `trade_date` | The date matching uses — not the settle date | Yes |
   | `disposition` | `trade`, `exercise`, `assignment`, `expiry`, `transfer_in`, `transfer_out` | No |

4. **Set the upsert key to `broker_exec_id`.** This is the one setting that
   matters: with it, re-importing an overlapping statement updates the rows it
   already has instead of adding duplicates.

Broker column names differ, so the mapping is worth saving a note of the first
time you do it. Common sources are Interactive Brokers Flex queries, Schwab and
Fidelity activity exports, Tastytrade and TradeStation trade history, and
Coinbase or Kraken fills.

### Corrections

Brokers reissue fills. Do not edit the original row — add a new fill and point
its `corrects_trade_fill_id` at the one it replaces. The reports drop any fill that a
later row corrects, which keeps every historical snapshot reproducible. A chain
of corrections resolves to the last link.

### Positions transferred in

A position moved from another broker usually arrives without a cost basis. Set
`disposition` to `transfer_in` and fill in `transfer_basis` and
`transfer_acquired_on`. If you leave them blank the lot is flagged on the
Warnings sheet and left out of the tax pack — it is never assumed to have cost
nothing, which would overstate your gain.

## The reports

Each report is one click from a record, and each ends with a **Warnings** sheet
listing data problems found while computing — a missing basis, a stale mark, an
option settlement that could not be matched. Warnings never stop a report; they
tell you what to fix.

### Account P&L

From any account. Summary, realized gains lot by lot, open lots, unrealized
value, cash events, warnings.

### Portfolio P&L

From a tax year. The same picture across every account included in that year,
with a per-account breakdown and the consolidated totals.

### Tax pack

From a tax year. A Form 8949 sheet in the form's own column order and grouped by
box, a Schedule D summary, a Form 6781 sheet for futures and index options, the
wash-sale detail, crypto disposals, income, and a notes sheet recording exactly
which rules were applied.

## How the numbers are worked out

**Lot matching.** Closes consume open lots by the method on your tax profile —
FIFO, LIFO, HIFO, or average cost — with a separate choice for crypto, since
many traders run FIFO equities and HIFO crypto. Partial closes split a lot.
A short sale's gain is short-term however long it was held.

**Wash sales.** A loss on a security is disallowed when you buy a substantially
identical one within 30 days either side of the sale. Detection spans **every
account in your book, including IRAs** — the rule is not per-account, and
checking one account at a time under-reports. An ordinary wash defers the loss
into the replacement lot's basis and extends its holding period. A replacement
bought inside an IRA disallows the loss **permanently**: no basis is added
anywhere, and it is reported on its own line.

"Substantially identical" is matched on the symbol, and for options on the same
underlying, type and strike. Broader judgments — two funds tracking one index,
say — are your accountant's call, not the app's.

**Futures and index options.** Positions marked as Section 1256 contracts mark to
market at year end whether or not you closed them, and all the gain splits 60%
long-term / 40% short-term regardless of holding period. The flag is editable
per instrument because index options on SPX are Section 1256 contracts while
options on SPY are not, and no rule based on the symbol gets that reliably right.
The prior year's mark comes from the tax year record rather than being guessed,
so installing part-way through a trading history does not mis-state year one.

**Options.** Expiry realizes the whole premium on the expiry date. Exercise and
assignment do not realize the premium on their own — it folds into the stock
leg settled the same day: a premium received on an assigned call raises the sale
proceeds, and a premium paid on an exercised call raises the new lot's basis.
If a settlement cannot be matched to its stock leg, you get a warning rather
than a silently wrong number in both places.

**Crypto** is treated as property: no Section 1256 treatment, and no wash sales
unless you switch them on for crypto in the tax profile. Staking rewards and
airdrops are ordinary income when received, and that amount becomes the lot's
cost basis.

**Unrealized value** comes from the mark you set on each instrument. There is no
live price feed. Every unrealized line shows the date its mark came from, a mark
more than a week old raises a warning, and an instrument with no mark is shown
at cost rather than valued at zero.

## Snapshots, and why a filed number stays put

Finalizing a tax year requires a snapshot. A snapshot freezes the computed
report together with a fingerprint of the fills it was computed from.

If a backdated fill arrives later and you re-run, the app does not overwrite what
you filed. It writes a **new** snapshot and marks the old one superseded, so you
can see exactly what changed and by how much. That is the difference between
this and a spreadsheet, where last year's number quietly becomes a different
number.

## What this app does not do

Stated plainly, so you know where the edges are:

- US federal rules only — no state tax, and no other country's regime.
- No live market data. Marks are values you set.
- One base currency (USD). No foreign-exchange gain or loss.
- No trader mark-to-market election, no straddle rules, no constructive sales.
- No partnership K-1s, and no apportionment of margin interest.
- Corporate actions — splits, symbol changes, mergers — are handled by hand:
  close the old instrument and open the new one with a `transfer_in` carrying
  the basis forward.
