XTB portfolio tracker: benchmark your XTB portfolio against the S&P 500
We read an XTB transaction export and turn each operation into a purchase, a sale, a dividend, an interest payment or a movement of cash. The layout we recognise is built around a type field and a cash amount, with a comment that carries the detail of the operation. There is no separate quantity column in that layout, so the number of shares comes out of the operation text and a file that has lost it needs the mapper.
What the file contains
Each row has a timestamp, the symbol of the instrument, the type of operation, the amount that moved and a comment. The type field is what sorts them: a purchase of shares or funds, a sale, a dividend, interest on an uninvested balance.
The amount is the cash side of the operation, positive when money arrives and negative when it leaves. That makes the file a clean record of cash flow, which is exactly what an honest comparison with an index needs, and a slightly thin record of positions, which is why the comment matters.
Type labels are not always in English. The export follows the market the account belongs to, so the usual labels are matched in several languages rather than one being assumed. A label nobody has seen before is reported instead of being filed under a heading it may not belong to.
The columns we look for in this export are Time, Symbol, Type, Amount and Comment.
How the import works for XTB
XTB is recognised through a column profile: we know the header names its export uses. That profile follows the documented format rather than a large set of real files, so if a header has been renamed you point at the column once and we save the mapping.
We do not print a click path here, because menu names move between releases and a wrong one costs you more time than no one at all. Look for the transaction history or the account statement of your XTB account and take the machine-readable version of it over the PDF.
Export from your first operation onward. An XTB account is often opened for a single instrument and grows into a portfolio, and a file that starts in January of this year turns everything older into a holding with no purchase behind it.
Check that dividend rows are present for the months you know you were paid, because an export limited to trades leaves income out of the total and the total is the figure you were after. Anything that cannot be placed is listed in the import report rather than dropped.
What to watch for with XTB files
Localised type labels. The same operation is written differently depending on the market the account belongs to. A list of known labels in several languages is matched, and an unfamiliar one is reported instead of being guessed at.
Cash first, positions second. The file is organised around money moving, so holdings are reconstructed from the operations rather than read from a position column. A missing operation shows up later as a holding that does not add up.
Interest on free funds. Interest paid on an uninvested balance is income on cash and not a result produced by your holdings. Keeping the two apart stops a large cash balance from flattering the things you actually chose.
A comment field doing real work. The detail of an operation, the number of shares included, often sits in the comment rather than in a column. That is workable and it is fragile, because a comment truncated by a spreadsheet takes the quantity with it.
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 interest and dividends held apart from your trades, the yearly report shows what the holdings produced next to what the cash on the side produced.
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
My positions do not match my account. What went wrong? Either an operation is missing from the range you exported, or a quantity was lost when the comment field was truncated or reformatted. Start by checking that the earliest row predates your first purchase, then re-export the untouched file. Positions are rebuilt from operations here, so one missing row moves everything after it.
Is interest counted as investment return? No. Interest on an uninvested balance is booked as income on cash and shown separately from the results of your holdings. It is part of what the account produced over the year and it says nothing about whether the instruments you picked did well, which is the question a benchmark comparison is trying to answer.
My export is not in English. Does that break anything? No. Booking labels are consistent within a broker, and consistency rather than English is what a parser needs. Several languages of type label are recognised, and where a label is new to us the row is reported so you can map it yourself instead of it being quietly filed under the wrong heading.
Can I upload several years at once? Yes, and you should if the export is capped per period. Upload the files together or one after another; overlapping ranges are handled because rows already imported are recognised. The important part is that the oldest file reaches back to the beginning rather than to a year you picked from memory.
Related: All brokers · Cost basis · Dividend · Cash-flow replay · Total return · BullBenchmark vs a spreadsheet