Hi kosmicmisfit,
I have tired to create an investment titled 'Margin Fees'
I think this is the point of confusion. Instead of creating a new investment, put the account fee transaction in the same investment where you sold shares to create a capital gain event, not in another investment in the same sub-portfolio.
Here are some instructions to demonstrate this feature:
1) Create a new investment and buy some shares on date Sep 1, 21
2) Record a non-reinvested account fee in this same investment with a negative value on Sep 15, 21
3) Record a sell transaction in this same investment for Sep 20, 21
4) Create a Capital Gains report covering Sep 20, 21, and under "Options / Report Preferences... / Capital Gains" turn on the option "Include Account Fees in Basis"
Your Capital Gains report should have 1 line item, and the basis will be increased due to the Account Fee transaction. When you enter an Account Fee transaction, that fee is applied evenly to all the shares owned as of that date, as far as determining how to distribute the fee among the basis for each share.
See my screenshot demonstrating the above example:
- Screenshot 2021-09-20 082650.jpg (49.7 KiB) Viewed 2942 times
I sold half the shares, so half of the account fee has been added to the basis. The basis is $525 instead of $500.