After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 676789 - Price Editor should show the time - if the exchange is still open 'last' and 'NAV' produce confusion
Price Editor should show the time - if the exchange is still open 'last' and ...
Status: RESOLVED FIXED
Product: GnuCash
Classification: Other
Component: Currency and Commodity
2.4.x
Other Windows
: Normal normal
: ---
Assigned To: Frank H. Ellenberger
gnucash-core-maint
Depends on:
Blocks:
 
 
Reported: 2012-05-25 03:53 UTC by David Carlson
Modified: 2018-06-29 23:08 UTC
See Also:
GNOME target: ---
GNOME version: ---



Description David Carlson 2012-05-25 03:53:54 UTC
When the security price editor is opened and 'Get Quotes' button is clicked more than once during the time window that a market is open and the price of a security on that market changes, more than one entry appears in the price window for that security.  This is very confusing, as the multiple prices are all identified as 'Last'.

The price should show the time that it was quoted in the retrieval and not be identified as 'Last' unless it actually is identified as 'Last' as retrieved.

I have seen this on NYSE and NASDAQ stocks.  It may also happen for currencies when whichever exchange they are quoted from is open for trading, such that the price might change.  

United States mutual funds are only quoted as yesterday's NAV, so this is not an issue unless there is confusion in the time window when the various daily price updates are happening, which is usually the next few hours after the NYSE closes.  I hope that GnuCash uses the date supplied in the retrieval to avoid this confusion.

It would also be nice if the source was identified as the particular source that Finance:Quote used and, if available, the exchange that the the source derived it's data from, such as NYSE, NASDAQ, CBOT.  The current Finance:Quote reference is too vague.
Comment 1 Frank H. Ellenberger 2014-04-24 20:18:29 UTC
Right! While the time is stored, it is not shown.
Comment 2 David Carlson 2015-01-30 19:39:31 UTC
This is still true for release 2.6.5 for Windows and probably other builds.

To make matters worse, reports that are configured to select a price "Nearest in time" choose the oldest (i.e.earliest in the day) of multiple "Last" prices for the report date, which I note here only to underline the importance of this bug.  

I will file or update a separate bug report about price selection in reports.
Comment 3 David Carlson 2015-02-01 14:57:04 UTC
On Sunday Feb 1 at 9:00 AM Eastern time I ran the get quotes function and found that it received prices dated January 30 for stocks and January 31 for mutual funds.  I suspect that Yahoo has been doing it this way "forever".

Since GnuCash has no control over the data it receives, I suggest that the time when each datum is received should also be available in the price editor.  That should be in an optional column that can be hidden except when someone really wants to see it.
Comment 4 Frank H. Ellenberger 2015-02-26 21:17:06 UTC
(In reply to David Carlson from comment #3)
What is wrong with that?

I assume, you got the Friday closing quote of your share.

According http://en.wikipedia.org/wiki/Net_asset_value#Open-ended_funds the NAV of your fund is calculated Friday after closing and valid until Monday evening a new value is calculated.
Comment 5 David Carlson 2015-02-27 01:35:59 UTC
There are still 2 problems.
1.  there can be multiple 'last' entries in the GnuCash data file that were retrieved by the get quotes function.  How can I tell which is really 'last'?
If there were some way to distinguish intra-day prices from closing prices for stocks and if mutual fund quotes were properly identified as 'NAV' when retrieved from the get quotes function.
2.  when the last day of the month falls on a weekend, if the stock price retrieval actually retrieves the friday close on sunday and identifies it as a friday 'last' price, it might still be a friday intraday price.  If the user does not recall that the last business day for that month was not the last calendar date, he might think that the file is missing a date.
Comment 6 John Ralls 2015-08-15 08:23:33 UTC
"Last" in this case is a stock trading term meaning "the price of the last trade at the time of the quote". When using free sources like Yahoo! it's more like "the price of the last trade 20 minutes before the time of the quote" since those quotes are almost always delayed though the actual amount of the delay varies by the exchange.

Erik Colson's post in http://lists.gnucash.org/pipermail/gnucash-user/2015-August/061616.html is instructive (though easier to read in your mailer than a browser thanks to html's eating the whitespace). It's F::Q's output of an AMZN quote:
         'AMZNlow' => '522.00',
         'AMZNdiv_date' => undef,
         'AMZNex_div' => undef,
         'AMZNlast' => '527.46',
         'AMZNsymbol' => 'AMZN',
         'AMZNcap' => '246700000000',
         'AMZNopen' => '523.65',
         'AMZNsuccess' => 1,
         'AMZNisodate' => '2015-08-11',
         'AMZNvolume' => '2676600',
         'AMZNclose' => '524.00',
         'AMZNtime' => '16:00',
         'AMZNprice' => '527.46',
         'AMZNask' => '529.50',
         'AMZNeps' => '-0.41',
         'AMZNhigh' => '528.98',
         'AMZNnet' => '+3.46',
         'AMZNp_change' => '+0.66',
         'AMZNyear_range' => '284.00 - 580.57',
         'AMZNdiv_yield' => undef,
         'AMZNmethod' => 'yahoo',
         'AMZNname' => 'Amazon.com, Inc.',
         'AMZNavg_vol' => '3305790',
         'AMZNdiv' => undef,
         'AMZNcurrency' => 'USD',
         'AMZNbid' => '528.85',
         'AMZNpe' => undef,
         'AMZNdate' => '08/11/2015',
         'AMZNday_range' => '522.00 - 528.98'

Note that the "close" presented here is the previous day's close. That's why it doesn't match the "last" price even though the timestamp says 16:00, when US markets close.

Setting aside that we don't want to keep the opening and closing times of the world's stock markets, the time of the last trade for a thinly-traded stock isn't necessarily going to be the market close so we wouldn't be able to reliably detect a closing price on the day.

We've been discussing this in gnucash-devel and the consensus there is that there's no value to retaining more than one price per day. We'd overwrite existing prices with new ones so that the last price retrieved would be the one saved.
Comment 7 John Ralls 2015-09-24 19:35:06 UTC
This problem has been fixed in our software repository. The fix will go into the next software release. Once that release is available, you may want to check for a software upgrade provided by your Linux distribution.
Comment 8 John Ralls 2017-09-24 22:48:29 UTC
Reassign version to 2.4.x so that individual 2.4 versions can be retired.
Comment 9 John Ralls 2018-06-29 23:08:54 UTC
GnuCash bug tracking has moved to a new Bugzilla host. This bug has been copied to https://bugs.gnucash.org/show_bug.cgi?id=676789. Please update any external references or bookmarks.