mirror of
https://github.com/farcasclaudiu/xtb-investment-tools.git
synced 2026-06-22 05:01:57 +03:00
1.6 KiB
1.6 KiB
XTB Report Format Notes
Load this when XTB parsing details matter.
Workbook Layout
- XTB exports are
.xlsxfiles. - Metadata is in rows 1-4.
- Column headers begin on row 5, so pandas should use
header=4. - Main sheets:
Cash Operations: trades, deposits, withdrawals, dividends, taxes, interest, conversions, and brokerTotalrow.Closed Positions: realized trade summary; can be empty for still-open accounts.Open Positions: optional live/open-position sheet.
Trade Reconstruction
- The review reconstructs trades primarily from
Cash Operationscomments such asOPEN BUY 6 @ 301.50andCLOSE SELL 2 @ 100.00. - Use the real
Tickercolumn as the instrument key, not only descriptive instrument text. - Process trades chronologically before FIFO matching.
- Split-fill notation like
OPEN BUY 1/100 @ 14.3130means executed quantity is1; use the numerator, not0.01. - Some XTB stock sales appear as
CLOSE BUYwhile the row type isStock selland amount is positive. Treat these economically as sales.
Valuation
- Live prices come from
yfinancedaily closes at or before the report end date. - Use trusted same-instrument symbol aliases only. Do not substitute a different share class as a proxy.
- If no trusted price exists, hold the ticker at cost and surface
price_source = costplus the reason.
Cash And Performance
- Reconciliation compares computed ending cash with the broker
Totalrow. - Dividends and interest are internal cash flows unless withdrawn; do not count them as external cash flows for XIRR.
- XIRR may be
n/aif the cash-flow signs or solver conditions are insufficient.