GnuCash Feature Request: List all commodity prices in the data file sorted by date

David G Hamblen dhamblen at
Fri Oct 28 13:10:09 EDT 2016

On 10/28/2016 12:44 PM, David T. via gnucash-user wrote:
> John,
> Unfortunately, GnuCash includes the storage of historical commodity prices, and users really ought to be able to manage the data stored in the file. As it stands, the price db is like the proverbial roach motel: prices check in, but they never check out ( <>).
> Today, just for yucks, I took a look at my own price db, accumulated over the last ten years. I was looking to clear out entries that were unnecessary, because I had sold the stocks, and no longer needed daily entries for those holdings. I figured to retain monthly or quarterly values for these holding, so that I might be able to see how the stock had performed over the time period that I held it. I went through and removed many entries for many of those holdings (a total of 100k from my 3.8MB compressed GnuCash data file). It was a three hour process, notable for its fundamentally manual, commodity-by-commodity, date-by-date elimination process.
> It is unfortunate that GnuCash is unable to offer its user base a better option to manage the prices in the price db.
> David T.
>> On Oct 28, 2016, at 7:14 PM, John Ralls <jralls at> wrote:
>>> On Oct 28, 2016, at 12:03 AM, David Carlson <david.carlson.417 at> wrote:
>>> I would like to see a feature to list all historical prices in the data
>>> file sorted by date  without needing to drill down through the commodity
>>> data, trying to guess which commodities might still have prices from before
>>> the American Revolution.
>>> Of course, the display should include the date (optionally showing day of
>>> the week), commodity, price, source, and most important, a check box to
>>> individually select prices to delete, somewhat similar to the list of
>>> emails in your email in-box.
>>> A nice additional feature might be to show the total number of shares in
>>> the data file of each commodity across all accounts on the dates included
>>> in the historical price data.  That would probably work best as a different
>>> report
>> That would work best as a separate program entirely. GnuCash is not a portfolio management program, it's an accounting program.

A few years back, I wrote a small SQL script that copied the price 
table, keeping only one entry per month.  As I recall, it wasn't too 
difficult, but one needs some comfort level with SQL. (I use mysql as my 
backing store and save a copy as XML occasionally).

dhamblen at
home phone (207) 633-4342
Cell Phone (207) 350-0440

More information about the gnucash-user mailing list