Bug 398134

Summary: Automatically Mark Shares that Were Sold
Product: [Applications] kmymoney Reporter: Richard Theisen <rltheis>
Component: generalAssignee: KMyMoney Devel Mailing List <kmymoney-devel>
Status: REPORTED ---    
Severity: wishlist    
Priority: NOR    
Version: 5.0.1   
Target Milestone: ---   
Platform: Other   
OS: Linux   
Latest Commit: Version Fixed In:

Description Richard Theisen 2018-09-01 19:12:59 UTC
Add a mechanism to automatically mark shares that were sold. I believe most people use First-in, First-out (FIFO) method for selling shares (they could use last-in, first-out (LIFO)). The FIFO or LIFO option could be selected when the investment is created. When shares are sold with a FIFO setting, the application starts with the latest, non-sold, shares and marks them sold up to the actual amount sold. For partial amount sold (ie 300 shares where bought on 3/20/2000; 200 shares were sold on 8/14/2018), a new, read-only, field to indicate how many shares are remaining. In my example, this new field's value would be 100. 

Marking sold share affects the average price for the shares. May also affect other reports.

The way you calculate the number of shares will need to be modified. Once the shares are marked as sold. You only need to add all purchase related actives.