Interactive Brokers
ShareCalc imports an Interactive Brokers (IBKR) Flex Query, a report you set up once in IBKR and can then run whenever you need it. It downloads as an XML file.
Export and import
- Sign in to Interactive Brokers.
- Open Performance & Reports, then Flex Queries.
- Next to Activity Flex Query, create a new query and give it a name.
- Add these sections. In each one, select all the fields:
- Cash Transactions
- Change in Dividend Accruals
- Corporate Actions
- Option Exercises, Assignments and Expirations
- Trades
- Transfers
- Under Delivery Configuration, choose XML.
- Under General Configuration, set:
- Date Format:
yyyyMMdd - Time Format:
HHmmss - Date/Time Separator:
;(semicolon) - Breakout by Day: No
- Date Format:
- Save the query.
- Run it, choose the period, and download the XML file.
If you'd rather use a different date format, choose one with the day first, such as dd/MM/yyyy. Don't use a US date with the month first: ShareCalc can't tell the day from the month.
Export all transactions since the account opened.
IBKR supplies transaction IDs. See duplicate handling when importing overlapping reports.
Add the file to an import in ShareCalc and leave File Format set to Auto-detect.
Coverage
- Buys and sells of shares, funds, options, futures and gilts.
- Dividends and interest, with any tax withheld.
- Payments in and out, fees, and transfers.
- Option exercises, assignments and expiries.
- Splits, spin-offs, bonds repaid at maturity, and other corporate actions ShareCalc recognises.
Anything ShareCalc can't handle in those sections is listed in Import Messages and not imported.
Limitations
- Option trades settled in cash. These aren't supported yet. Check the option and the cash payment in your IBKR statement, then add them in Transactions, or with a ShareCalc CSV.
- Anything outside the six sections above. ShareCalc only reads those sections, and it doesn't tell you about anything else in the file. If you leave a section out of the query, its transactions are missing without any message.
Checks and fixes
Review Import Messages and follow the shared checks.
- Unmatched entries. Look for:
- corporate actions ShareCalc didn't recognise;
- option exercises or assignments it couldn't match with their share trade;
- tax withheld, or fees, it couldn't link to a payment;
- accrued interest on a gilt (the interest built up since the last payment) it couldn't match with a gilt trade;
- cancelled or reversed transactions whose original is in a different file or period.
- Partly imported events. IBKR sometimes records one event as several linked entries. When ShareCalc can't safely link them, it leaves the event out, or imports only part of it, and says so in Import Messages. Check those transactions in Transactions and complete them by hand.
- New holdings in Assets. ShareCalc sets the type for ordinary shares, options, futures and UK government bonds (gilts). Others, such as ETFs, funds and other bonds, are added as Unclassified, unless ShareCalc recognises them from its list of HMRC reporting funds.
ShareCalc can't read the dates. Check the date format in the query's General Configuration. Use the settings in step 6, then run the query again. Back to Importing Data