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.
- Go to Performance & Reports -> Flex Queries
- Click "+" next to Activity Flex Query to add new
- Type in the Query Name, can be anything
- Click on Account Information under the Sections menu. Select IB Entity and Account ID, then click Save at the bottom.
- Click on Trades under the Sections menu. Select Executions in Closed Lots under Options. Click on Select all to select all rows.
- Click on Corporate Actions under the Sections menu. Click on Select all to select all rows.
- Click on Cash Transactions under the Sections menu. Select Dividends, Payment in Lieu of Dividends, Withholding Tax, Broker Fees in Broker Interest Received under Options
- Click on Financial Instrument Information under the Sections menu. Click on Select all to select all rows.
- Click on Transfers under the Sections menu. Select Transfer under Options. Click on Select all to select all rows.
- Leave everything else unchanged, including date settings, which will be set later when running the flex query.
- Click Continue at the bottom of the page, then Create, then Ok once again before returning back to Flex Queries.
- 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:
- Click the arrow next to your flex report.
- Change the Period to Custom Date Range.
- 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.
- 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.