Skip to content

Get flex reports

Portfelj works by processing your brokerage account activity, also known as flex reports, created using Flex Query. Let's begin by setting one up.

Create flex query

Login to Interactive Brokers portal and follow instructions below to create a Flex Query.

  1. Go to Performance & Reports -> Flex QueriesFlex queries menu
  2. Click "+" next to Activity Flex Query to add new Add flex query
  3. Type in the Query Name, can be anything
  4. Click on Account Information under the Sections menu. Select IB Entity and Account ID, then click Save at the bottom. Account information
  5. Click on Trades under the Sections menu. Select Executions in Closed Lots under Options. Click on Select all to select all rows. Trades
  6. Click on Corporate Actions under the Sections menu. Click on Select all to select all rows. Corporate actions
  7. Click on Cash Transactions under the Sections menu. Select Dividends, Payment in Lieu of Dividends, Withholding Tax, Broker Fees in Broker Interest Received under OptionsCash transactions
  8. Click on Financial Instrument Information under the Sections menu. Click on Select all to select all rows. Financial instrument information
  9. Click on Transfers under the Sections menu. Select Transfer under Options. Click on Select all to select all rows. Financial instrument information
  10. Leave everything else unchanged, including date settings, which will be set later when running the flex query.
  11. Click Continue at the bottom of the page, then Create, then Ok once again before returning back to Flex Queries. All set
  12. Your newly created flex query can be found under Activity Flex Query in the Performance & Reports -> Flex Queries.

Export flex report

Assuming you're in the Performance & Reports -> Flex Queries section of IB portal, follow the next steps to export reports:

  1. Click the arrow next to your flex report.
  2. Change the Period to Custom Date Range.
  3. In the appeared From Date and To Date, select the first and the last day of the year for which you're generating the report.
  4. Hit Run to get the report.

Repeat the steps above for each trade year.

TIP

If you have multiple accounts, you should be able to select all of them and export combined reports. The corresponding menu is available next to the Flex Queries heading on Performance & Reports -> Flex Queries page.

WARNING

Slovenian account holders have been transferred between different branches of Interactive Brokers over the years and received new account ID each time. Therefore it's important to export trade data for each account active in the selected year.

TIP

Some trade data can be backdated in the current year's report. Along with full year reports, make sure to generate a year-to-date report to ensure the correct calculations.

For example, if you look to generate a full year report for 2024, make sure to generate the year to date report for 2025 too. You can replace the incomplete 2025 report with the full year report in the following year.

WARNING

It's recommended to keep backups of reports since Interactive Brokers only provide reports for the past 5 years. Also so that you don't have to generate them each time.