[GNC] Mutual fund quotes in the U. S.
Chris Good
goodchris96 at gmail.com
Sat Apr 24 18:00:38 EDT 2021
Hi David,
I suggest you use gnc-fq-dump to see if Finance Quote (FQ) is returning a date (and time?) for your mutual funds. If GnuCash does not get a date from FQ, then it defaults the date to today. In this case, I suggest the solution would be to have FQ yahoo_JSON modified to provide an appropriate date, based on the time.
It could be quite a complicated mod though. What do you do if the user time zone is not in the US? What about weekends and public holidays?
An alternative may be to use a different FQ source (alphavantage?).
The problem could also be that FQ is returning a date (and time) but GnuCash is changing the date based on your time zone, but I think that is unlikely as I think it tries to default the time to 11:59 or 10:59am on all dates to avoid that problem just about everywhere in the world.
It may be helpful to also save your GnuCash data as uncompressed xml and see what the date/time is in the price database record.
You can raise a FQ issue at https://github.com/finance-quote/finance-quote/issues
See also https://wiki.gnucash.org/wiki/Online_Quotes
You may like to ensure you are running the latest GnuCash and FQ.
Regards,
Chris Good
> Message: 7
> Date: Sat, 24 Apr 2021 08:57:21 -0400
> From: Jack Frillman <jcf_m_lists at me.com>
> To: David Carlson <david.carlson.417 at gmail.com>
> Cc: Gnucash Users <gnucash-user at gnucash.org>
> Subject: Re: [GNC] Mutual fund quotes in the U. S.
> Message-ID: <1bc5ad5a-508d-d272-20ad-bf495112271e at me.com>
> Content-Type: text/plain; charset=utf-8; format=flowed
>
> It can get the prices for both stocks and mutual funds. The lookup is
> done by ticker symbol.
>
> GNUC's csv price importer requires a date to be present in the csv file
> so I'm not sure what you are asking in your second question.
>
> Below is a sample of a couple of lines from the csv file. It's has the
> bare minimum of information the csv price importer requires.
>
> This is the format of each line:
> TICKER,PRICE,TYPE,DATE,CURRENCY
>
> ARSIX,15.73,Ray Jay,2021/04/22,USD
> BAFGX,35.07,Ray Jay,2021/04/22,USD
>
>
> On 4/24/21 2:11 AM, David Carlson wrote:
>> Jack,
>>
>> Your scripts offer an opportunity to massage the data, if needed.? Out
>> of curiosity, can you import both stock prices and mutual fund
>> prices?? And can you keep the timestamps in your CSV files?
>>
>> On Fri, Apr 23, 2021 at 8:55 PM Jack Frillman <jcf_m_lists at me.com
>> <mailto:jcf_m_lists at me.com>> wrote:
>>
>> It may be doing what I'm doing and making the date of the closing
>> price as the day the script is run.
>>
>> I don't run it using cron. I run it manually and if I forget a day
>> I don't worry about it.
>> I just run one of these two commands from the terminal.
>>
>> getquotes -y??? <-- ? gets the prices from Yahoo
>> ......OR.....
>> getquotes -m?? <-- ? gets the prices from Market Watch
>>
>> Then I import the resulting csv file that appears on my desktop.
>>
>> I have two places to get the quotes so if one is unreachable for
>> some reason I have a backup source.
>>
>>
>> On 4/23/21 9:43 PM, David Carlson wrote:
>>> I am not sufficiently comfortable with BASH, Chron jobs, etc to
>>> be willing to set up an outside utility to do that.? I manually
>>> download prices inside the GnuCash price database using Yahoo as
>>> JSON as the source.? If I forget to do it in the late evening I
>>> sometimes try to do it in the morning before the market opens as
>>> I have several stock prices that I am also tracking.? That is how
>>> I discovered the incorrect dates on the mutual funds prices,? I
>>> am not sure if, for example, GnuCash downloads a stock price
>>> during the day, does it replace it with a closing price if it
>>> downloads again after the market closes.? I suspect it may not
>>> even keep the timestamps that come with the prices, so there may
>>> not be any clue about that.
>>> On Fri, Apr 23, 2021 at 8:18 PM Jack Frillman via gnucash-user
>>> <gnucash-user at gnucash.org <mailto:gnucash-user at gnucash.org>> wrote:
>>> I'm not sure what you are using to updated the your prices
>>> but I wrote a
>>> python script & a bash script that get the quotes and put
>>> them into a
>>> csv file for importing into GNUCash and I don't have that
>>> date issue. I
>>> run the scrips in the evening when the markets are closed.
>>> On 4/23/21 8:59 PM, David Carlson wrote:
>>>> I noticed recently that if I download mutual fund prices
>>> after about 7 AM
>>>> central daylight time the prices are saved in GnuCash with
>>> todays date even
>>>> though they are still yesterday's closing NAV until
>>> sometime after the
>>>> markets close.? To reliably get the correct price posted on
>>> the correct
>>>> date it seems that I must wait until after 7PM Central time
>>> but before 7AM
>>>> the following morning.
>>>> I would like to suggest an enhancement that if GnuCash
>>> downloads a United
>>>> States mutual fund price with a morning time stamp that it
>>> presume it to be
>>>> yesterday's closing NAV price.? I would like comments from
>>> others about
>>>> this.
>>> --
>>> Old Unix programmers never die, they just mv to /dev/null
>>> - Anonymous
>>> _______________________________________________
>>> gnucash-user mailing list
>>> gnucash-user at gnucash.org <mailto:gnucash-user at gnucash.org>
>>> To update your subscription preferences or to unsubscribe:
>>> https://lists.gnucash.org/mailman/listinfo/gnucash-user
>>> <https://lists.gnucash.org/mailman/listinfo/gnucash-user>
>>> If you are using Nabble or Gmane, please see
>>> https://wiki.gnucash.org/wiki/Mailing_Lists
>>> <https://wiki.gnucash.org/wiki/Mailing_Lists> for more
>>> information.
>>> -----
>>> Please remember to CC this list on all your replies.
>>> You can do this by using Reply-To-List or Reply-All.
>>> --
>>> David Carlson
>>
>> --
>> Old Unix programmers never die, they just mv to /dev/null
>> - Anonymous
>>
>>
>>
>> --
>> David Carlson
>
> --
> Old Unix programmers never die, they just mv to /dev/null
> - Anonymous
>
>
>
> ---------------
More information about the gnucash-user
mailing list