Liquidation event cannot be parsed in an Interactive Brokers report
alexeibs opened this issue · 3 comments
I had CHL ADRs in my Interactive Brokers account, and those ADRs were terminated and liquidated in November. This is reflected by 2 corporate actions in my activity report:
Corporate Actions,Data,Stocks,USD,2021-11-03,"2021-11-02, 20:25:00","CHL(US16941M1099) Merged(Liquidation) FOR USD 30.20446 PER SHARE (CHL, CHINA MOBILE LTD-SPON ADR, US16941M1099)",-10,302.0446,-275.1,3.012343,
Corporate Actions,Data,Stocks,USD,Closed Lot:,2020-11-23,Basis: 299.032257,10,,,3.012343,ST
Corporate Actions,Data,Total,,,,,,302.0446,-275.1,3.012343,
One event is liquidation itself, and the second one is effectively removing stocks from the account. Both events cannot be parsed by investments tool. While I removed the second line from the report, I also made a draft pull-request for the liquidation event. The idea is to account liquidation as normal selling which is essentially what happened in the first place. I have almost zero Rust experience so my solution is probably hacky. However, it's working and demonstrates the idea
Hi! Thanks, I'll look into it and will refactor it if needed.
It would be great if you send me result of egrep 'CHL|US16941M1099' *.csv
to konishchev@gmail.com (if your privacy allows you to do this). Having all instrument records, I'll be able to craft a fake broker statement to write regression tests for (all regression tests data is stored in a separate submodule which will never be public).
It would be great if you send me result of
egrep 'CHL|US16941M1099' *.csv
Thank you for looking into this. I sent grep results to you
Released in v4.7.0