Solved: more fun (not) and problems with equities/securities

Jack ostroffjh at users.sourceforge.net
Tue Feb 25 17:55:42 GMT 2020


On 2020.02.23 03:08, Thomas Baumgart wrote:
> On Sonntag, 23. Februar 2020 00:32:11 CET Jack wrote:
> 
>> I thought I had written about this previously, but can't find that  
>> message now.   Sorry if it truly is a repeat.
> In that case sorry for not responding.
Not a problem.  I think I have finally cleaned up all of this mess.
> 
>> I'm trying to clean up my data file, specifically looking for cases  
>> where I created a new security instead of reusing the existing one  
>> when creating a new equity account (for example to purchase that  
>> stock in a different investment account.)  That, plus my history of  
>> issues with Merrill Lynch ofx imports has left me with at least one  
>> situation I can't seem to resolve.  I've written a Perl program  
>> using XML::LibXML which finds all SECURITIES with a name containing  
>> a provided string, then finds all stock EQUITY accounts containing  
>> those securities, and the investment accounts which hold them.
> >
>> I have a security E000387 (which actually has a misspelled fund  
>> name, created by the original import) in equity account A000721 in  
>> investment account A000157.  If I look in the register for that  
>> investment account, there are no transactions for that equity.  If I  
>> search the xml file directly, I  find a dividend transaction  
>> T000000000000019182 with splits for A000158 (the brokerage account  
>> for A000157). A000175 (the Dividends category), and A000162 (the  
>> "corrrect" equity account for the transaction).  In that third  
>> split, there is a matched transaction with splits for A000158 (the  
>> same brokerage account), A000177 (the Dividends Reinvestment  
>> category) and A000721 (the mystery equity account).  I can find that  
>> transaction looking at the ledger for category A000175, but not in  
>> the ledger for category A000177, and that transaction does not show  
>> a matched transaction.
> 
> Not sure, if matched transaction was ever fully implemented for  
> investment transactions. It seems to me it is not. Also, I have no  
> idea how you could end up in the above described scenario. The only  
> thing I could think of is some sort of import with automatic matching  
> as the UI clearly does not support that.
It is possible I did the initial import (which imports as a Dividend)  
and then edited that to be a Dividend Reinvestment.  I may then have  
repeated the import, and manually matched the two transactions.  If the  
system doesn't intentionally handle matched investment transactions,  
then it makes sense that is doesn't even look for them to display that  
they need accepting.  Just another task for the eventualy major update  
to investment handling.
> 
>> I'd just like to get rid of that matched transaction data - is there  
>> any way other than by manually editing my xml file?  Is there a  
>> wishlist I should file for this?
> 
> Right now, I guess that is the only way to solve your problem. A  
> wishlist item should be more generic, e.g. "Support transaction  
> matching for investment transactions" or so.
I have successfully removed the KEYPAIR entries for that match.
> 
>> Separately, but clearly related, is there any way to delete a  
>> Security from the file?  I would accept that a security could not be  
>> deleted if it was the currency for any equity account.  I'd prefer  
>> that any price history was deleted along with the account, but I  
>> would accept needing to manually delete those prices first.  Is this  
>> something for another wishlist bug?
> 
> This is currently possible. You have to delete all investments that  
> are based on the security (closing is not enough), delete all prices  
> regarding that security and then your are allowed to delete the  
> security. I just verified that with a test file.
Two points here.  First, it turns out you do not have to remove all  
price pairs first.  If there are any prices, when you try to delete the  
security, it gives a pop-up warning that all prices for it will also be  
deleted.  Next, I was confused because I was right clicking on the  
security, and getting no context menu.  The Edit and Delete buttons are  
on the side.  I'll file a separate wishlist for adding the context menu  
for the same actions.

I'm also going to file another wishlist: I have had several cases where  
after transferring all shares of a stock from one investment account to  
another, the shares were converted from Class C to Class A.  I record  
this by using "Remove shares" and "Add shares."  However, I then get a  
warning on saving (or Consistency Check) that there is no price on or  
before the opening date of the Class A security.  I'd like there to be  
a warning pop-up whenever shares are added to an investment account if  
there is no currently valid price for that security.  Low priority, but  
it will safe wondering later on why the Consistency check gives that  
warning.

Jack


More information about the KMyMoney-devel mailing list