Value of stocks in reports?

John Ralls jralls at ceridwen.us
Sun Oct 23 10:24:54 EDT 2016


> On Oct 23, 2016, at 2:17 AM, David T. <sunfish62 at yahoo.com> wrote:
> 
> John,
> 
> It’s my understanding that the Asset Barchart/Piechart both allow different price settings: Average Cost/Weighted Average/Most Recent/Nearest in Time. The Most Recent setting here would give value based on the latest entry in the price db, I believe. 
> 
> For what it’s worth, I tried to look at the scheme to understand the difference between the other three settings for this option, but by the time I located the code in question (in commodity-utilities.scm), my head hurt too much to determine the differences.

David,

Nearest in time uses the price in the price db whose time stamp is closest to the date being reported. It's what you want to use for tracking the change in market value of the assets over time. Average price provides a single price for all dates that's the average of all of the prices in the database; Average cost is supposed to pick only the prices that represent purchases and average those, but I haven't tested to see if it actually works. Most recent obviously uses the latest price in the database for all points on the graph.
For most purposes Nearest in time is the right choice though it's not hard to imagine use-cases for the others and to imagine still other pricing rules. One that's requested from time-to-time is "Nearest before" so if a date falls on a Sunday and you have daily prices it will get priced at Friday's close instead of Monday's.

Regards,
John Ralls




More information about the gnucash-user mailing list