Getting stock quotes for a specific date

Brendan Simon Brendan at
Wed Apr 1 18:40:47 EDT 2015

On 1/04/2015 5:59 pm, Mike Alexander wrote:
> --On April 1, 2015 at 3:50:14 PM +1100 Brendan Simon
> <Brendan at> wrote:
>> My account period is set to end on Jun-2014 (end of last financial
>> year for Australia).  After getting quotes, the advanced portfolio
>> report has the very latest values of the securities (i.e.
>> 31-Mar-2015) which is not what I need.  I want the report to show the
>> values as of 30-Jun-2014.  Can GnuCash get quotes from a specific
>> date?
> It's possible, although not particularly easy.  Take a look at
> <>.
> This links to two pages that contain Python scripts to import prices.
> These both require a copy of GnuCash which is built with the Python
> bindings, which might be a problem.
> You could also hack a copy of gnc-fq-helper, the Perl script that
> actually fetches the prices, to fetch prices for a date in the past
> instead of the current date.  This would require using the
> Finance::QuoteHist Perl module as described in
> <>.
> There is a Perl script attached to
> <>
> which might be a suitable replacement for gnc-fq-helper.  I haven't
> tried using it in GnuCash, but I just tested it and it seems to still
> work and produce plausible output.

For my specific needs it's probably simpler to do it by hand (since the
capability is not available in GnuCash, and the number of stocks
involved is manageable).  It might be a good addition to add to GnuCash
though -- to be able to specify a particular date, or end of accounting
period.  I know I wouldn't always to remember to update quote info on
the last day of the financial year.  Might be even nicer to be able to
configure GnuCash to get history in some configurable period (e.g.
daily, or Fridays, and/or end of each month, etc).

Cheers :)

More information about the gnucash-user mailing list