KapJI / capital-gains-calculator

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

Sharesight problem - not handling Share Splits #266

Open nsratcliffe opened 1 year ago

nsratcliffe commented 1 year ago

Hi there, After tweaking the formats (see previous issue) and using Google Sheets to save as .csv (don't download direct Excel from Sahresight !) I've not hit a problmem where a share I own has undergone a Split - so in the .csv file the a row has Split for the TYpe of action. cgt-calc throws up an error (Unknown action: Split). This is needed as without the split when I came to sell the shares cgt-calc threw an invalid transaction error as it thought I was trying to sell more shares than I owned. Can this be easily fixed?

nsratcliffe commented 1 year ago

Hi there, After tweaking the formats (see previous issue) and using Google Sheets to save as .csv (don't download direct Excel from Sahresight !) I've not hit a problmem where a share I own has undergone a Split - so in the .csv file the a row has Split for the TYpe of action. cgt-calc throws up an error (Unknown action: Split). This is needed as without the split when I came to sell the shares cgt-calc threw an invalid transaction error as it thought I was trying to sell more shares than I owned. Can this be easily fixed?

BTW there are two other actions to handle in addition to Split that appear in the All Trades Report.csv : 1. Consolidation and 2. Bonus.

vmartinv commented 7 months ago

We need someone who uses sharesight to add support for these actions into the parser.

deed02392 commented 7 months ago

The README mentions that this tool supports splits, but it's not documented. Looking at the source there seems to be support in the raw format for splits: https://github.com/KapJI/capital-gains-calculator/blob/4a58008acdff23cfa26bcb7d81c991f81c59b749/tests/test_data/raw/test_data.csv#L9

But then it looks as though they are still only handled for MSBB and there is only one split (for Google) which is hard-coded: https://github.com/KapJI/capital-gains-calculator/blob/4a58008acdff23cfa26bcb7d81c991f81c59b749/cgt_calc/parsers/mssb.py#L62