[GNC] Cash in investment has a "price"?

Marcus Winston marcus at thechocolatehouse.net
Sat Oct 28 20:15:04 EDT 2023


Correction -- adding a price for USD is not a workaround. it worked in 
my debug file, but maybe that's because I had no other prices in there.

Could still really use a fix for this bug, or a suggestion on a viable 
workaround.

-marcus

On 10/28/23 13:48, Marcus Winston wrote:
> OK, looks like a workaround is to go into the price db, and add a 
> price for USD.
>
> -marcus
>
> On 10/28/23 13:31, Marcus Winston wrote:
>> Yes, I have the following account structure:
>>
>> Assets
>>     Investments|
>>         Brokerage Account, security/currency = USD
>>             Security Account, security/currency = <ticker symbol>
>>             Security Account, security/currency = <ticker symbol>
>>
>> The Adv Profile report worked fine in the previous version of Gnucash 
>> (4.4, I think it was). Cash balances in the Brokerage account worked 
>> fine. In 5.4, it seems they're broken.
>>
>> I created a "debug.gnucash file". If I delete ALL price db entries, 
>> the Adv Profile report works fine. But if I have even one price in 
>> the price db (manually entered, or downloaded), the USD in the 
>> brokerage account have a price equal to the one security for which I 
>> have a price.
>>
>> Whatever changed since 4.4, it would be nice to get it 'fixed'.
>>
>> -marcus
>>
>> On 10/28/23 12:58, john wrote:
>>>
>>>> On Oct 28, 2023, at 09:50, Marcus Winston 
>>>> <marcus at thechocolatehouse.net> wrote:
>>>>
>>>> I've just updated to GC 5.4-1 (flatpak; linux). Something really 
>>>> strange is going on. In the Advanced Portfolio report, the cash 
>>>> balance is reported in USD (the correct currency), but the price of 
>>>> the currency is not $1. Sometimes it's $11.88, sometimes it's 
>>>> $92.xx (92 and change). I did not notice this before, so it may 
>>>> have happened under the previous version I was running 
>>>> 4.something). But, something is really wrong. When I click on the 
>>>> hyperlink on the price, it takes me to the price editor for a 
>>>> mutual fund that is not even part of the account.
>>>>
>>>> I did a fix and repair all, but that doesn't seem to have fixed it. 
>>>> Any hints as to where to look would be appreciated.
>>> I guess you mean that you included a currency account in the APR 
>>> accounts as the APR doesn't have anything labelled "cash balance". 
>>> Acting on that guess I tried it and found that the report logic 
>>> apparently has no special-casing for an account in the report 
>>> currency so it goes looking for a price in the pricedb. Of course it 
>>> won't find anything for USD-USD, so it looks for a two-step 
>>> conversion, USD->XXX->USD, comes up with something, and proceeds to 
>>> use that something to generate nonsense for the rest of the line.
>>>
>>> While it's not hard to think of same-currency accounts that would 
>>> make sense to be included in the APR--a certificate of deposit comes 
>>> immediately to mind--it's also easy to think of cases where that 
>>> could only produce nonsense, starting with your brokerage cash 
>>> account. Figuring out the "basis" and separating out the sweep or 
>>> money-market income from changes due to trades and inflows from 
>>> other holdings would be inordinately complex.
>>>
>>> For the true currency investment like a CD or even a savings account 
>>> you can work around the pricing fail and generate a meaningful line 
>>> in the APR by inventing a security. That's technically correct for 
>>> Money Market funds, where you own units in the fund and the managers 
>>> exert a great deal of effort to keep the price of those units at 
>>> $1.00, which effort is not always successful.
>>>
>>> Regards,
>>> John Ralls
>>>


More information about the gnucash-user mailing list