KapJI / capital-gains-calculator

UK capital gains tax calculator which supports transaction history from different brokers
MIT License
109 stars 41 forks source link

Morgan Stanley: Non-zero Net Cash Proceeds #534

Open 0xDCA opened 2 weeks ago

0xDCA commented 2 weeks ago

Thank you for writing this calculator.

I'm trying to use it with my Morgan Stanley report (from Alphabet), but I'm getting the exception thrown here. I'm trying to understand why the code needs to make this assumption, as some of the entries in my file contain non-zero values.

Thanks

0xDCA commented 2 weeks ago

@goofy57 Hi Sergey, I saw you added this parser, so wondering if you could take a look at my question above. Thank you in advance!

goofy57 commented 2 weeks ago

TBH this was very custom and I had to update the code a bit every year that I completed a self assessment - so please double-check at least orders of magnitude when you use it :)

I don't recall seeing non-zero net cash proceeds in my data, therefore wasn't sure how to deal with them in the code - feel free to patch this and happy to take a look at the pull request.

Is there any chance this is caused by the new G dividend program? If so, one quick workaround would be to just request data in Morgan Stanley up till e.g. May 2024 - that should still contain all data for 2023-2024 financial year but no rows with dividends.

0xDCA commented 2 weeks ago

Thanks for the quick reply. Actually, it seems these come from Autosale, which are shown in a weird way in these reports.

From what I have figured out so far, auto-sold stocks are reported in the "Releases Report" with a non-zero Net Cash Proceeds and in that file the event date corresponds with the date of vesting (not the sale, which may happen the next business day). The sale itself is not reported in the "Withdrawals Report" file, but rather in the "Autosale_Trading Plan - Releases" file. So I think we'll need to:

However, there's a complication, since the Releases report does not show the net shares received (it shows the quantity before taxes), so this may need to be sourced from somewhere else.

I can try to put together a PR later.

goofy57 commented 2 weeks ago

SG, thanks!

I'd also suggest to add some validation in case those non-zero Net Cash Proceeds are not found in the autosale report, otherwise it's easy to lose them in the final accounting.