An Interactive Brokers trading journal is a record of your IBKR trades with what the statement leaves out: the plan before each entry, the result in R and whether the rules were followed. Rather than typing every fill, you export the trades from Client Portal as a CSV, either an Activity Statement or a Flex Query, and import the file.
Two ways to export from IBKR
| Activity Statement | Flex Query | |
|---|---|---|
| Best for | A quick one-off export | Regular imports with the same setup |
| Setup | None | Create the query once, choosing the fields |
| File | Many sections in one file; the journal reads the Trades section | Only the fields you chose |
| Times | Date and time of each fill | Date and time of each execution |
Option 1: Activity Statement
- Sign in to Client Portal and open Performance & Reports › Statements.
- Click the run arrow next to the Activity statement and choose the period: a month, a year, year to date, or a custom date range.
- Choose CSV as the format and download the file.
The file holds every section of the statement (positions, cash, dividends, fees and more). A journal only needs the Trades section's lines for stocks, marked as orders; subtotals, totals and other asset classes are left out. In that section, Quantity is signed (negative for a sale) and the Code column holds O for an opening fill and C for a closing one, which tells a new short sale from the sale of shares bought earlier.
Option 2: Flex Query
- In Client Portal, open Performance & Reports › Flex Queries and add an Activity Flex Query.
- Under Sections, choose Trades, set the level of detail to Executions and tick at least: Symbol, the date and time of the execution, Quantity, Trade Price, IB Commission, Buy/Sell and Open/Close Indicator. Asset Class is worth adding too.
- In the delivery settings, set the format to CSV and a year-first date format such as yyyyMMdd or yyyy-MM-dd.
- Save the query, then run it for the period you want and download the file. Next time, only the run is needed.
IBKR keeps saved Flex Queries available for the four previous calendar years and the current year. Depending on the fields chosen, the date and time come as one Date/Time column or as two, Trade Date and Trade Time; a journal that can't find the column it expects should let you choose the date and time columns once. If the query includes the asset class, only stock lines are read; corporate-action lines marked (Ca.) are left out.
Worked example (illustrative numbers)
Illustrative numbers only. The Trades section of a statement lists two fills for a made-up ticker, XMPL: on 2 March, 200 shares bought at $25.10 with code O and $1.00 of commission; on 9 March, −200 shares at $27.40 with code C and $1.00 of commission. The import turns them into one long trade, closed, with P&L of $460 before fees and $458 after. The statement shows nothing more. With the planned stop of $24.10 added in the journal, 1R was $1.00 a share, so the trade made +2.3R, and the trade can now be reviewed against its plan.
Common mistakes
- A period that starts mid-position. A sale whose purchase is before the file's dates can't be matched and is left out. Start the export on a day with no open positions.
- Several accounts in one statement. Import one account at a time.
- Summary-level Flex Query. Choose execution-level detail; summarized lines hide the individual fills.
- Options and futures. These lines are skipped: the journal covers US stocks and ETFs.
- Stopping at the import. The file has fills, not plans. Add the stop and setup, or R and the rule check can't be calculated.
In Clear Tape
In the trade journal (Journal in the dashboard menu), Import CSV has two Interactive Brokers presets: Activity Statement and Flex Query (Trades). The file's columns are recognized by name, so IBKR adding or reordering columns doesn't break the import. The file is read in your browser, only the trades are sent, and the import never connects to your IBKR account (the optional daily sync, linked in Settings › Account, uses a read-only Flex Query). The preview lists the trades found, the lines left out with the reason, and trades already in the journal, so an overlapping period doesn't create duplicates. Fills are grouped into round-trip trades, first in, first out. The import is free on every plan; see the trade journal page. For other brokers, see how to import trades from any broker's CSV.
To check the habits in this export before importing it, open it in the free trade history analyzer, which recognizes the Interactive Brokers file.
For educational purposes only. Not investment advice.