How to model physical Gold assets & update value online

I use kmymoney 5.1.3 on windows 11.

Is there a way to model physical gold as an asset and update its price online?
I created an asset account, and added a “stock” which should point to the gold price, e.g. Gold Dec 23 (GC=F) Stock Price, News, Quote & History - Yahoo Finance

But whatever I try the retrieval of the gold rate fails. Online rates I get via financeQuote, which for most of the stocks works fine (albeit quite slow retrieval). However, for gold it does not work, probably the “=” in the symbol? But I have not found another gold source so far that would work in kmymoney.

I created an account and assigned it Gold (XAU) as currency. The unit would be ounces. You then setup a price entry for XAU to your base currency and can then simply use the currency conversion and online quotes for the source “KMyMoney Currency”.

Also, I believ GC=F is not actually the current price of gold, it’s the price of a future on gold. There do seem to be some web sites which provide the current price, but it would likely take some effort to get KMyMoney to retrieve that price. The suggestion by Thomas to use Gold as a currency is probably your best approach, and I just found a mailing list message from 2012 supporting that method.

Hi Jack, there is nothing like “the price of gold”, there are many. A good one and one that represents a market consensus is the one of the gold future GC=F.
However, did not work to get this one retrieved via online price update, neither via yahoo, nor others which i tried, bloomberg for example.
I follow the suggestion above, i.e. to use an account with XAU as currency. Will add a description asap.
Thanks!

Thanks ipwizard, great hint, I am using that and will create a description which can be taken over into the documentation probably.

However, during the setup two other issues came up.
A) search: In the list of currencties (Tools → Currencies) there is an entry for gold already. It cannot be deleted and i dont know why as XAU is nowhere used in my data. Searching for XAU or Gold in kmymoney seems not to be possible. No idea why the currency entry cannot be deleted.
B) Edit Currency Settings: Reason I want to delete it and add from scratch is the smalles account unit and smallest cash unit cannot be modified. Both values in the currency editor are shown with 0,01 but should go lower to handle proper weightage in grams.

A) KMyMoney comes with a set of 159 active and 26 ancient (replaced with other active) currencies and four metals (Gold, Silver, Palladium and Platinum). They cannot be deleted when they are in use :slight_smile: It’s XAU because that is the ISO Code 4217 for gold.

B) Newer versions (maybe only the current “unstable” development version from which the screenshot is taken) do support changing those values.

image

Thanks ipwizard.

My question A) might not have been so clear … i tried searching for where in the database/file XAU was used, but could not find a search function. I had deleted all use of XAU in the database and all transactions, or sub/superaccounts of the one that used XAU as currency. Still the XAU entry in the Settings…Currency … list was not delete-able. So i raised the q uestion whether there is a way / function to search for uses of XAU.
What you mentioned about the predefined currencies. In my database there is only a handfull of currencies shown, i.e. the ones I use in accounts and transactions. There is an “add” button to add a currency (means most likely, select one of the predefined currencies) into the database - and i was hoping to be able to increase the decimals when “adding” the currency there.

Do you still have prices that reference XAU? That would prevent that you can delete it.

Yes, there were price entries for XAU (to see via tools → prices → see stored values) which i deleted. Still the currency entry in tools → currencies cannot be deleted (the delete button is greyed out/inactive) and when pressing “remove unused currencies” nothing happens.

Well - can we say as usual for kMyMoney, rather than solving an issue two new ones appear - the following inconsitency warning came up after deleting all stored prices. It appears kMyMoney creates interal accounts (which are not visible) for initial balances. And when an account is deleted the internal account does not get deleted. Thats why in my case the XAU remains as a “used currency” and cannot be deleted, why i cannot set the precision of the XAU currency because this would require to delete the record and add it new.
Well well … kmymoney … forget about money, you wont need it anymore, because kmymoney will require all your attention it seems - sarcasm off.
Screenshot 2023-09-01 115101

The opening balance accounts are technically necessary (double entry book keeping) and are normally hidden from the user. You can make them visible by marking the option “Show equity accounts” in the settings.

image

Once the option is activated and applied/saved, they will be shown in the accounts view

image

Oh excellent, thanks! Issue solved now.

XAU currency can be deleted after the “open balances XAU” was visible as described above and account deleted. The XAU currency now can be added fresh and setup with more than 2 decimal places. This is required for better modeling small amounts of gold (grams).

Thanks, topic closed - it will be a helpful description for others too.