Quote date in gnucash different from retrieved by gnc-fq-dump

Chris Good chris.good at ozemail.com.au
Sun Aug 2 05:24:58 EDT 2015


> Message: 10
> Date: Wed, 29 Jul 2015 17:21:09 +0200
> From: "Lt. Goose" <ltgoose at gmail.com>
> To: John Ralls <jralls at ceridwen.us>
> Cc: "gnucash-user at gnucash.org" <gnucash-user at gnucash.org>
> Subject: Re: Quote date in gnucash different from retrieved by
> 	gnc-fq-dump
> Message-ID:
> 	<CAJJ3UrMHi9Koiu0U_ouSFDLdwfvQZVrvd7CjFCOv50XEmjG0Eg at ma
> il.gmail.com>
> Content-Type: text/plain; charset=UTF-8
> 
> El mi?rcoles, 29 de julio de 2015, John Ralls <jralls at ceridwen.us>
escribi?:
> 
> >
> > > On Jul 29, 2015, at 4:43 AM, Lt. Goose <ltgoose at gmail.com
> > > <javascript:;>>
> > wrote:
> > >
> > > I'm getting unexpected results when updating quotes in gnucash 2.6.7
> > > (updated yesterday). I've written my own quote source and integrated
> > > it into Finance::Quote (1.37). It is recognized by gnucash so that I
> > > can select it from within the program and use it to retrieve quotes.
> > >
> > > However, the date returned in the quote (2015-07-29 12:00:00, as can
> > > be seen in debug trace messages [1]) is different from the one
> > > returned by Finance::Quote (2015-07-28, see gnc-fq-dump output in
> > > [2]). Detailed
> > output
> > > of gnc-fq-dump can be seen in [3].
> > >
> > > Am I missing something or does gnucash use execution date to insert
> > > the quote value? Should date string be formatted some other way? (I
> > > mimicked yahoo quote return values).  Is this the way it should work?
> > >
> > > I'd appreciate any insights on this matter.
> > >
> > > Thanks in advance.
> > > Gus.
> > >
> > > -------
> > >
> > > [1] gnucash.trace.log output
> > > * 13:27:16 DEBUG <gnc.scm> handling-request: (bolsamadrid ECR.BME
> > REE.BME)
> > > * 13:27:19 DEBUG <gnc.scm> results: ((ECR.BME (symbol . ECR.BME)
> > > (gnc:time-no-zone . 2015-07-29 12:00:00) (last . 0.73) (currency .
> > > EUR)) (REE.BME (symbol . REE.BME) (gnc:time-no-zone . 2015-07-29
> > > 12:00:00)
> > (last
> > > . 72.48) (currency . EUR)))
> > >
> > >
> > > [2] gnc-fq-dump output
> > > C:\Program Files (x86)\gnucash\bin>perl gnc-fq-dump bolsamadrid
> > > REE.BME ECR.BME Finance::Quote fields Gnucash uses:
> > >    symbol: REE.BME              <=== required
> > >      date: 28/07/2015           <=== required
> > >  currency: EUR                  <=== required
> > >      last: 72.4800              <=\
> > >       nav:                      <=== one of these
> > >     price: 72.4800              <=/
> > >  timezone:                      <=== optional
> > > =====
> > >
> > > Finance::Quote fields Gnucash uses:
> > >    symbol: ECR.BME              <=== required
> > >      date: 28/07/2015           <=== required
> > >  currency: EUR                  <=== required
> > >      last: 0.7300               <=\
> > >       nav:                      <=== one of these
> > >     price: 0.7300               <=/
> > >  timezone:                      <=== optional
> > >
> > >
> > > [3] gnc-fq-dump verbose output
> > > C:\Program Files (x86)\gnucash\bin>perl gnc-fq-dump -v bolsamadrid
> > REE.BME
> > > ECR.BME
> > > Finance::Quote fields Gnucash uses:
> > >    symbol: REE.BME              <=== required
> > >      date: 28/07/2015           <=== required
> > >  currency: EUR                  <=== required
> > >      last: 72.4800              <=\
> > >       nav:                      <=== one of these
> > >     price: 72.4800              <=/
> > >  timezone:                      <=== optional
> > >
> > > All fields returned by Finance::Quote for stock REE.BME
> > >
> > > stock           field  value
> > > -----           -----  -----
> > > REE.BME      currency: EUR
> > > REE.BME          date: 28/07/2015
> > > REE.BME     day_range: 72.0400 - 72.6600
> > > REE.BME          high: 72.6600
> > > REE.BME       isodate: 2015/07/28
> > > REE.BME          last: 72.4800
> > > REE.BME           low: 72.0400
> > > REE.BME        method: bolsamadrid
> > > REE.BME          name: REE.BME
> > > REE.BME      p_change: 0.42
> > > REE.BME         price: 72.4800
> > > REE.BME        source: Finance::Quote::Bolsamadrid
> > > REE.BME       success: 1
> > > REE.BME        symbol: REE.BME
> > >
> > > =====
> > >
> > > Finance::Quote fields Gnucash uses:
> > >    symbol: ECR.BME              <=== required
> > >      date: 28/07/2015           <=== required
> > >  currency: EUR                  <=== required
> > >      last: 0.7300               <=\
> > >       nav:                      <=== one of these
> > >     price: 0.7300               <=/
> > >  timezone:                      <=== optional
> > >
> > > All fields returned by Finance::Quote for stock ECR.BME
> > >
> > > stock           field  value
> > > -----           -----  -----
> > > ECR.BME      currency: EUR
> > > ECR.BME          date: 28/07/2015
> > > ECR.BME     day_range: 0.6550 - 0.7450
> > > ECR.BME          high: 0.7450
> > > ECR.BME       isodate: 2015/07/28
> > > ECR.BME          last: 0.7300
> > > ECR.BME           low: 0.6550
> > > ECR.BME        method: bolsamadrid
> > > ECR.BME          name: ECR.BME
> > > ECR.BME      p_change: 9.45
> > > ECR.BME         price: 0.7300
> > > ECR.BME        source: Finance::Quote::Bolsamadrid
> > > ECR.BME       success: 1
> > > ECR.BME        symbol: ECR.BME
> >
> > By ?updated yesterday? do you mean you built yesterday?s maint? That?s
> > significant because I pushed a change on Monday to use a more modern
> > interface for Date::Manip, and it looks like it?s not parsing the
> > d-m-y format correctly.
> >
> > Regards,
> > John Ralls
> >
> >
> >
>  I mean I updated gnucash from 2.6.3 to 2.6.7 using the Windows msi
installer
> from the gnucash website. I installed  this morning activeperl
> 5.20.2 (i think that's the version) over 5.20.1 and updated finance::quote
> using the Perl package manager from 1.10 to 1.37.
> 
> I haven't built anything from source, but I can make any checks you
suggest.
> 
> Thanks!

Hi John,

I don't know if this is relevant...

I just tested your new gnc-fq-helper (committed 27 July 2015).
Here is old 2.6.7 :

echo (yahoo "AMZN") | perl -w gnc-fq-helper
(("AMZN" (symbol . "AMZN") (gnc:time-no-zone . "2015-07-31 16:00:00") (last
. 536.15) (currency . "USD")))

Here is the new :
 echo (yahoo "AMZN") | perl -w gnc-fq-helper
(("AMZN" (symbol . "AMZN") (gnc:time-no-zone . 2015-07-31 16:00:00) (last .
536.15) (currency . "USD")))

Note missing double quotes around datetime.

When I run Get Quotes from GC with new : There was an unknown error while
retrieving the price quotes.

Also, now that Lt. Goose mentions it,
yahoo_australia does return a date and time which in this case seems to be
when the stock exchange closed on Friday arvo, but the dates loaded into the
GC price table are the current local date when Get Quotes was run. It has
always done this in my experience.

Shouldn't GC use the date returned by FinanceQuote?

Regards,

Chris Good

-------------- next part --------------
A non-text attachment was scrubbed...
Name: smime.p7s
Type: application/pkcs7-signature
Size: 4821 bytes
Desc: not available
URL: <http://lists.gnucash.org/pipermail/gnucash-user/attachments/20150802/7211cece/attachment.p7s>


More information about the gnucash-user mailing list