This page explains the CSV files used for US and Canadian tax filing. Hand this page and the four CSV files to your accountant.
To produce the four CSV files for a given tax year, run:
ibctl realized-sale list --from 20250101 --to 20251231 --base-currency USD --format csv > realized-sale-list-2025-usd.csv
ibctl realized-sale list --from 20250101 --to 20251231 --base-currency CAD --format csv > realized-sale-list-2025-cad.csv
ibctl transaction list --from 20250101 --to 20251231 --base-currency USD --format csv > transaction-list-2025-usd.csv
ibctl transaction list --from 20250101 --to 20251231 --base-currency CAD --format csv > transaction-list-2025-cad.csv
Replace 2025 with the applicable tax year. The --from and --to flags filter on the transaction/sale date (inclusive on both ends).
Everything below this line is written for your accountant. Hand them this page along with the four CSV files.
You are receiving four CSV files covering investment activity for the tax year. The client is a US citizen living in Canada who files in both jurisdictions.
Two reports are provided, each in two currencies:
- Transaction sale list -- Realized capital gains with per-lot detail. Each row is one FIFO buy-lot-to-sell match. Use this for Schedule D / Form 8949 (IRS) and Schedule 3 (CRA).
- Transaction list -- Complete chronological transaction history including buys, sells, dividends, interest, withholding tax, corporate actions, and transfers. This gives a comprehensive view of all investment activity for the year.
| File | Purpose | Jurisdiction |
|---|---|---|
realized-sale-list-YYYY-usd.csv |
Realized capital gains (FIFO lot matches) in USD | IRS -- Schedule D / Form 8949 |
realized-sale-list-YYYY-cad.csv |
Realized capital gains (FIFO lot matches) in CAD | CRA -- Schedule 3 |
transaction-list-YYYY-usd.csv |
Complete transaction history in USD | IRS -- supplementary income detail |
transaction-list-YYYY-cad.csv |
Complete transaction history in CAD | CRA -- supplementary income detail |
The USD and CAD versions of each report contain the same underlying trades. They differ only in the base currency used for P&L conversion and the FX rates applied.
This file has 16 columns. Each row represents one FIFO lot match (not one trade -- see below).
| # | Column Header | Description |
|---|---|---|
| 1 | SYMBOL | Ticker symbol (e.g., AAPL, VFV.TO) |
| 2 | ACCOUNT | Account name |
| 3 | QUANTITY | Number of shares in this lot match (always positive) |
| 4 | CURRENCY | Native trading currency of the security (e.g., USD, CAD, GBP) |
| 5 | PURCHASE DATE | Date the buy lot was opened (YYYY-MM-DD) |
| 6 | PURCHASE PRICE | Per-share cost basis in native currency |
| 7 | SALE DATE | Date the shares were sold (YYYY-MM-DD) |
| 8 | SALE PRICE | Per-share sale price in native currency |
| 9 | P&L | Realized P&L in native currency: (sale price - purchase price) * quantity |
| 10 | PURCHASE RATE {BASE} | FX rate (native-to-base) on the purchase date |
| 11 | SALE RATE {BASE} | FX rate (native-to-base) on the sale date |
| 12 | PURCHASE {BASE} | Per-share cost basis in base currency: purchase price * purchase rate |
| 13 | SALE {BASE} | Per-share sale price in base currency: sale price * sale rate |
| 14 | P&L {BASE} | Realized P&L in base currency: (sale base - purchase base) * quantity |
| 15 | STCG {BASE} | Short-term capital gain in base currency (equals P&L {BASE} if held < 365 days, else 0) |
| 16 | LTCG {BASE} | Long-term capital gain in base currency (equals P&L {BASE} if held >= 365 days, else 0) |
{BASE} is replaced with the base currency code in the actual CSV header (e.g., P&L USD, STCG CAD).
Each row is one FIFO lot match -- not one trade. When a single sell order consumes multiple buy lots, each lot match produces its own row with its own purchase date and cost basis.
For example, selling 150 shares where FIFO matches 100 shares from Lot A and 50 shares from Lot B produces two rows in the CSV, one for each lot match.
The CSV does not include a totals row. To compute totals, sum P&L {BASE}, STCG {BASE}, and LTCG {BASE} across all rows.
This file has 21 columns. Each row is one transaction event in chronological order.
| # | Column Header | Description |
|---|---|---|
| 1 | TYPE | Transaction type (see below) |
| 2 | SYMBOL | Ticker symbol |
| 3 | ACCOUNT | Account name |
| 4 | QTY | Quantity (always positive for sells; signed for others) |
| 5 | CCY | Native trading currency of the security (e.g., USD, CAD, GBP) |
| 6 | PUR DATE | Buy lot open date (YYYY-MM-DD). Only populated for SELL rows. |
| 7 | PUR PRICE | Cost basis per share in native currency. Only populated for SELL rows. |
| 8 | DATE | Transaction date (YYYY-MM-DD) |
| 9 | PRICE | Price per share in native currency. Only populated for BUY and SELL rows. |
| 10 | DIVIDEND | Dividend amount in native currency. Only populated for DIVIDEND and WHT rows. WHT values are negative, reducing the dividend total. |
| 11 | INTEREST | Interest amount in native currency. Only populated for INTEREST rows. |
| 12 | P&L | Realized P&L in native currency. Only populated for SELL rows. |
| 13 | PUR RATE {BASE} | FX rate on the purchase date. Only populated for SELL rows. |
| 14 | RATE {BASE} | FX rate on the transaction date. Populated for all rows. |
| 15 | PUR {BASE} | Purchase price per share in base currency. Only populated for SELL rows. |
| 16 | PRICE {BASE} | Price per share in base currency. Only populated for BUY and SELL rows. |
| 17 | DIV {BASE} | Dividend amount in base currency. Only populated for DIVIDEND and WHT rows. |
| 18 | INT {BASE} | Interest amount in base currency. Only populated for INTEREST rows. |
| 19 | P&L {BASE} | Realized P&L in base currency. Only populated for SELL rows. |
| 20 | STCG {BASE} | Short-term capital gain in base currency. SELL rows held < 365 days. |
| 21 | LTCG {BASE} | Long-term capital gain in base currency. SELL rows held >= 365 days. |
| TYPE | Description |
|---|---|
| BUY | Purchase of shares |
| SELL | Sale of shares (with FIFO lot matching) |
| DIVIDEND | Dividend payment received |
| INTEREST | Interest payment received |
| WHT | Withholding tax deducted (always negative) |
| SPLIT | Stock split (forward or reverse) |
| MERGER | Merger corporate action |
| SPINOFF | Spinoff corporate action |
| TRANSFER_IN | Shares transferred into the account |
| TRANSFER_OUT | Shares transferred out of the account |
SELL rows use FIFO lot matching (identical to the realized-sale list), so a single sell order may produce multiple rows if it matches multiple buy lots. All other transaction types produce one row per event.
Not all columns are populated for every row type. In particular:
- BUY: PRICE and PRICE {BASE} are populated. PUR DATE, PUR PRICE, DIVIDEND, INTEREST, and P&L columns are blank.
- SELL: All columns may be populated, including purchase info from the matched buy lot.
- DIVIDEND / WHT: DIVIDEND and DIV {BASE} are populated. WHT values are negative. QTY, PRICE, INTEREST, and P&L columns are blank.
- INTEREST: INTEREST and INT {BASE} are populated. QTY, PRICE, DIVIDEND, and P&L columns are blank.
- SPLIT / MERGER / SPINOFF / TRANSFER_IN / TRANSFER_OUT: QTY is populated. PRICE, DIVIDEND, INTEREST, and P&L columns are blank. These are informational rows.
The CSV does not include a totals row. To compute totals, sum DIV {BASE}, INT {BASE}, P&L {BASE}, STCG {BASE}, and LTCG {BASE} across all rows. This gives total dividends (net of WHT), total interest, total realized gains/losses, and the STCG/LTCG split.
For cross-currency trades, native prices are converted to the base currency using date-specific FX rates:
- Purchase price in base currency = native purchase price multiplied by the FX rate on the purchase date.
- Sale price in base currency = native sale price multiplied by the FX rate on the sale date.
- Dividend/interest in base currency = native amount multiplied by the FX rate on the payment date.
- P&L in base currency =
(sale price in base - purchase price in base) * quantity.
This means the base-currency P&L captures both the underlying price movement of the security and the FX movement between the purchase and sale dates.
Rate sources:
- frankfurter.dev (European Central Bank data) for conversions to USD
- Bank of Canada for conversions to CAD
For weekends and holidays where no rate is published, the most recent business day rate is used.
For same-currency trades (e.g., a USD-denominated security in the USD file), the rate is 1.0 and the base currency columns are identical to the native currency columns.
The short-term vs long-term classification is based on the holding period from purchase date to sale date:
- < 365 days: Short-term capital gain (STCG)
- >= 365 days: Long-term capital gain (LTCG)
For each sale, exactly one of STCG or LTCG equals P&L {BASE} and the other is zero.
Trades in tax-exempt accounts (such as RRSP or TFSA) have P&L, STCG, and LTCG set to zero. These rows appear in the CSV for completeness but have no tax impact. They can be ignored or filtered out.
Bond prices represent a percentage of par value (e.g., a price of 98.50 means 98.5% of par). The per-share PURCHASE PRICE and SALE PRICE columns are in percentage-of-par form, but the P&L columns are adjusted to reflect actual dollar amounts (divided by 100).
Option trades flow through FIFO like any other security:
- Expirations are treated as a sale at $0. This produces a loss equal to the premium paid (for the buyer) or a gain equal to the premium received (for the writer).
- Exercises and assignments create synthetic stock trades at the strike price. The option premium is embedded in the cost basis of the resulting stock position.
These reports do not track FX gains or losses on cash balances (e.g., converting USD cash to CAD cash). Brokerages do not issue 1099s or T-slips for FX gains on cash conversions within brokerage accounts, so any reporting above the $200 thresholds is self-reported. These reports do not capture cash conversion activity.
The USD and CAD files contain the same trades but will show different P&L totals. This is expected. The difference arises because each file uses different FX rates:
- The USD file converts native prices to USD using the USD rate on the purchase and sale dates.
- The CAD file converts native prices to CAD using the CAD rate on the purchase and sale dates.
FX movements between the purchase and sale dates can amplify, reduce, or even flip a gain into a loss (or vice versa) depending on the direction of the rate movement. This is correct and matches the legal requirement: the CRA requires CAD conversion at each transaction date, and the IRS requires USD conversion at each transaction date.
Buy 100 shares of VFV.TO (a CAD-denominated ETF) on 2024-03-15 at C$102.50. Sell on 2025-01-10 at C$115.30. Holding period: 301 days (short-term).
| Column | Value |
|---|---|
| SYMBOL | VFV.TO |
| ACCOUNT | taxable |
| QUANTITY | 100 |
| CURRENCY | CAD |
| PURCHASE DATE | 2024-03-15 |
| PURCHASE PRICE | 102.50 |
| SALE DATE | 2025-01-10 |
| SALE PRICE | 115.30 |
| P&L | 1280.00 |
| PURCHASE RATE USD | 0.738000 |
| SALE RATE USD | 0.695000 |
| PURCHASE USD | 75.645000 |
| SALE USD | 80.133500 |
| P&L USD | 448.850000 |
| STCG USD | 448.850000 |
| LTCG USD | 0 |
Calculation: PURCHASE USD = 102.50 * 0.738 = 75.645. SALE USD = 115.30 * 0.695 = 80.1335. P&L USD = (80.1335 - 75.645) * 100 = 448.85.
| Column | Value |
|---|---|
| SYMBOL | VFV.TO |
| ACCOUNT | taxable |
| QUANTITY | 100 |
| CURRENCY | CAD |
| PURCHASE DATE | 2024-03-15 |
| PURCHASE PRICE | 102.50 |
| SALE DATE | 2025-01-10 |
| SALE PRICE | 115.30 |
| P&L | 1280.00 |
| PURCHASE RATE CAD | 1.000000 |
| SALE RATE CAD | 1.000000 |
| PURCHASE CAD | 102.500000 |
| SALE CAD | 115.300000 |
| P&L CAD | 1280.000000 |
| STCG CAD | 1280.000000 |
| LTCG CAD | 0 |
Since VFV.TO is denominated in CAD, the CAD rate is 1.0 and P&L CAD equals the native P&L.
Note the difference: the same trade shows a USD gain of $448.85 but a CAD gain of C$1,280.00. The CAD weakened from 0.738 to 0.695 against the USD over the holding period, compressing the USD-denominated gain relative to the CAD-denominated gain.
These reports are designed for a US citizen living in Canada who must file taxes in both jurisdictions:
- USD files are for IRS reporting (Schedule D / Form 8949 for capital gains, plus supplementary income detail). The IRS requires all amounts in USD, converted at the transaction date rate.
- CAD files are for CRA reporting (Schedule 3 for capital gains, plus supplementary income detail). The CRA requires all amounts in CAD, converted at the transaction date rate.
The CSV files are machine-readable and can be imported into tax preparation software or spreadsheets.