jamsix / ib-edavki

Skripta, ki prevede XML poročilo trgovalnih poslov v platformi InteractiveBrokers v XML format primeren za uvoz v obrazce Doh-KDVP, D-IFI, Doh-Div in Doh-Obr v eDavkih Finančne uprave.
MIT License
173 stars 57 forks source link

Fix split rate #69

Closed nikegp closed 1 year ago

nikegp commented 1 year ago

In 2022 there was an SLG split, only one, that's indicated with two rows in IBKR reports

SLG(US78440X8048) SPLIT 10000 FOR 10306 (SLG, SL GREEN REALTY CORP, US78440X8873)
SLG(US78440X8048) SPLIT 10000 FOR 10306 (SLG, SL GREEN REALTY CORP, US78440X8048)

Note the different isin. With this patch the split is handled properly while before it was applied twice.

jamsix commented 1 year ago

@nikegp just trying to understand this split. This was a 97 for 100 reverse split on January 24, 2022. How are the two different ISINs related to the event?

nikegp commented 1 year ago

@jamsix have no idea. That's what I got in IBKR flex report and that's why I had a wrong number of SLG shares.

jamsix commented 1 year ago

Can you check what ISIN was used when you bought the stock and what ISIN is used now for your remaining position? Is it the same ISIN or did the ISIN change with the split?

nikegp commented 1 year ago

@jamsix they changed it. It was US78440X8048 in 2021, then after the split it became US78440X8873. IBKR for some reason returns the split for both ISINs.

pronebird commented 1 year ago

I had the same before for reverse-split back in 2020:

UAN(US1266331065) SPLIT 1 FOR 10 (UAN, CVR PARTNERS LP, US1266332055)
UAN(US1266331065) SPLIT 1 FOR 10 (UAN.OLD, CVR PARTNERS LP, US1266331065)

conid and isin are different after split and two security info entries. 🤷 This looks like reverse split (RS) + issuance change (IC).