Interactive Brokers portfolio tracker: benchmark your Interactive Brokers portfolio against the S&P 500
We read the sectioned Activity Statement CSV straight from Interactive Brokers and rebuild trades, dividends, withheld tax and funding into one history. The file is several tables sharing one document, each section carrying its own header row, which is why it looks broken in a spreadsheet and is not. The default statement range stops at 365 days, so a long history arrives as one file per calendar year and the files are merged on upload.
What the file contains
Every row starts with the name of its section and a marker saying whether it is a header line or a data line. The trades section carries Symbol, ISIN, Quantity, T. Price, Proceeds and Comm/Fee with a Date/Time stamp. Dividends and withheld tax each get a section of their own, with a date, an amount, a currency and a description that names the holding.
Funding rows carry a settle date, an amount and a currency. Nothing is pre-converted: a US dividend is in dollars, a European fund pays in euros, and each event is converted at the rate that applied on its own date. That is what keeps a cost basis from moving on days you did not trade.
Sections we do not use are skipped and named in the import report, so nothing vanishes without a trace.
The export comes as CSV, and we read the file as it is: no renaming, no reformatting, no cleaning up in a spreadsheet first. The columns we look for in this export are Symbol, ISIN, Quantity, T. Price, Proceeds, Comm/Fee, Date/Time, Currency, Amount, Description, Settle Date and Asset Category.
How the import works for Interactive Brokers
Interactive Brokers has a reader of its own, tested against real exports. Upload the file as it came off your account and the columns are recognised without you mapping anything.
An Activity Statement exported as CSV from Performance & Reports, or a saved Activity Flex Query when you export on a schedule. The full route is in our Interactive Brokers export guide.
Run one statement per calendar year and upload the set together. A gap between the end of one year and the start of the next produces sells with no matching purchase, and the earliest file needs to reach back to your first trade rather than to the first year you happen to remember.
A Flex Query is worth the few minutes of setup if you upload regularly. It returns the fields you selected in the order you selected them, and a layout that never shifts is a layout that cannot break between one upload and the next.
What to watch for with Interactive Brokers files
Sections, not one table. The statement stacks several tables in one file. That structure is what tells a purchase apart from a dividend, so rearranging it in a spreadsheet removes the only thing a parser has to work from.
Native currencies throughout. Trades and income stay in the currency of the market they happened in. Converting the lot at one rate would collapse information the file recorded correctly, so the conversion happens per event.
Asset categories. Shares and funds are read into your positions. Other categories are reported instead of being folded in, so you can see for yourself what was left out and why a total may differ from the account.
White label brokers. Lynx and Mexem run on the same engine and produce the same file. If your platform looks like Trader Workstation, this format is very probably the one you have.
What you see after the upload
Your file becomes a verdict first: your time-weighted return next to the S&P 500 and the Nasdaq 100 over the same period, with your own deposits replayed into the index so both sides carry the same timing. Under it sit your positions with their cost basis, the dividends you received and the income your holdings are expected to pay, your allocation across positions and currencies, and a year report you can keep for your records.
With every funding row dated, the verdict replays your deposits into the index on the days they actually arrived, and the dividend view totals payments that came in three currencies.
You can look at all of that on the demo portfolio before you upload anything of your own. The first two weeks are free and no card is asked for.
Frequently asked questions
Activity Statement or Flex Query? Either works. The Activity Statement is the quicker route for a one-off upload, and the Flex Query earns its keep through repeatability, because it returns the same fields in the same order every time you run it. If you intend to upload monthly, the query is the calmer of the two options over a year.
Why is my history spread over several files? Because the default range of an Activity Statement tops out at 365 days. One statement per calendar year, uploaded together, reconstructs the whole record. Overlapping periods do no harm: rows that are already known are recognised and skipped, so you can re-export a wider range whenever you are unsure.
A section is missing from my import. What happened? Usually the section was not ticked in the Flex Query, or the statement range did not cover the period you were looking for. The import report names what was read and what was ignored, so start there. Re-running the export with the missing section selected fixes it without anything having to be deleted first.
I am at Lynx. Does this page apply to me? Yes, in full. Lynx and several other European brokers are built on Interactive Brokers, and their exports carry the same sections with a different logo on the paperwork. Upload the file the same way. If the columns turn out to differ, the column mapper picks it up rather than rejecting it.
Related: All brokers · Interactive Brokers export guide · FX (foreign exchange) rate · Base currency · Withholding tax · Time-weighted return (TWR) · BullBenchmark vs a spreadsheet