capital-gains-calculator
capital-gains-calculator copied to clipboard
Calculate unrealized gains
This introduces unrealized gains calculations (proposed in #495). This is an estimation of the amount of gains/loss you could have if you sell all your shares. Features:
- The flag
--unrealized-gains
to enable it. - Breakdown by symbol.
- Uses yahoo finance api to get the current market prices (it shows unknown and a warning when it can't fetch it).
- No changes to the PDF report, only the console output.
Preview of the output:
Portfolio at the end of 2023/2024 tax year:
FOO: 423.00, £10000.00 (unrealized gains: £1000.00)
UNKNOWN_COMPANY: 200.00, £400.00 (unrealized gains: unknown)
For tax year 2023/2024:
Number of disposals: 0
Disposal proceeds: £0.00
Allowable costs: £0.00
Capital gain: £0.00
Capital loss: £0.00
Total capital gain: £0.00
Taxable capital gain: £0
Total unrealized gains: £1000.00
WARNING: Some unrealized gains couldn't be calculated. Take a look at the symbols with unknown unrealized gains above and factor in their prices.
Generate calculations report
All done!